1111// =================================================
1212// Sidebar padding used as main desktop content padding for sidebar padding and post blocks padding too.
1313
14- // In main NexT config set `sidebar: offset: 12` option as main padding.
15- // In `source/css/_variables/Gemini.styl` there are variables for other resolutions:
16- // $content-tablet-paddin = 10px;
14+ // In `source/css/_variables/Pisces.styl` there are variable for main offset:
15+ // $sidebar-offset = 12px;
16+ // This value alse can be changed in main NexT config as `sidebar: offset: 12` option.
17+
18+ // In `source/css/_variables/base.styl` there are variables for other resolutions:
19+ // $content-tablet-padding = 10px;
1720// $content-mobile-padding = 8px;
1821// P.S. If u want to change this paddings u may set this variables into `source/css/_variables/custom.styl`.
1922
2023// So, it will 12px in Desktop, 10px in Tablets and 8px in Mobiles for all possible paddings.
2124// =================================================
2225// Read values from NexT config and set they as local variables to use as string variables (in any CSS section).
23- hexo-config ('sidebar.offset' ) is a 'unit' ? (sboffset = unit (hexo-config ('sidebar.offset' ), px )) : (sboffset = 0)
2426use_seo = hexo-config ('seo' );
2527
2628// =================================================
@@ -45,7 +47,7 @@ use_seo = hexo-config('seo');
4547// When blocks are siblings (homepage).
4648#posts > article + article {
4749 .post-block {
48- margin-top : sboffset ;
50+ margin-top : $sidebar-offset ;
4951 // Rewrite shadows & borders because all blocks have offsets.
5052 box-shadow : $box-shadow ;
5153 border-radius : $border-radius ;
@@ -56,7 +58,7 @@ use_seo = hexo-config('seo');
5658.comments {
5759 padding : $content-desktop-padding ;
5860 margin : initial ;
59- margin-top : sboffset ;
61+ margin-top : $sidebar-offset ;
6062 background : white ;
6163 box-shadow : $box-shadow ;
6264 border-radius : $border-radius ;
@@ -87,7 +89,7 @@ use_seo = hexo-config('seo');
8789 margin-bottom : initial ;
8890 top : initial ;
8991 }
90- margin : sboffset 0 0 ;
92+ margin : $sidebar-offset 0 0 ;
9193 border-top : initial ;
9294 background : white ;
9395 box-shadow : $box-shadow ;
@@ -111,7 +113,7 @@ use_seo = hexo-config('seo');
111113 & + #content > #posts {
112114 .post-block {
113115 box-shadow : $box-shadow ;
114- margin-top : sboffset ;
116+ margin-top : $sidebar-offset ;
115117 + tablet () {
116118 margin-top : $content-tablet-padding ;
117119 }
@@ -227,7 +229,7 @@ use_seo = hexo-config('seo');
227229
228230 // Components inside Posts.
229231 .post-button {
230- margin-top : sboffset ;
232+ margin-top : $sidebar-offset ;
231233 // padding-bottom : 15px;
232234 }
233235 img {
@@ -237,7 +239,7 @@ use_seo = hexo-config('seo');
237239
238240 .post-block {
239241 // Inside posts blocks content padding (default 40px).
240- padding : sboffset ;
242+ padding : $sidebar-offset ;
241243 min-height : auto ;
242244 // Rewrite shadows & borders because all blocks have offsets.
243245 box-shadow : $box-shadow ;
@@ -253,7 +255,7 @@ use_seo = hexo-config('seo');
253255
254256 .comments {
255257 margin-top : $content-mobile-padding ;
256- padding : 0 sboffset ;
258+ padding : 0 $sidebar-offset ;
257259 }
258260
259261 .pagination {
0 commit comments