Skip to content

Commit 0eaa21f

Browse files
committed
refactor: layout
1 parent e97589d commit 0eaa21f

3 files changed

Lines changed: 55 additions & 56 deletions

File tree

_layouts/default.html

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
<!DOCTYPE html>
2-
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
2+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">
33

44
{%- include head.html -%}
55

6-
<body>
6+
<body un-cloak>
77

88
{% include header.html %}
99

10-
<main class="page-content" aria-label="Content">
11-
12-
{% if layout.title == "Home" %}
13-
<div class="home-wrapper">
14-
{{ content }}
15-
</div>
16-
{% else %}
17-
<div class="wrapper">
18-
{{ content }}
19-
</div>
20-
{% endif %}
21-
22-
{% include email_signup.html %}
23-
</main>
10+
{{ content}}
2411

2512
{%- include footer.html -%}
2613

_layouts/home.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@
44
permalink: /
55
---
66

7-
{% include list-logos.html %}
7+
{% include logo_pattern.html %}
88

9-
{% include slide-testimonials.html %}
9+
<main class="page-content" aria-label="Content">
10+
<div class="home-wrapper">
11+
{% include list-logos.html %}
12+
13+
{% include slide-testimonials.html %}
1014

11-
{% include list-posts.html %}
15+
{% include list-posts.html %}
16+
17+
{% include email_signup.html %}
18+
</div>
19+
</main>

_layouts/post.html

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,53 @@
22
layout: default
33
---
44

5-
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
6-
<header class="post-header">
7-
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
8-
<p class="post-meta">
9-
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
10-
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
11-
{{ page.date | date: date_format }}
12-
</time>
13-
{%- if page.modified_date -%}
14-
~
15-
{%- assign mdate = page.modified_date | date_to_xmlschema -%}
16-
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
17-
{{ mdate | date: date_format }}
18-
</time>
19-
{%- endif -%}
20-
{%- if page.author -%}
21-
22-
{% for author in page.author %}
5+
<main class="page-content" aria-label="Content">
6+
<div class="wrapper">
7+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
8+
<header class="post-header">
9+
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
10+
<p class="post-meta">
11+
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
12+
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
13+
{{ page.date | date: date_format }}
14+
</time>
15+
{%- if page.modified_date -%}
16+
~
17+
{%- assign mdate = page.modified_date | date_to_xmlschema -%}
18+
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
19+
{{ mdate | date: date_format }}
20+
</time>
21+
{%- endif -%}
22+
{%- if page.author -%}
23+
24+
{% for author in page.author %}
2325
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
2426
<span class="p-author h-card" itemprop="name">{{ author }}</span>
2527
</span>
2628
{%- if forloop.last == false %},
2729
{% endif -%}
28-
{% endfor %}
29-
{%- endif -%}
30-
</p>
31-
</header>
30+
{% endfor %}
31+
{%- endif -%}
32+
</p>
33+
</header>
3234

33-
<div class="post-content e-content" itemprop="articleBody">
34-
{{ content }}
35-
</div>
35+
<div class="post-content e-content" itemprop="articleBody">
36+
{{ content }}
37+
</div>
3638

37-
{%- if site.disqus.shortname -%}
38-
{%- include disqus_comments.html -%}
39-
{%- endif -%}
39+
{%- if site.disqus.shortname -%}
40+
{%- include disqus_comments.html -%}
41+
{%- endif -%}
4042

41-
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
42-
</article>
43+
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
44+
</article>
4345

44-
<blockquote>
45-
<p>The source of this post can be found
46-
<a href="https://github.com/wiringbits/wiringbits.github.io/blob/master/{{page.path}}">
47-
here
48-
</a>
49-
</p>
50-
</blockquote>
46+
<blockquote>
47+
<p>The source of this post can be found
48+
<a href="https://github.com/wiringbits/wiringbits.github.io/blob/master/{{page.path}}">
49+
here
50+
</a>
51+
</p>
52+
</blockquote>
53+
</div>
54+
</main>

0 commit comments

Comments
 (0)