Skip to content

Commit dd92167

Browse files
committed
Include a Mastodon link besides the user name below post titles
We show the Mastodon URL alongside the website URL and XMPP address. This crowds the user box even more and I think LinuxFR should switch to using a proper profile page instead. This was requested by Adrien Dorsaz.
1 parent 8d5910d commit dd92167

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

app/assets/stylesheets/parts/a_tag.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ body {
2525
background: linear-gradient(
2626
90deg,
2727
$C_CLAIR,
28-
$C_CLAIR $PX_BRANDING_LARG,
29-
$C_CONTAINER $PX_BRANDING_LARG,
28+
$C_CLAIR $PX_BRANDING_LARG + 1px,
29+
$C_CONTAINER $PX_BRANDING_LARG + 1px,
3030
$C_CONTAINER
3131
)
3232
#fff;
33+
background-repeat: no-repeat;
3334
}
3435

3536
a {

app/assets/stylesheets/parts/big_footer.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
padding: 0 0 20px 0;
77
background: $C_CLAIR;
88
background: linear-gradient(to bottom, $C_FOOT 0%, white 100%);
9+
background-repeat: no-repeat;
10+
background-position: 0 0;
911

1012
a {
1113
font-size: 0.75em;
@@ -25,6 +27,8 @@
2527
$C_MIBLANC_MIFOOT 50%,
2628
$C_FOOT 100%
2729
);
30+
background-repeat: no-repeat;
31+
background-position: 0 0;
2832
min-height: 360px;
2933

3034
border-bottom-right-radius: $RAY_FOOT;

app/assets/stylesheets/parts/tab.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
display: flex;
44
-ms-flwx-wrap: wrap;
55
flex-wrap: wrap;
6-
background: linear-gradient(to top, $C_INACTIVE 2px, transparent 2px);
6+
background: 0 0 no-repeat linear-gradient(to top, $C_INACTIVE 2px, transparent 2px);
77
.tab {
88
font-size: 1.5em;
99
line-height: 1.3em;

app/assets/stylesheets/parts/top_menu.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
background: linear-gradient(
1111
to right,
1212
#fff,
13-
#e7e3e0 $PX_BRANDING_LARG,
13+
#e7e3e0 $PX_BRANDING_LARG + 1px,
1414
#bdb3aa 50%
1515
);
16+
background-repeat: no-repeat;
17+
background-position: 0 0;
1618

1719
/* we recycle the nav bar to display the black line at the top */
1820
.go_to_content {

app/helpers/node_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def posted_by(content, user_link='Anonyme')
111111
user_infos = []
112112
user_infos << homesite_link(user)
113113
user_infos << jabber_link(user)
114+
user_infos << mastodon_link(user)
114115
user_infos.compact!
115116
user_link += (" (" + user_infos.join(', ') + ")").html_safe if user_infos.any?
116117
end

app/helpers/users_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ def jabber_link(user)
4040
link_to("adresse XMPP", "xmpp:" + user.jabber_id)
4141
end
4242

43+
def mastodon_link(user)
44+
return if user.mastodon_url.blank?
45+
link_to("Mastodon", user.mastodon_url)
46+
end
4347
end

0 commit comments

Comments
 (0)