Skip to content

Commit 1ea788f

Browse files
committed
use layout and asset
1 parent 4dea228 commit 1ea788f

File tree

7 files changed

+147
-0
lines changed

7 files changed

+147
-0
lines changed

_includes/analytics.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-85933208-2"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'UA-85933208-2');
9+
</script>

_includes/footer.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<footer class="site-footer h-card">
2+
<data class="u-url" href="{{ "/" | relative_url }}"></data>
3+
4+
<div class="wrapper">
5+
6+
<h2 class="footer-heading">{{ site.title | escape }}</h2>
7+
8+
<div class="footer-col-wrapper">
9+
<div class="footer-col footer-col-1">
10+
<ul class="contact-list">
11+
<li class="p-name">
12+
{%- if site.author -%}
13+
{{ site.author | escape }}
14+
{%- else -%}
15+
{{ site.title | escape }}
16+
{%- endif -%}
17+
</li>
18+
{%- if site.email -%}
19+
<li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li>
20+
{%- endif -%}
21+
</ul>
22+
</div>
23+
24+
<div class="footer-col footer-col-2">
25+
{%- include social.html -%}
26+
</div>
27+
28+
<div class="footer-col footer-col-3">
29+
<p>{{- site.description | escape -}}</p>
30+
</div>
31+
</div>
32+
33+
</div>
34+
35+
</footer>

_includes/head.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
{%- seo -%}
6+
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
7+
{%- feed_meta -%}
8+
{%- if jekyll.environment == 'production' and site.google_analytics -%}
9+
{%- include google-analytics.html -%}
10+
{%- endif -%}
11+
</head>

_includes/header.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<header class="site-header" role="banner">
2+
3+
<div class="wrapper">
4+
{%- assign default_paths = site.pages | map: "path" -%}
5+
{%- assign page_paths = site.header_pages | default: default_paths -%}
6+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
7+
8+
{%- if page_paths -%}
9+
<nav class="site-nav">
10+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
11+
<label for="nav-trigger">
12+
<span class="menu-icon">
13+
<svg viewBox="0 0 18 15" width="18px" height="15px">
14+
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
15+
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
16+
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
17+
</svg>
18+
</span>
19+
</label>
20+
21+
<div class="trigger">
22+
{%- for path in page_paths -%}
23+
{%- assign my_page = site.pages | where: "path", path | first -%}
24+
{%- if my_page.title -%}
25+
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
26+
{%- endif -%}
27+
{% endfor -%}
28+
</div>
29+
</nav>
30+
{%- endif -%}
31+
</div>
32+
</header>

_layouts/default.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
3+
4+
{%- include head.html -%}
5+
6+
<body>
7+
8+
{%- include header.html -%}
9+
10+
<main class="page-content" aria-label="Content">
11+
<div class="wrapper">
12+
{{ content }}
13+
</div>
14+
</main>
15+
16+
{%- include footer.html -%}
17+
18+
{%- include analytics.html -%}
19+
20+
</body>
21+
22+
</html>

assets/main.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# Only the main Sass file needs front matter (the dashes are enough)
3+
---
4+
5+
@import "minima";

assets/minima-social-icons.svg

Lines changed: 33 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)