File tree Expand file tree Collapse file tree 2 files changed +32
-61
lines changed
static/wagtail_code_blog/css
templates/wagtail_code_blog Expand file tree Collapse file tree 2 files changed +32
-61
lines changed Original file line number Diff line number Diff line change 1
- body * {
2
- font-weight : 400 ;
3
- line-height : 1.5 ;
4
- }
5
-
6
1
.post {
7
- display : flex;
8
- flex-direction : column;
9
- align-items : center;
10
- justify-content : center;
11
- margin : 0.2rem auto;
2
+ padding : 1rem ;
12
3
}
13
4
14
- .post .img-link {
15
- margin : 0.4rem ;
16
- width : 80% ;
5
+ .img-link {
17
6
display : flex;
18
7
align-items : center;
8
+ justify-content : center;
9
+ margin-bottom : 1.5rem ;
19
10
}
20
11
21
- .post img {
22
- object-fit : cover;
23
- border-radius : 3% ;
24
- }
25
-
26
- .post-info-container {
27
- display : flex;
28
- flex-direction : column;
29
- justify-content : space-around;
30
- margin-left : 1rem ;
31
- }
32
-
33
- .post-info-container h2 {
34
- margin-bottom : 0 ;
35
- margin-top : 0.5rem ;
36
- }
37
-
38
- .author-name {
39
- font-weight : bold;
12
+ img {
13
+ width : 100% ;
40
14
}
41
15
42
16
.date {
43
17
color : # 6C757D ;
44
18
}
45
19
46
-
47
20
.post * {
48
21
font-family : "Merriweather" , serif;
49
22
}
@@ -53,45 +26,47 @@ body * {
53
26
}
54
27
55
28
.post-intro {
56
- margin : 0.5rem ;
57
- }
58
-
59
- .post-info {
60
- display : flex;
61
- flex-direction : column;
62
- justify-content : space-around;
29
+ margin-top : 0.5rem ;
63
30
}
64
31
65
- .post-info span {
66
- margin : 0 0.5 rem ;
32
+ .author-name , . date {
33
+ margin-bottom : 0 ;
67
34
}
68
35
69
- . post a {
36
+ a {
70
37
color : black;
71
38
text-decoration : none;
72
39
}
73
40
74
- . post a : hover {
75
- text-decoration : none ;
41
+ a : hover {
42
+ color : # 484848 ;
76
43
}
77
44
78
45
hr {
79
46
background-color : # 989898 ;
80
47
height : 1px ;
81
48
border : none;
82
- margin-top : 0 ;
49
+ margin-top : 1rem ;
50
+ margin-bottom : 1rem ;
83
51
}
84
52
85
53
/* Large devices (desktops, 992px and up) */
86
54
@media (min-width : 992px ) {
87
55
88
56
.post {
57
+ display : flex;
58
+ align-items : center;
89
59
flex-direction : row;
90
60
justify-content : stretch;
91
61
}
92
62
93
- .post .img-link {
94
- width : 15rem ;
95
- height : 10rem ;
63
+ .img-link {
64
+ margin-bottom : 0rem ;
65
+ margin-right : 1.5rem ;
66
+ width : 240px ;
67
+ }
68
+
69
+ img {
70
+ width : 240px ;
96
71
}
97
72
}
Original file line number Diff line number Diff line change 4
4
< div class ="post ">
5
5
{% if post.image_url %}
6
6
< a class ="img-link " href ="{% pageurl post %} ">
7
- < img src ="{{ post.image_url }} " class =" img-fluid " alt ="Responsive image ">
7
+ < img src ="{{ post.image_url }} " alt ="{{ post.title }} ">
8
8
</ a >
9
9
{% endif %}
10
10
< a href ="{% pageurl post %} ">
11
- < div class ="post-info-container ">
12
- < h2 class ="post-title "> {{ post.title }}</ h2 >
13
- {% if post.intro %}
14
- < p class ="post-intro "> {{ post.intro }}</ p >
15
- {% endif %}
16
- < div class ="post-info ">
17
- < span class ="author-name "> {{ post.author_name }}</ span >
18
- < span class ="date "> {{ post.date }}</ span >
19
- </ div >
20
- </ div >
11
+ < h2 class ="post-title "> {{ post.title }}</ h2 >
12
+ {% if post.intro %}
13
+ < p class ="post-intro "> {{ post.intro }}</ p >
14
+ {% endif %}
15
+ < p class ="author-name "> < b > {{ post.author_name }}</ b > </ p >
16
+ < p class ="date "> {{ post.date }}</ p >
21
17
</ a >
22
18
</ div >
23
- < hr >
19
+ < hr / >
24
20
{% endfor %}
You can’t perform that action at this time.
0 commit comments