Skip to content

Commit 5b958c6

Browse files
committed
fix & restructure styles 2
1 parent 38af2fd commit 5b958c6

File tree

7 files changed

+53
-38
lines changed

7 files changed

+53
-38
lines changed

_layouts/base.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
{%- include header.html -%}
99

10-
{{ content }}
10+
<main class="has-global-padding is-layout-constrained" aria-label="Content">
11+
{{ content }}
12+
</main>
1113

1214
{%- include footer.html -%}
1315

_layouts/index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
---
22
layout: base
33
---
4-
5-
<main class="has-global-padding" aria-label="Content">
64
{{ content }}
7-
</main>

_layouts/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: base
33
---
4-
<main class="page-main has-global-padding is-layout-constrained">
4+
<article class="page">
55
<div class="wp-block-group alignfull has-surface-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="margin-top:0px;padding-top:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--xx-large)">
66
<h1 class="has-text-align-center wp-block-post-title">{{ page.title | escape }}</h1>
77
</div>
88
{% include featured_image.html %}
99
<div class="entry-content wp-block-post-content is-layout-flow wp-block-post-content-is-layout-flow">
1010
{{ content }}
1111
</div>
12-
</main>
12+
</article>

_layouts/post.html

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
layout: base
33
---
4-
<main class="wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-7 wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:var(--wp--preset--spacing--x-large)">
5-
<div class="wp-block-group alignfull has-surface-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--xx-large)"><h1 class="has-text-align-center wp-block-post-title">{{ page.title | escape }}</h1>
4+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
5+
<div class="wp-block-group alignfull has-surface-background-color has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained" style="padding-top:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--xx-large)">
6+
<h1 class="has-text-align-center wp-block-post-title">{{ page.title | escape }}</h1>
67

78
<div class="wp-block-group has-neutral-color has-text-color is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-5 wp-block-group-is-layout-flex">
89
<div class="wp-block-post-author"><div class="wp-block-post-author__content"><p class="wp-block-post-author__name"><a href="{{ site.data["authors"][page.author].url }}">{{ site.data["authors"][page.author].name }}</a></p></div></div>
@@ -33,31 +34,29 @@
3334
{% include featured_image.html %}
3435
<div class="entry-content wp-block-post-content is-layout-flow wp-block-post-content-is-layout-flow">
3536
{{ content }}
36-
37-
<div class="sharedaddy sd-sharing-enabled">
38-
<div class="sd-sharing">
39-
<h3 class="sd-title">Tags:</h3>
40-
<div class="taxonomy-post_tag is-style-swt-post-terms-pill wp-block-post-terms">
41-
{% for tag in page.tags %}
42-
<a href="{{ site.url }}/tag/{{ tag | slugify }}" rel="tag">{{ tag }}</a>{% if forloop.last == false %}<span class="wp-block-post-terms__separator">, </span>{% endif %}
43-
{% endfor %}
44-
</div>
45-
37+
</div>
38+
<div class="sharedaddy sd-sharing-enabled">
39+
<div class="sd-sharing">
40+
<h3 class="sd-title">Tags:</h3>
41+
<div class="taxonomy-post_tag is-style-swt-post-terms-pill wp-block-post-terms">
42+
{% for tag in page.tags %}
43+
<a href="{{ site.url }}/tag/{{ tag | slugify }}" rel="tag">{{ tag }}</a>{% if forloop.last == false %}<span class="wp-block-post-terms__separator">, </span>{% endif %}
44+
{% endfor %}
4645
</div>
47-
<div class="robots-nocontent sd-block sd-social sd-social-icon sd-sharing">
48-
<h3 class="sd-title">Share this:</h3>
49-
<div class="sd-content">
50-
{% share_group name='default' icon_size='medium' %}
51-
</div>
46+
47+
</div>
48+
<div class="robots-nocontent sd-block sd-social sd-social-icon sd-sharing">
49+
<h3 class="sd-title">Share this:</h3>
50+
<div class="sd-content">
51+
{% share_group name='default' icon_size='medium' %}
5252
</div>
5353
</div>
54+
</div>
5455

55-
{%- if site.disqus.shortname -%}
56-
{%- include disqus_comments.html -%}
57-
{%- endif -%}
58-
59-
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
56+
{%- if site.disqus.shortname -%}
57+
{%- include disqus_comments.html -%}
58+
{%- endif -%}
6059

61-
</div>
60+
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
6261
<hr class="wp-block-separator has-text-color has-outline-color has-alpha-channel-opacity has-outline-background-color has-background is-style-wide"/>
63-
</main>
62+
</article>

_sass/pages.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/* PAGES */
22

3-
.page-main {
4-
padding-bottom: var(--wp--preset--spacing--x-large)
5-
}
3+
@use "structure";
64

7-
// page block separator: separates top level blocks of the page with x-large spacing (applies to child elements of .page-main from the 2nd on)
8-
.page-main>*+* {
9-
margin-block-start: var(--wp--preset--spacing--x-large);
10-
margin-block-end: 0;
5+
.page {
6+
@extend .page-like;
117
}

_sass/posts.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
/* POSTS */
1+
/* POSTS */
2+
3+
@use "structure";
4+
5+
.post {
6+
@extend .page-like;
7+
}

_sass/structure.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ body {
3030
.surely-not-covered {
3131
padding-right: 0;
3232
}
33+
34+
.page-like {
35+
padding-bottom: var(--wp--preset--spacing--x-large);
36+
37+
> .alignfull {
38+
width: 100vw;
39+
margin-left: calc(-50vw + 50%);
40+
}
41+
42+
// page block separator: separates top level blocks of the page with x-large spacing (applies to child elements of .page-main from the 2nd on)
43+
> *+* {
44+
margin-block-start: var(--wp--preset--spacing--x-large);
45+
margin-block-end: 0;
46+
}
47+
}

0 commit comments

Comments
 (0)