-
Notifications
You must be signed in to change notification settings - Fork 3
/
bk_blog.sfc
106 lines (105 loc) · 2.33 KB
/
bk_blog.sfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
<article class="bk-blog container container--margin" role="article">
{% include 'sfc--bk-blog-title.html.twig' with {'title': title} %}
<div class="bk-blog__byline">
{{ time | date('F jS, Y') }}
</div>
<div class="bk-blog__tags">
{% for tag in tags %}
<a class="bk-blog__tag" href="{{ url('<front>') }}search?field_tags={{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
<div class="bk-blog__image">{{ image }}</div>
<div class="bk-blog__text bk-text">
{{ text }}
</div>
</article>
</template>
<style>
.bk-blog__byline {
grid-row: 2;
grid-column: 2 / 5;
margin-bottom: var(--spacer-1);
font-size: 1rem;
line-height: 1rem;
font-style: italic;
display: flex;
align-items: center;
}
.bk-blog__tags {
display: flex;
grid-column: 5 / 10;
grid-row: 2;
justify-content: flex-end;
margin-bottom: var(--spacer-1);
}
.bk-blog__tag {
color: var(--font-color);
font-size: .8rem;
margin-right: 5px;
padding: 5px 10px;
border: 1px solid var(--border-color);
border-radius: 5px;
max-width: 50px;
white-space: pre;
text-overflow: ellipsis;
overflow: hidden;
transition: background-color .2s;
font-weight: normal;
}
.bk-blog__tag:hover,
.bk-blog__tag:focus {
color: var(--font-color);
background-color: var(--border-color);
}
.bk-blog__tag:last-child {
margin-right: 0;
}
.bk-blog__image {
grid-column: 2 / 10;
grid-row: 3;
}
.bk-blog__image img {
display: block;
width: 100%;
height: auto;
}
.bk-blog__text {
grid-row: 4;
grid-column: 3 / 9;
margin-top: var(--spacer-2);
}
.bk-blog .bk-blog-title {
grid-column: 1 / 11;
margin-bottom: var(--spacer-2);
}
@media screen and (max-width: 1000px) {
.bk-blog__text {
grid-column: 2 / 10;
}
}
@media screen and (max-width: 560px) {
.bk-blog__text {
grid-column: 1 / 11;
margin-top: var(--spacer-2);
}
.bk-blog__byline {
grid-column: 1 / 11;
margin-top: 0;
}
.bk-blog__image {
grid-column: 1 / 11;
}
.bk-blog__tags {
grid-column: 5 / 11;
}
.bk-blog__tag:nth-child(n+3) {
display: none;
}
}
@media screen and (max-width: 400px) {
.bk-blog__tag {
display: none;
}
}
</style>