File tree 4 files changed +40
-33
lines changed
4 files changed +40
-33
lines changed Original file line number Diff line number Diff line change 9
9
<p class =" c-blog-post__date" >{{ post .date | date (' M d, Y' ) }}</p >
10
10
</header >
11
11
12
- <section class =" c-blog-post__body" >
12
+ <section class =" c-blog-post__body s-markdown " >
13
13
{% if summary %}
14
14
{{ post .content | summary }}
15
15
{% else %}
16
16
{{ post .content | anchors(
17
17
anchorBody=' <span class="sr-only">Permalink to "{heading}" section</span>' ,
18
- anchorClass=' c-blog-post__body__anchor '
18
+ anchorClass=' c-heading-anchor '
19
19
) }}
20
20
{% endif %}
21
21
</section >
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ description: I'm just another boring developer pretending to know what he's doin
84
84
{% endmacro %}
85
85
86
86
{% block content %}
87
- {% markdown %}
87
+ {% set page_content %}{% markdown %}
88
88
*[CMS]: Content Management System
89
89
90
90
# About
@@ -152,5 +152,12 @@ description: I'm just another boring developer pretending to know what he's doin
152
152
content : ' content' ,
153
153
}
154
154
) }}
155
- {% endmarkdown %}
155
+ {% endmarkdown %}{% endset %}
156
+
157
+ <div class =" s-markdown" >
158
+ {{ page_content | anchors(
159
+ anchorBody=' <span class="sr-only">Permalink to "{heading}" section</span>' ,
160
+ anchorClass=' c-heading-anchor'
161
+ ) }}
162
+ </div >
156
163
{% endblock %}
Original file line number Diff line number Diff line change 42
42
}
43
43
44
44
.c-blog-post__body {
45
- h1 , h2 , h3 ,
46
- h4 , h5 , h6 {
47
- align-items : center ;
48
- display : flex ;
49
- width : 100% ;
50
-
51
- .c-blog-post__body__anchor {
52
- @include margin (l, 2 );
53
-
54
- opacity : 0 ;
55
- font-size : 0.75em ;
56
- text-decoration : none ;
57
-
58
- & ::after {
59
- content : ' \00B6 ' ;
60
- }
61
-
62
- & :focus {
63
- opacity : 1 ;
64
- }
65
- }
66
-
67
- & :hover {
68
- .c-blog-post__body__anchor {
69
- opacity : 1 ;
70
- }
71
- }
72
- }
73
-
74
45
ul {
75
46
@include padding (l, 4 );
76
47
}
Original file line number Diff line number Diff line change 3
3
text-decoration : underline ;
4
4
}
5
5
6
+ h1 , h2 , h3 ,
7
+ h4 , h5 , h6 {
8
+ align-items : center ;
9
+ display : flex ;
10
+ width : 100% ;
11
+
12
+ .c-heading-anchor {
13
+ @include margin (l, 2 );
14
+
15
+ opacity : 0 ;
16
+ font-size : 0.75em ;
17
+ text-decoration : none ;
18
+
19
+ & ::after {
20
+ content : ' \00B6 ' ;
21
+ }
22
+
23
+ & :focus {
24
+ opacity : 1 ;
25
+ }
26
+ }
27
+
28
+ & :hover {
29
+ .c-heading-anchor {
30
+ opacity : 1 ;
31
+ }
32
+ }
33
+ }
34
+
6
35
* :last-child {
7
36
margin-bottom : 0 ;
8
37
}
You can’t perform that action at this time.
0 commit comments