Skip to content

Commit

Permalink
add the topic name to the +more popover in social toolbar, fix bug in…
Browse files Browse the repository at this point in the history
… lookup of topic, adjust styles
  • Loading branch information
rnagle committed Dec 11, 2015
1 parent 8888c96 commit ed18352
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 40 deletions.
41 changes: 30 additions & 11 deletions css/editor-style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/editor-style.min.css

Large diffs are not rendered by default.

41 changes: 30 additions & 11 deletions css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion homepages/assets/css/single.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion homepages/assets/css/top-stories.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions inc/post-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,23 @@ function largo_post_social_links( $echo = true ) {
}

if ( ! empty( $top_term_id ) ) {
$top_term_link = get_term_link( $top_term_id, $top_term_taxonomy );
$top_term = get_term( (int) $top_term_id, $top_term_taxonomy );
$top_term_link = get_term_link( (int) $top_term_id, $top_term_taxonomy );
if ( ! is_wp_error( $top_term_link ) ) {
$more_social_links[] = '<li><a href="' . $top_term_link . '"><i class="icon-link"></i> More on this topic</a></li>';
$more_social_links[] = '<li><a href="' . $top_term_link . '"><i class="icon-link"></i> <span>More on ' . $top_term->name . '</span></a></li>';
}

$top_term_feed_link = get_term_feed_link( $top_term_id, $top_term_taxonomy );
if ( ! is_wp_error( $top_term_feed_link ) ) {
$more_social_links[] = '<li><a href="' . $top_term_feed_link . '"><i class="icon-rss"></i> Subscribe to this topic</a></li>';
$more_social_links[] = '<li><a href="' . $top_term_feed_link . '"><i class="icon-rss"></i> <span>Subscribe to ' . $top_term->name . '</span></a></li>';
}
}

// Try to get the author's Twitter link
$twitter_username = get_user_meta( $post->post_author, 'twitter', true );
if ( ! empty( $twitter_username ) ) {
$twitter_link = 'https://twitter.com/' . $twitter_username;
$more_social_links[] = '<li><a href="' . $twitter_link . '"><i class="icon-twitter"></i> Follow this author</a></li>';
$more_social_links[] = '<li><a href="' . $twitter_link . '"><i class="icon-twitter"></i> <span>Follow this author</span></a></li>';
}

if ( count( $more_social_links ) ) {
Expand Down
43 changes: 33 additions & 10 deletions less/inc/single.less
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,11 @@ body.normal.page {

.post-social {
margin-bottom: @baseline;
&> span {
& > span {
// copied from widgets/largo-follow.less
line-height: 1.5em;
max-width: 250px;
margin: 0.5em 0;
padding: 0.3em 1em 0.3em 0.5em; // Irregular padding is to counter 0.2em margin-left on the icon.
text-align: center;
text-transform: uppercase;
font-weight: 300;
Expand All @@ -245,19 +244,24 @@ body.normal.page {
font-size: @baseFontSize;
color: @white;

@media (max-width: 768px) {
padding: 0.3em 0.6em;
}
@media (max-width: 480px) {
padding: 0.3em 0.2em;
}

&:hover {
cursor: pointer;
}
&:last-child {
margin-right: 0;
}

& > a {
display: block;
padding: 0.3em 1em 0.3em 0.5em; // Irregular padding is to counter 0.2em margin-left on the icon.

@media (max-width: 768px) {
padding: 0.3em 0.6em;
}
@media (max-width: 480px) {
padding: 0.3em 0.2em;
}
}
}
a {
color: @white;
Expand All @@ -284,6 +288,8 @@ body.normal.page {

a {
color: @gray;
position: relative;
float: left;
&:hover {
color: @grayDark;
text-decoration: underline;
Expand All @@ -293,14 +299,31 @@ body.normal.page {
i {
color: @grayLight;
margin-right: 0.25em;
position: absolute;
top: 0;
left: 0;
}

ul, li {
list-style-type: none;
margin: 0;
padding: 0;
font-size: 14px;
line-height: 24px;
line-height: 20px;
}

li {
margin-bottom: 0.5em;
float: left;

&:last-child {
margin-bottom: 0;
}

span {
display: block;
margin-left: 28px;
}
}

@media (max-width: 480px) {
Expand Down

0 comments on commit ed18352

Please sign in to comment.