Skip to content

Commit 04c1653

Browse files
committed
Add Mastodon button
This required reworking the CSS a bit so we can have Twitter and Mastodon on the same section. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent bde2df3 commit 04c1653

File tree

2 files changed

+57
-20
lines changed

2 files changed

+57
-20
lines changed

layouts/index.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,27 @@ <h1>Community</h1>
2828
<div class="community-links">
2929
<div class="community-twitter">
3030
<div class="community-card">
31-
<i class="big-icon fab fa-twitter"></i>
32-
<p>Follow us on Twitter to get announcements and other information.</p>
31+
<div class="community-icons">
32+
<i class="big-icon fab fa-twitter"></i>
33+
<i class="big-icon fab fa-mastodon"></i>
34+
</div>
35+
<div class="community-text">
36+
<p>Follow us on Mastodon or Twitter to get announcements and other information.</p>
37+
</div>
3338
</div>
34-
<div class="community-button twitter-button">
35-
<a href="https://twitter.com/AsahiLinux" class="rounded-button"><i class="fab fa-twitter"></i> @AsahiLinux</a>
39+
<div class="community-button twitter-buttons">
40+
<a rel="me" href="https://social.treehouse.systems/@AsahiLinux" class="mastodon-button rounded-button"><i class="fab fa-mastodon"></i> @AsahiLinux<wbr>@treehouse.systems</a>
41+
<a rel="me" href="https://twitter.com/AsahiLinux" class="twitter-button rounded-button"><i class="fab fa-twitter"></i> @AsahiLinux</a>
3642
</div>
3743
</div>
3844
<div class="community-chat">
3945
<div class="community-card">
40-
<i class="big-icon fas fa-hashtag"></i>
41-
<p>Our primary communications platform is IRC on OFTC.</p>
46+
<div class="community-icons">
47+
<i class="big-icon fas fa-hashtag"></i>
48+
</div>
49+
<div class="community-text">
50+
<p>Our primary communications platform is IRC on OFTC.</p>
51+
</div>
4252
</div>
4353
<div class="community-button chat-button">
4454
<a href="/community" class="rounded-button"><i class="fas fa-hashtag"></i> Channel list</a>

static/css/main.css

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -670,30 +670,43 @@ div.center-title h1, div.center-title h2 {
670670
div.community-card {
671671
flex: 1;
672672
display: flex;
673-
align-items: center;
673+
align-items: stretch;
674674
padding: 40px 0px;
675675
}
676676

677-
div.community-card i {
677+
div.community-card div.community-icons {
678+
display: flex;
679+
flex-direction: column;
678680
flex: 1;
679-
padding-right: 30px;
681+
min-width: 80px;
682+
justify-content: center;
683+
}
684+
685+
div.community-card div.community-icons i {
686+
margin: 8px 0;
680687
}
681688

682-
div.community-card p {
689+
div.community-card div.community-text {
683690
flex: 9;
684691
border-left: solid 1px #FFF;
685692
font-family: 'Noto Sans JP', sans-serif;
693+
display: flex;
694+
padding: 30px;
695+
flex-direction: column;
696+
justify-content: center;
686697
}
687698

688-
.community-links p {
689-
padding: 30px;
699+
div.community-card div.community-text p {
700+
flex: 1;
701+
flex-grow: 0;
690702
}
691703

692704
div.community-button {
693705
flex: 1;
694706
display: flex;
695-
align-items: center;
696-
justify-content: flex-end;
707+
flex-direction: column;
708+
align-items: end;
709+
justify-content: center;
697710
}
698711

699712
div.community-button a {
@@ -702,14 +715,24 @@ div.community-button a {
702715
font-family: 'Varela Round', sans-serif;
703716
font-weight: normal;
704717
padding: 15px;
705-
max-width: 200px;
718+
min-width: 320px;
706719
border-radius: 100px;
720+
flex-grow: 0;
721+
margin: 10px 0;
707722
}
708723

709-
div.twitter-button a {
724+
div.twitter-buttons a.twitter-button {
710725
background-color: #00B9FF;
711726
}
712727

728+
div.twitter-buttons a.mastodon-button {
729+
background-color: #2887CE;
730+
}
731+
732+
div.mastodon-button a {
733+
background-color: #2887CE;
734+
}
735+
713736
div.chat-button a {
714737
background-color: #008E58;
715738
}
@@ -718,6 +741,10 @@ div.chat-button a {
718741
color: #00B9FF;
719742
}
720743

744+
.community-card i.fa-mastodon {
745+
color: #2887CE;
746+
}
747+
721748
.community-more {
722749
display: flex;
723750
justify-content: center;
@@ -1024,7 +1051,7 @@ ul.footer-services i {
10241051
}
10251052

10261053
@media screen and (max-width: 1050px) {
1027-
.community-links > div {
1054+
.community-links > div {
10281055
display: block;
10291056
}
10301057

@@ -1033,7 +1060,7 @@ ul.footer-services i {
10331060
}
10341061

10351062
div.community-button {
1036-
justify-content: center;
1063+
align-items: center;
10371064
}
10381065

10391066
div.community-more {
@@ -1049,7 +1076,7 @@ ul.footer-services i {
10491076
flex-wrap: wrap;
10501077
}
10511078

1052-
.menu-container li {
1079+
.menu-container li {
10531080
margin: 0px 15px;
10541081
line-height: 2em;
10551082
}
@@ -1093,7 +1120,7 @@ ul.footer-services i {
10931120
border-left: none;
10941121
}
10951122

1096-
.community-links p {
1123+
div.community-card div.community-text {
10971124
padding: 30px 0px 30px 30px;
10981125
}
10991126

0 commit comments

Comments
 (0)