Skip to content

Commit 15f59b5

Browse files
committed
update post structure
1 parent 5b958c6 commit 15f59b5

File tree

9 files changed

+255
-951
lines changed

9 files changed

+255
-951
lines changed

_layouts/post.html

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,55 @@
22
layout: base
33
---
44
<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>
5+
<header class="post-header">
6+
<h1>{{ page.title | escape }}</h1>
77

8-
<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">
9-
<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>
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>
1010
<p>·</p>
11-
<div class="wp-block-post-date">
11+
<div class="post-date">
1212
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
1313
{% assign pdate = page.date | date_to_xmlschema %}
14-
{%- if page.modified_date %}<span class="meta-label">Published:</span>{% endif %}
15-
<time class="dt-published" datetime="{{ pdate }}" itemprop="datePublished">
16-
{{ pdate | date: date_format }}
17-
</time>
14+
<time class="dt-published" datetime="{{ pdate }}" itemprop="datePublished">{{ pdate | date: date_format }}</time>
1815
{%- if page.modified_date -%}
19-
<p>·</p>
20-
<span class="meta-label">Updated:</span>
16+
<span class="meta-label">(updated:
2117
{%- assign mdate = page.modified_date | date_to_xmlschema %}
22-
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
23-
{{ mdate | date: date_format }}
24-
</time>
25-
{%- endif -%}
18+
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">{{ mdate | date: date_format }}</time>)</span>
19+
{%- endif -%}
2620
</div>
2721
<p>·</p>
2822
{% for category in page.categories %}
29-
<div class="taxonomy-category wp-block-post-terms"><a href="{{ site.url }}/{{ category | downcase }}/" rel="tag">{{category}}</a></div>
23+
<div class="post-category"><a href="{{ site.url }}/{{ category | downcase }}/" rel="tag">{{category}}</a></div>
3024
{% if forloop.last == false %}<p>·</p>{% endif %}
3125
{% endfor %}
3226
</div>
33-
</div>
27+
</header>
3428
{% include featured_image.html %}
35-
<div class="entry-content wp-block-post-content is-layout-flow wp-block-post-content-is-layout-flow">
29+
<div class="post-content e-content" itemprop="articleBody">
3630
{{ content }}
3731
</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">
32+
<footer class="post-footer">
33+
<div class="post-tags">
34+
<h3>Tags:</h3>
35+
<div class="post-tag-list">
4236
{% 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 %}
37+
<a href="{{ site.url }}/tag/{{ tag | slugify }}" rel="tag">{{ tag }}</a>{% if forloop.last == false %}<span class="separator">, </span>{% endif %}
4438
{% endfor %}
4539
</div>
4640

4741
</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">
42+
<div class="post-sharing">
43+
<h3>Share this:</h3>
44+
<div class="post-sharing-list">
5145
{% share_group name='default' icon_size='medium' %}
5246
</div>
5347
</div>
54-
</div>
48+
</footer>
5549

5650
{%- if site.disqus.shortname -%}
5751
{%- include disqus_comments.html -%}
5852
{%- endif -%}
5953

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

_plugins/update_post_data.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Based on: https://stackoverflow.com/a/26616937/26530
2+
module Jekyll
3+
class UpdatePostData < Jekyll::Generator
4+
5+
def generate(site)
6+
@site = site
7+
site.posts.docs.each { |post| updatePostData post }
8+
end
9+
10+
private
11+
12+
def updatePostData(post)
13+
if (post.data.key?("modified_date"))
14+
post.data["last_modified_at"] = post.data["modified_date"]
15+
end
16+
end
17+
18+
end
19+
end

_posts/2024-02-08-from-specflow-to-reqnroll-why-and-how.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: "From SpecFlow to Reqnroll: Why and How"
44
date: 2024-02-08
5-
last_modified_at: 2024-02-16
5+
modified_date: 2024-02-16
66
categories: News
77
tags: Migration OpenSource SpecFlow VisualStudio
88
image: reqnroll-logo-bubbles.jpg

_sass/common.scss

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/* COMMON RULES */
2+
3+
.has-global-padding {
4+
padding-right: var(--wp--style--root--padding-right);
5+
padding-left: var(--wp--style--root--padding-left);
6+
7+
>.alignfull {
8+
margin-right: calc(var(--wp--style--root--padding-right) * -1);
9+
margin-left: calc(var(--wp--style--root--padding-left) * -1);
10+
}
11+
}
12+
13+
:root :where(.is-layout-constrained)> :first-child {
14+
margin-block-start: 0;
15+
}
16+
17+
:root :where(.is-layout-constrained)> :last-child {
18+
margin-block-end: 0;
19+
}
20+
21+
:root :where(.is-layout-constrained)>* {
22+
margin-block-start: var(--wp--preset--spacing--x-small);
23+
margin-block-end: 0;
24+
}
25+
26+
.is-layout-constrained {
27+
28+
>.alignleft {
29+
float: left;
30+
margin-inline-start: 0;
31+
margin-inline-end: 2em;
32+
}
33+
34+
>.alignright {
35+
float: right;
36+
margin-inline-start: 2em;
37+
margin-inline-end: 0;
38+
}
39+
40+
>.aligncenter {
41+
margin-left: auto !important;
42+
margin-right: auto !important;
43+
}
44+
45+
>.alignwide {
46+
max-width: var(--wp--style--global--wide-size);
47+
}
48+
49+
> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
50+
max-width: var(--wp--style--global--content-size);
51+
margin-left: auto !important;
52+
margin-right: auto !important;
53+
}
54+
}
55+
56+
// clone of old is-flex-layout
57+
.centered-flex {
58+
display: flex;
59+
flex-wrap: wrap;
60+
align-items: center;
61+
gap: var(--wp--preset--spacing--x-small);
62+
63+
> :is(*, div) {
64+
margin: 0;
65+
}
66+
}
67+
68+
// clone of is-layout-flow
69+
.flow-document {
70+
> :first-child {
71+
margin-block-start: 0;
72+
}
73+
74+
> :last-child {
75+
margin-block-end: 0;
76+
}
77+
78+
>* {
79+
margin-block-start: var(--wp--preset--spacing--x-small);
80+
margin-block-end: 0;
81+
}
82+
83+
>.alignleft {
84+
float: left;
85+
margin-inline-start: 0;
86+
margin-inline-end: 2em;
87+
}
88+
89+
>.alignright {
90+
float: right;
91+
margin-inline-start: 2em;
92+
margin-inline-end: 0;
93+
}
94+
95+
>.aligncenter {
96+
margin-left: auto !important;
97+
margin-right: auto !important;
98+
}
99+
}
100+
101+
.separator {
102+
white-space: pre-wrap
103+
}

0 commit comments

Comments
 (0)