Skip to content

Commit c821c0c

Browse files
committed
layouts 업데이트
1 parent 34eead6 commit c821c0c

17 files changed

+275
-112
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ codekit-config.json
1111
example/_site
1212
Gemfile.lock
1313
node_modules
14-
npm-debug.log*
14+
npm-debug.log*
15+
.jekyll-cache

Diff for: _config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ defaults:
253253
path: ""
254254
type: posts
255255
values:
256-
layout: post
256+
layout: single
257257
author_profile: true
258258
read_time: true
259259
comments: # true

Diff for: _layouts/archive-taxonomy.html

100755100644
+16-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,27 @@
33
author_profile: false
44
---
55

6+
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
7+
{% include page__hero.html %}
8+
{% elsif page.header.video.id and page.header.video.provider %}
9+
{% include page__hero_video.html %}
10+
{% endif %}
11+
12+
{% if page.url != "/" and site.breadcrumbs %}
13+
{% unless paginator %}
14+
{% include breadcrumbs.html %}
15+
{% endunless %}
16+
{% endif %}
17+
618
<div id="main" role="main">
719
{% include sidebar.html %}
820

921
<div class="archive">
10-
<h1 class="page__title">{{ page.title }}</h1>
22+
{% unless page.header.overlay_color or page.header.overlay_image %}
23+
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
24+
{% endunless %}
1125
{% for post in page.posts %}
1226
{% include archive-single.html %}
1327
{% endfor %}
1428
</div>
15-
</div>
29+
</div>

Diff for: _layouts/archive.html

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<div class="archive">
2121
{% unless page.header.overlay_color or page.header.overlay_image %}
22-
<h1 class="page__title">{{ page.title }}</h1>
22+
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
2323
{% endunless %}
2424
{{ content }}
2525
</div>

Diff for: _layouts/categories.html

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: archive
3+
---
4+
5+
{{ content }}
6+
7+
{% assign categories_max = 0 %}
8+
{% for category in site.categories %}
9+
{% if category[1].size > categories_max %}
10+
{% assign categories_max = category[1].size %}
11+
{% endif %}
12+
{% endfor %}
13+
14+
<ul class="taxonomy__index">
15+
{% for i in (1..categories_max) reversed %}
16+
{% for category in site.categories %}
17+
{% if category[1].size == i %}
18+
<li>
19+
<a href="#{{ category[0] | slugify }}">
20+
<strong>{{ category[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
21+
</a>
22+
</li>
23+
{% endif %}
24+
{% endfor %}
25+
{% endfor %}
26+
</ul>
27+
28+
{% assign entries_layout = page.entries_layout | default: 'list' %}
29+
{% for i in (1..categories_max) reversed %}
30+
{% for category in site.categories %}
31+
{% if category[1].size == i %}
32+
<section id="{{ category[0] | slugify | downcase }}" class="taxonomy__section">
33+
<h2 class="archive__subtitle">{{ category[0] }}</h2>
34+
<div class="entries-{{ entries_layout }}">
35+
{% for post in category.last %}
36+
{% include archive-single.html type=entries_layout %}
37+
{% endfor %}
38+
</div>
39+
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
40+
</section>
41+
{% endif %}
42+
{% endfor %}
43+
{% endfor %}

Diff for: _layouts/category.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: archive
3+
---
4+
5+
{{ content }}
6+
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include posts-category.html taxonomy=page.taxonomy type=entries_layout %}
10+
</div>

Diff for: _layouts/collection.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: archive
3+
---
4+
5+
{{ content }}
6+
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=entries_layout %}
10+
</div>

Diff for: _layouts/compress.html

100755100644
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
# Jekyll layout that compresses HTML
3-
# v3.0.2
3+
# v3.1.0
44
# http://jch.penibelst.de/
55
# © 2014–2015 Anatol Broder
66
# MIT License
77
---
88

99
{% capture _LINE_FEED %}
10-
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
10+
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

Diff for: _layouts/default.html

100755100644
+16-8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
<!doctype html>
55
<!--
6-
Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose
7-
Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
6+
Minimal Mistakes Jekyll Theme 4.20.2 by Michael Rose
7+
Copyright 2013-2020 Michael Rose - mademistakes.com | @mmistakes
88
Free for personal and commercial use under the MIT license
9-
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
9+
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
1010
-->
1111
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js">
1212
<head>
@@ -15,16 +15,24 @@
1515
</head>
1616

1717
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
18+
{% include_cached skip-links.html %}
19+
{% include_cached browser-upgrade.html %}
20+
{% include_cached masthead.html %}
1821

19-
{% include browser-upgrade.html %}
20-
{% include masthead.html %}
22+
<div class="initial-content">
23+
{{ content }}
24+
</div>
2125

22-
{{ content }}
26+
{% if site.search == true %}
27+
<div class="search-content">
28+
{% include_cached search/search_form.html %}
29+
</div>
30+
{% endif %}
2331

24-
<div class="page__footer">
32+
<div id="footer" class="page__footer">
2533
<footer>
2634
{% include footer/custom.html %}
27-
{% include footer.html %}
35+
{% include_cached footer.html %}
2836
</footer>
2937
</div>
3038

Diff for: _layouts/home.html

100755100644
+14-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22
layout: archive
33
---
44

5+
{{ content }}
6+
57
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
68

7-
{% for post in paginator.posts %}
8-
{% include archive-single.html %}
9-
{% endfor %}
9+
{% if paginator %}
10+
{% assign posts = paginator.posts %}
11+
{% else %}
12+
{% assign posts = site.posts %}
13+
{% endif %}
14+
15+
{% assign entries_layout = page.entries_layout | default: 'list' %}
16+
<div class="entries-{{ entries_layout }}">
17+
{% for post in posts %}
18+
{% include archive-single.html type=entries_layout %}
19+
{% endfor %}
20+
</div>
1021

1122
{% include paginator.html %}

Diff for: _layouts/post.html

-75
This file was deleted.

Diff for: _layouts/posts.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: archive
3+
---
4+
5+
{{ content }}
6+
7+
<ul class="taxonomy__index">
8+
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
9+
{% for year in postsInYear %}
10+
<li>
11+
<a href="#{{ year.name }}">
12+
<strong>{{ year.name }}</strong> <span class="taxonomy__count">{{ year.items | size }}</span>
13+
</a>
14+
</li>
15+
{% endfor %}
16+
</ul>
17+
18+
{% assign entries_layout = page.entries_layout | default: 'list' %}
19+
{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
20+
{% for year in postsByYear %}
21+
<section id="{{ year.name }}" class="taxonomy__section">
22+
<h2 class="archive__subtitle">{{ year.name }}</h2>
23+
<div class="entries-{{ entries_layout }}">
24+
{% for post in year.items %}
25+
{% include archive-single.html type=entries_layout %}
26+
{% endfor %}
27+
</div>
28+
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
29+
</section>
30+
{% endfor %}

0 commit comments

Comments
 (0)