comparison default/assets/scss/components/_blog-post.scss @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1d038bc9b3d2
1 // main: ../style.scss
2 /********************************
3 *********************************
4 Blog Post
5 *********************************
6 *********************************/
7 .blog-post-single,
8 .blog-post {
9 display: inline-block;
10 figure { margin-bottom: 0 }
11 p:last-child { margin-bottom: 0 }
12 }
13
14 .blog-post-card {
15 background: #fff;
16 overflow: hidden;
17 border-radius: .5rem;
18 border: rem(1) solid $theme-border-color;
19 display: block;
20 margin-bottom: rem(30);
21
22 .blog-post-content,
23 footer,
24 header {
25 position: relative;
26 padding-left: em(30);
27 padding-right: em(30);
28 }
29
30 > figure {
31 display: flex;
32 a { flex: 1; }
33 img { width: 100%; }
34 }
35
36 header {
37 padding-top: em(25);
38 }
39
40 .blog-post-share-links {
41 @include position(absolute, 0 null null em(40) );
42 padding-left: em(40);
43 transform: translateY(-50%);
44 overflow: hidden;
45 transition: transform 0.3s ease;
46 max-width: 0;
47 height: em(40);
48
49 > li {
50 padding: 0;
51 padding-left: em(10);
52 margin-right: 0;
53 height: em(40);
54 transition: all 0.3s ease;
55 transition-delay: 0s;
56
57 &:first-child {
58 padding-left: 0;
59 @include position(absolute, 0 null null 0);
60 z-index: 2;
61 }
62
63 &:not(:first-child) {
64 opacity: 0;
65 transform: translateX(rem(-20)) rotate(0deg);
66 }
67 }
68
69 &.active,
70 &:hover {
71 max-width: rem(900);
72 > li:not(:first-child) {
73 opacity: 1;
74 transform: translateX(0);
75 }
76 li:first-child {
77 transform: rotate(360deg);
78 }
79 li {
80 @for $i from 1 through 10 {
81 &:nth-child(#{$i}) {
82 transition-delay: #{0.05*$i}s;
83 }
84 }
85 }
86 }
87 a {
88 display: inline-block;
89 color: #fff;
90 @include size(em(40));
91 text-align: center;
92 border-radius: rem(100);
93 i {
94 line-height: em(40,30);
95 font-size: em(30);
96 }
97 }
98 }
99
100 .blog-post-title {
101 margin: em(10) 0 em(20);
102 a {
103 color: $body-color;
104 &:focus,
105 &:hover {
106 color: $color-scheme;
107 }
108 }
109 }
110
111 .blog-post-tags {
112 font-size: 0.9em;
113 ul {
114 margin-left: 0;
115 }
116 ul > li {
117 padding: 0;
118 &:after { content: ',' }
119 &:last-child:after { content: '' }
120 }
121 }
122
123 .blog-post-content {
124 margin-top: 2em;
125 }
126
127 footer { padding-bottom: em(40) }
128
129 &.blog-post-single {
130 header {
131 padding-top: em(50);
132 }
133 .blog-post-content {
134 margin-bottom: em(40);
135 }
136 }
137 }
138
139 /********************************
140 *********************************
141 Comments
142 *********************************
143 *********************************/
144 .blog-post-comments {
145 .comment {
146 flex-wrap: wrap;
147 > figure {
148 margin-right: rem(30);
149 }
150 }
151 .comment-body {
152 background: $widget-bg;
153 padding: $widget-padding-y $widget-padding-x;
154 p:last-child {
155 margin-bottom: 0;
156 }
157 }
158
159 .replies {
160 margin-top: rem(30);
161 padding-left: rem(90);
162 width: 100%;
163 }
164
165 .rtl & {
166 .comment {
167 > figure {
168 margin-left: rem(30);
169 margin-right: 0;
170 }
171 }
172
173 .replies {
174 padding-left: 0;
175 padding-right: rem(90);
176 }
177 }
178 }
179
180 /********************************
181 *********************************
182 Sidebar
183 *********************************
184 *********************************/
185 .blog-page-sidebar {
186 .widget {
187 margin-bottom: em(50);
188 }
189 .widget-title {
190 margin-top: 0;
191 font-size: $h5-font-size;
192 padding-bottom: rem(20);
193 position: relative;
194 margin-bottom: rem(20);
195 &:after {
196 content: '';
197 width: rem(40);
198 height: 1px;
199 background: $color-scheme;
200 display: block;
201 @include position(absolute, null null 0 0);
202 }
203 }
204
205 .rtl & {
206 .widget-title::after {
207 @include position(absolute, null 0 0 auto);
208 }
209 }
210
211
212 .widget_tag_cloud {
213 .tagcloud {
214 a {
215 font-family: $headings-font-family;
216 line-height: 1.3;
217 }
218 }
219 }
220
221 .widget_archives {
222 ul {
223 list-style: none;
224 padding: 0;
225 }
226 li {
227 display: flex;
228 border-bottom: 1px dashed rgba($body-color, 0.3);
229 margin-bottom: .5em;
230 padding-bottom: .5em;
231 padding-bottom: .5em;
232 font-family: $headings-font-family;
233 color: $text-muted;
234 }
235 a {
236 flex: 1;
237 }
238 }
239 }