Skip to content

Commit b6543ef

Browse files
committed
Simplify layout logic
1 parent 097a32a commit b6543ef

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

_layouts/about.html

+35-23
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,44 @@
11
---
2-
layout: page
2+
layout: default
33
---
44

5-
<div class="row">
6-
<div class="col">
7-
{{ content }}
8-
</div>
9-
{% if page.profile %}
10-
<div class="profile col-4 {% if page.profile.align == 'left' %}order-first{% endif %}">
11-
{% if page.profile.image %}
12-
<img class="img-fluid z-depth-1 rounded" src="{{ page.profile.image | prepend: '/assets/img/' | relative_url }}">
13-
{% endif %}
14-
{% if page.profile.address %}
15-
<div class="address">
16-
{{ page.profile.address }}
5+
<div class="post">
6+
7+
<header class="post-header">
8+
{% assign name = site.title | split: ' ' %}
9+
<h1 class="post-title"><span class="font-weight-bold">{{ name | first }}</span> {{ name | last }}</h1>
10+
<p class="post-description">{{ page.description }}</p>
11+
</header>
12+
13+
<article>
14+
<div class="row">
15+
<div class="col">
16+
{{ content }}
17+
</div>
18+
{% if page.profile %}
19+
<div class="profile col-4 {% if page.profile.align == 'left' %}order-first{% endif %}">
20+
{% if page.profile.image %}
21+
<img class="img-fluid z-depth-1 rounded" src="{{ page.profile.image | prepend: '/assets/img/' | relative_url }}">
22+
{% endif %}
23+
{% if page.profile.address %}
24+
<div class="address">
25+
{{ page.profile.address }}
26+
</div>
27+
{% endif %}
1728
</div>
18-
{% endif %}
29+
{% endif %}
1930
</div>
31+
32+
{% if page.news %}
33+
{% include news.html %}
2034
{% endif %}
21-
</div>
2235

23-
{% if page.news %}
24-
{% include news.html %}
25-
{% endif %}
36+
{% if page.social %}
37+
<div class="social">
38+
{% include social.html %}
39+
<div class="contact-note">{{ site.contact_note }}</div>
40+
</div>
41+
{% endif %}
42+
</article>
2643

27-
{% if page.social %}
28-
<div class="social">
29-
{% include social.html %}
30-
<div class="contact-note">{{ site.contact_note }}</div>
3144
</div>
32-
{% endif %}

_layouts/page.html

-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
<div class="post">
55

66
<header class="post-header">
7-
{% if page.title == 'about' %}
8-
{% assign name = site.title | split: ' ' %}
9-
<h1 class="post-title"><span class="font-weight-bold">{{ name | first }}</span> {{ name | last }}</h1>
10-
{% else %}
117
<h1 class="post-title">{{ page.title }}</h1>
12-
{% endif %}
138
<p class="post-description">{{ page.description }}</p>
149
</header>
1510

0 commit comments

Comments
 (0)