Skip to content

Commit

Permalink
Attribution box: shrink the icon less, add some margins and support s…
Browse files Browse the repository at this point in the history
…maller images.
  • Loading branch information
rczajka committed Aug 21, 2020
1 parent d6cd27d commit b20ea95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions css/cc-attribution-box.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');

.cc-attribution-box-container {
display: inline-block;
position: relative;
}
.cc-attribution-box {
Expand All @@ -23,15 +24,18 @@
line-height: 22px;
}
.cc-attribution-box > * {
margin: 0 5px;
margin: 5px;
}
.cc-attribution-box a {
color: black;
text-decoration: none;
}
.cc-attribution-box a.cc-attribution-box-license {
flex-shrink: .5;
}

.cc-attribution-box img {
height: 53px;
height: 48px;
margin: 20px 0;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/class-creativecommons-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ public function simple_license_block($att_id) {

return "<div>" . esc_html($credit) . "</div>"
."<a target='_blank' href='" . esc_url($attribution_url) . "'>$title</a>"
. "<a target='_blank' href='" . esc_url($license_url) . "' title='" . esc_attr($license_name) . "'>"
. "<a class='cc-attribution-box-license' target='_blank' href='" . esc_url($license_url) . "' title='" . esc_attr($license_name) . "'>"
. "<img src='" . esc_url($button_url) . "' alt='" . esc_attr($license_name) . "'></a>";
}

Expand Down

0 comments on commit b20ea95

Please sign in to comment.