Skip to content

Commit f743765

Browse files
committed
update page structure
1 parent 15f59b5 commit f743765

File tree

6 files changed

+106
-113
lines changed

6 files changed

+106
-113
lines changed

_layouts/page.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
layout: base
33
---
44
<article class="page">
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="margin-top:0px;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>
7-
</div>
5+
<header class="content-header">
6+
<h1>{{ page.title | escape }}</h1>
7+
</header>
88
{% include featured_image.html %}
9-
<div class="entry-content wp-block-post-content is-layout-flow wp-block-post-content-is-layout-flow">
9+
<div class="content-body">
1010
{{ content }}
11-
</div>
11+
</div>
1212
</article>

_layouts/post.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
layout: base
33
---
44
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
5-
<header class="post-header">
5+
<header class="content-header">
66
<h1>{{ page.title | escape }}</h1>
77

8-
<div class="post-attributes">
9-
<div class="post-author"><a href="{{ site.data["authors"][page.author].url }}">{{ site.data["authors"][page.author].name }}</a></div>
8+
<div class="content-attributes">
9+
<div class="content-author"><a href="{{ site.data["authors"][page.author].url }}">{{ site.data["authors"][page.author].name }}</a></div>
1010
<p>·</p>
11-
<div class="post-date">
11+
<div class="content-date">
1212
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
1313
{% assign pdate = page.date | date_to_xmlschema %}
1414
<time class="dt-published" datetime="{{ pdate }}" itemprop="datePublished">{{ pdate | date: date_format }}</time>
@@ -20,28 +20,28 @@ <h1>{{ page.title | escape }}</h1>
2020
</div>
2121
<p>·</p>
2222
{% for category in page.categories %}
23-
<div class="post-category"><a href="{{ site.url }}/{{ category | downcase }}/" rel="tag">{{category}}</a></div>
23+
<div class="content-category"><a href="{{ site.url }}/{{ category | downcase }}/" rel="tag">{{category}}</a></div>
2424
{% if forloop.last == false %}<p>·</p>{% endif %}
2525
{% endfor %}
2626
</div>
2727
</header>
2828
{% include featured_image.html %}
29-
<div class="post-content e-content" itemprop="articleBody">
29+
<div class="content-body e-content" itemprop="articleBody">
3030
{{ content }}
3131
</div>
32-
<footer class="post-footer">
33-
<div class="post-tags">
32+
<footer class="content-footer">
33+
<div class="content-tags">
3434
<h3>Tags:</h3>
35-
<div class="post-tag-list">
35+
<div class="content-tag-list">
3636
{% for tag in page.tags %}
3737
<a href="{{ site.url }}/tag/{{ tag | slugify }}" rel="tag">{{ tag }}</a>{% if forloop.last == false %}<span class="separator">, </span>{% endif %}
3838
{% endfor %}
3939
</div>
4040

4141
</div>
42-
<div class="post-sharing">
42+
<div class="content-sharing">
4343
<h3>Share this:</h3>
44-
<div class="post-sharing-list">
44+
<div class="content-sharing-list">
4545
{% share_group name='default' icon_size='medium' %}
4646
</div>
4747
</div>

_sass/pages.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

_sass/posts.scss

Lines changed: 0 additions & 84 deletions
This file was deleted.

_sass/structure.scss

Lines changed: 90 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,104 @@ body {
4444
}
4545
}
4646

47-
.post-title {
47+
.content-title {
4848
box-sizing: border-box;
4949
word-break: break-word;
5050
}
5151

52-
.post-author {
52+
.content-author {
5353
box-sizing: border-box;
5454
}
5555

56-
.post-date {
56+
.content-date {
5757
@extend .centered-flex;
5858

5959
box-sizing: border-box;
6060
gap: var(--wp--preset--spacing--xxx-small);
61-
}
61+
}
62+
63+
.content-header {
64+
@extend .alignfull;
65+
@extend .is-layout-constrained;
66+
67+
padding-top: var(--wp--preset--spacing--xx-large);
68+
padding-bottom: var(--wp--preset--spacing--xx-large);
69+
background-color: var(--wp--preset--color--surface);
70+
71+
>h1 {
72+
@extend .content-title;
73+
74+
text-align: center;
75+
}
76+
77+
>.content-attributes {
78+
@extend .centered-flex;
79+
80+
color: var(--wp--preset--color--neutral);
81+
font-size: var(--wp--preset--font-size--x-small);
82+
83+
flex-wrap: nowrap;
84+
gap: var(--wp--preset--spacing--xx-small);
85+
justify-content: center;
86+
87+
a {
88+
text-decoration: none;
89+
}
90+
}
91+
}
92+
93+
.content-body {
94+
@extend .flow-document;
95+
}
96+
97+
.content-footer {
98+
* {
99+
margin-bottom: var(--wp--preset--spacing--x-small);
100+
}
101+
102+
h3 {
103+
margin: 0 0 var(--wp--preset--spacing--x-small) 0;
104+
display: inline-block;
105+
line-height: 1.2;
106+
font-size: 9pt;
107+
font-weight: 700;
108+
}
109+
110+
.content-tag-list {
111+
font-size: var(--wp--preset--font-size--x-small);
112+
113+
a {
114+
text-decoration: none;
115+
}
116+
}
117+
118+
.content-sharing-list {
119+
ul {
120+
padding: 0 !important;
121+
margin: 0 !important;
122+
list-style: none !important;
123+
124+
li {
125+
display: inline-block;
126+
margin: 0 var(--wp--preset--spacing--xx-small) var(--wp--preset--spacing--x-small) 0;
127+
padding: 0;
128+
}
129+
}
130+
}
131+
}
132+
133+
@media print {
134+
.content-sharing {
135+
display: none;
136+
}
137+
}
138+
139+
/* overrides for content types */
140+
141+
.post {
142+
@extend .page-like;
143+
}
144+
145+
.page {
146+
@extend .page-like;
147+
}

_sass/style.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ $site_url: "" !default;
66

77
@use "common";
88
@use "structure";
9-
@use "pages";
10-
@use "posts";
119
@use "post-list";

0 commit comments

Comments
 (0)