Skip to content

Commit 4fc0b03

Browse files
committed
Clean post footer code
Mostly, make it use a class and not decedent selector
1 parent 4586b69 commit 4fc0b03

File tree

2 files changed

+30
-37
lines changed

2 files changed

+30
-37
lines changed

assets/css/screen.css

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
114114
body {
115115
font-family: "Gibson", "Helvetica Neue", "Helvetica-Neue", helvetica, sans-serif
116116
}
117-
body .btn, body>header h1, body article header h1, body>footer .details h4, body article>footer .details h4, body #share_modal header a.close, body.user article.feature h1 a {
117+
body .btn, body>header h1, body article header h1, body>footer .details h4, body .post-footer .details h4, body #share_modal header a.close, body.user article.feature h1 a {
118118
font-family: "Gibson", "Helvetica Neue", "Helvetica-Neue", helvetica, sans-serif
119119
}
120-
body article time, body article>.meta, body article>header .count, body article>footer, body article>footer h4, body article .text, body article .text blockquote {
120+
body article time, body article>.meta, body article>header .count, body .post-footer, body article>footer h4, body article .text, body article .text blockquote {
121121
font-family: "Source Sans Pro", "Helvetica Neue", "Helvetica-Neue", helvetica, sans-serif
122122
}
123123
body.serif {
@@ -134,7 +134,7 @@ body.serif>a.btn.nav {
134134
body.serif>a.btn.nav.next span {
135135
margin-top: 2px
136136
}
137-
body.serif article time, body.serif article>.meta, body.serif article>header h1, body.serif article>header .count, body.serif article.feature h1 a, body.serif article>footer, body.serif article>footer h4 {
137+
body.serif article time, body.serif article>.meta, body.serif article>header h1, body.serif article>header .count, body.serif article.feature h1 a, body.serif .post-footer, body.serif .post-footer h4 {
138138
font-family: "FiloPro", "Georgia", "Times New Roman", serif
139139
}
140140
body.serif article .text {
@@ -862,7 +862,6 @@ body.user article .image-holder {
862862
margin: 0 auto 30px auto;
863863
overflow: hidden;
864864
max-width: 680px;
865-
/*background: #909396 url(https://roon-assets.s3.amazonaws.com/assets/image-loading-dark-1a46c68c8e26a1a16a4ce8e4d75ec33b.gif) no-repeat center center;*/
866865
-webkit-border-radius: 3px;
867866
-moz-border-radius: 3px;
868867
-ms-border-radius: 3px;
@@ -1086,20 +1085,20 @@ body>a.btn.nav.prev span {
10861085
body>a.btn.nav.loading {
10871086
color: transparent
10881087
}
1089-
body>footer, article>footer {
1088+
body>footer, .post-footer {
10901089
position: relative;
10911090
border-top: 1px solid #ededee;
10921091
padding: 50px 0;
10931092
-webkit-text-size-adjust: none;
10941093
text-rendering: optimizeLegibility
10951094
}
1096-
body>footer>.inner, article>footer>.inner {
1095+
body>footer>.inner, .post-footer>.inner {
10971096
text-align: left;
10981097
margin: 0 auto;
10991098
padding: 0 30px;
11001099
max-width: 680px
11011100
}
1102-
body>footer #btn_feed, article>footer #btn_feed {
1101+
body>footer #btn_feed, .post-footer #btn_feed {
11031102
position: absolute;
11041103
top: -18px;
11051104
left: 50%;
@@ -1112,14 +1111,14 @@ body>footer #btn_feed, article>footer #btn_feed {
11121111
padding: 9px 9px 7px 10px;
11131112
font-weight: normal
11141113
}
1115-
body>footer #btn_feed strong, article>footer #btn_feed strong {
1114+
body>footer #btn_feed strong, .post-footer #btn_feed strong {
11161115
display: none
11171116
}
1118-
body>footer #btn_feed:hover, article>footer #btn_feed:hover {
1117+
body>footer #btn_feed:hover, .post-footer #btn_feed:hover {
11191118
background-color: #ededee;
11201119
color: #21272d
11211120
}
1122-
body>footer div.vcard, article>footer div.vcard {
1121+
body>footer div.vcard, .post-footer div.vcard {
11231122
display: -moz-inline-stack;
11241123
display: inline-block;
11251124
vertical-align: middle;
@@ -1129,10 +1128,10 @@ body>footer div.vcard, article>footer div.vcard {
11291128
width: 50%;
11301129
min-height: 100px
11311130
}
1132-
body>footer div.vcard span.given-name, body>footer div.vcard span.family-name, article>footer div.vcard span.given-name, article>footer div.vcard span.family-name {
1131+
body>footer div.vcard span.given-name, body>footer div.vcard span.family-name, .post-footer div.vcard span.given-name, .post-footer div.vcard span.family-name {
11331132
white-space: nowrap
11341133
}
1135-
body>footer .photo, article>footer .photo {
1134+
body>footer .photo, .post-footer .photo {
11361135
float: left;
11371136
margin-right: 22px;
11381137

@@ -1147,7 +1146,7 @@ body>footer .photo, article>footer .photo {
11471146
background: #fff;
11481147
overflow: hidden;
11491148
}
1150-
body>footer .photo span, article>footer .photo span {
1149+
body>footer .photo span, .post-footer .photo span {
11511150
position: absolute;
11521151
background-repeat: no-repeat;
11531152
background-position: center center;
@@ -1158,43 +1157,43 @@ body>footer .photo span, article>footer .photo span {
11581157
background-size: cover;
11591158
}
11601159

1161-
body>footer .photo.circle, article>footer .photo.circle {
1160+
body>footer .photo.circle, .post-footer .photo.circle {
11621161
-webkit-border-radius: 50px;
11631162
-moz-border-radius: 50px;
11641163
-ms-border-radius: 50px;
11651164
-o-border-radius: 50px;
11661165
border-radius: 50px;
11671166
border: 1px solid rgba(33, 39, 45, 0.17);
11681167
}
1169-
body>footer .photo.circle span, article>footer .photo.circle span {
1168+
body>footer .photo.circle span, .post-footer .photo.circle span {
11701169
top: 18px;
11711170
right: 18px;
11721171
bottom: 18px;
11731172
left: 18px;
11741173
background-size: contain;
11751174
}
11761175

1177-
body>footer .photo img, article>footer .photo img {
1176+
body>footer .photo img, .post-footer .photo img {
11781177
position: absolute;
11791178
top: 0;
11801179
left: 0;
11811180
width: 1px;
11821181
height: 1px;
11831182
opacity: 0;
11841183
}
1185-
body>footer .details, article>footer .details {
1184+
body>footer .details, .post-footer .details {
11861185
padding-top: 10px;
11871186
line-height: 1.9em
11881187
}
1189-
body>footer .details h4, article>footer .details h4 {
1188+
body>footer .details h4, .post-footer .details h4 {
11901189
font-size: 20px;
11911190
font-weight: bold;
11921191
margin-bottom: 6px
11931192
}
1194-
body>footer .details h4 a, article>footer .details h4 a {
1193+
body>footer .details h4 a, .post-footer .details h4 a {
11951194
color: #21272d
11961195
}
1197-
body>footer #user_bio, article>footer #user_bio {
1196+
body>footer #user_bio, .post-footer #user_bio {
11981197
display: -moz-inline-stack;
11991198
display: inline-block;
12001199
vertical-align: middle;
@@ -1203,7 +1202,7 @@ body>footer #user_bio, article>footer #user_bio {
12031202
*display: inline;
12041203
width: 49%
12051204
}
1206-
body>footer #user_bio .inner, article>footer #user_bio .inner {
1205+
body>footer #user_bio .inner, .post-footer #user_bio .inner {
12071206
padding-left: 20px;
12081207
line-height: 1.6em;
12091208
color: #a4adb6
@@ -1338,18 +1337,18 @@ body>.no-posts [data-icon]:before {
13381337
#share_modal #pinit-btn {
13391338
margin: 20px 20px
13401339
}
1341-
html[dir=rtl] article .text, html[dir=rtl] article .text *, html[dir=rtl] article .meta, html[dir=rtl] article .time, html[dir=rtl] article>header, html[dir=rtl] article header *, html[dir=rtl] body>a.btn.nav, html[dir=rtl] body>footer *, html[dir=rtl] article>footer, html[dir=rtl] article>footer * {
1340+
html[dir=rtl] article .text, html[dir=rtl] article .text *, html[dir=rtl] article .meta, html[dir=rtl] article .time, html[dir=rtl] article>header, html[dir=rtl] article header *, html[dir=rtl] body>a.btn.nav, html[dir=rtl] body>footer *, html[dir=rtl].post-footer, html[dir=rtl].post-footer * {
13421341
text-align: right;
13431342
direction: rtl
13441343
}
13451344
html[dir=rtl] body>header *, html[dir=rtl] article>menu a#btn_comment, html[dir=rtl] #post_nav a {
13461345
direction: rtl
13471346
}
1348-
html[dir=rtl] body>a.btn.nav span, html[dir=rtl] body>footer #btn_feed span, html[dir=rtl] article>footer #user_profile>#btn_feed span, html[dir=rtl] #post_nav a span, html[dir=rtl] article>header a#home_link {
1347+
html[dir=rtl] body>a.btn.nav span, html[dir=rtl] body>footer #btn_feed span, html[dir=rtl] .post-footer #user_profile>#btn_feed span, html[dir=rtl] #post_nav a span, html[dir=rtl] article>header a#home_link {
13491348
direction: ltr;
13501349
unicode-bidi: bidi-override
13511350
}
1352-
html[dir=rtl] body>footer .image, html[dir=rtl] article>footer .image {
1351+
html[dir=rtl] body>footer .image, html[dir=rtl] .post-footer .image {
13531352
float: right;
13541353
margin-left: 22px;
13551354
margin-right: 0
@@ -1551,21 +1550,21 @@ body.touch.user article .readmore {
15511550
left: 10px;
15521551
right: inherit
15531552
}
1554-
body>footer #user_bio, body>footer #user_profile, article>footer #user_bio, article>footer #user_profile {
1553+
body>footer #user_bio, body>footer #user_profile, .post-footer #user_bio, .post-footer #user_profile {
15551554
display: block;
15561555
width: inherit
15571556
}
1558-
body>footer #user_bio .inner, body>footer #user_profile .inner, article>footer #user_bio .inner, article>footer #user_profile .inner {
1557+
body>footer #user_bio .inner, body>footer #user_profile .inner, .post-footer #user_bio .inner, .post-footer #user_profile .inner {
15591558
padding-left: 0
15601559
}
1561-
body>footer div.vcard, body>footer div.vcard, article>footer div.vcard, article>footer div.vcard {
1560+
body>footer div.vcard, body>footer div.vcard, .post-footer div.vcard, .post-footer div.vcard {
15621561
display: block;
15631562
width: inherit
15641563
}
1565-
body>footer #user_bio, article>footer #user_bio {
1564+
body>footer #user_bio, .post-footer #user_bio {
15661565
margin-top: 30px
15671566
}
1568-
body>footer #user_bio p, article>footer #user_bio p {
1567+
body>footer #user_bio p, .post-footer #user_bio p {
15691568
padding-left: 0
15701569
}
15711570
}
@@ -1695,10 +1694,4 @@ body.touch.user article .readmore {
16951694
body.noimage article {
16961695
margin-top: 24px
16971696
}
1698-
}
1699-
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
1700-
article .text span.roon-img {
1701-
background-image: url(https://roon-assets.s3.amazonaws.com/assets/image-loading-light@2x-5d07f26751af5a375b5e517559fa9f29.gif);
1702-
background-size: 34px 34px
1703-
}
1704-
}
1697+
}

post.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
{{#author}}
36-
<footer role="contentinfo">
36+
<footer class="post-footer" role="contentinfo">
3737

3838
<div class="vcard">
3939
<a href="{{@blog.url}}/rss" id="btn_feed" class="btn" title="Feed" target="_blank">

0 commit comments

Comments
 (0)