🎉 Initial commit

This commit is contained in:
piharpi
2019-03-24 17:47:48 +07:00
parent 09ac49afec
commit 2c26100c06
50 changed files with 2213 additions and 37 deletions

15
_includes/blog.html Normal file
View File

@@ -0,0 +1,15 @@
<h4 class="home-title"><span role="img" aria-label="book">📘</span>blog posts</h4>
<div class="content">
{% for post in site.blog %}
<article class="list-post blog">
<header class="list-post-header">
<h2 class="list-post-title">
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h2>
</header>
<section class="list-post-excerpt">
<p class="list-post-excerpt"> — {{ post.excerpt | strip_html | normalize_whitespace | truncatewords: 15, '...' }} </p>
</section>
</article>
{% endfor %}
</div>

12
_includes/cover.html Normal file
View File

@@ -0,0 +1,12 @@
<div class="site-intro">
{% assign url = page.url %}
{% if url == "/" %}
<figure class="intro-image">
<img src="{{ site.author.avatar }}" alt="{{ site.author.username }}">
</figure>
{%endif%}
<div class="intro-name">{{ site.title }}</div>
<p class="intro-description">{{ site.description }}</p>
</div>
{% include header.html %}

View File

@@ -0,0 +1,21 @@
<div class="disqus">
<div id="disqus_thread"></div>
</div>
<script src="/assets/js/disqus.js"></script>
<script>
var options =
{
scriptUrl: '//domain.disqus.com/embed.js',
laziness: 0.5,
throttle: 250,
disqusConfig: function () {
this.page.title = '{{ page.title }}';
this.page.url = 'https://yourweb.tld{{ page.url }}';
this.page.identifier = '{{ page.id }}';
}
};
disqusLoader('.disqus', options);
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

8
_includes/footer.html Normal file
View File

@@ -0,0 +1,8 @@
<footer class="site-footer">
<p><span class="crafted">Crafted with 🍩 in Banyuwangi, <b>IDN</b>.</span></p>
</footer>
<script src="/assets/js/galite.js"></script>
<script>
var galite = galite || {};
galite.UA = "{{ site.google_analytics }}";
</script>

56
_includes/head.html Normal file
View File

@@ -0,0 +1,56 @@
<head prefix="og:http://ogp.me/ns#">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#24292e">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="{{ site.title }}">
<meta name="apple-mobile-web-app-status-bar-style" content="#fff">
<meta name="apple-mobile-web-app-title" content="{{ site.title }}">
<title>{% if page.title %}{{ page.title | escape }} | {{ site.title }}{% else %}{{ site.title | escape }}{% endif %}</title>
<link rel="alternate" href="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html' }}" hreflang="{{ site.lang }}">
<link rel="canonical" href="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html' }}">
{% if paginator.previous_page %}
<link rel="prev" href="{{ paginator.previous_page_path | absolute_url | remove: 'index.html' | remove: '.html' }}">
{% endif %}
{% if paginator.next_page %}
<link rel="next" href="{{ paginator.next_page_path | absolute_url | remove: 'index.html' | remove: '.html' }}">
{% endif %}
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}">
<meta name="referrer" content="no-referrer-when-downgrade">
<meta property="fb:app_id" content="{{ site.fb_appid }}">
<meta property="og:site_name" content="{% if page.title %}{{ page.title | escape }} | {{ site.author.username }}{% else %}{{ site.title | escape }}{% endif %}">
<meta property="og:title" content="{% if page.title %}{{ page.title | escape }} | {{ site.author.username }}{% else %}{{ site.title | escape }}{% endif %}">
{% if page.location %}
<meta property="og:type" content="article">
<meta property="article:publisher" content="https://web.facebook.com/{{site.author.username}}">
{% else %}
<meta property="og:type" content="website">
{% endif %}
<meta property="og:url" content="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html'}}">
<meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}">
{% if page.image %}
<meta property="og:image" content="{{ page.image }}">
{% else %}
<meta property="og:image" content="{{ site.image }}">
{% endif %}
<meta property="og:image:width" content="640" />
<meta property="og:image:height" content="640" />
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{% if page.title %}{{ page.title | escape }} | {{ site.author.username }}{% else %}{{ site.title | escape }}{% endif %}">
<meta name="twitter:url" content="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html'}}">
<meta name="twitter:site" content="@{{site.author.username}}">
<meta name="twitter:creator" content="@{{site.author.username}}">
<meta name="twitter:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}"/>
{% if page.image %}
<meta name="twitter:image" content="{{ page.image }}">
{% else %}
<meta name="twitter:image" content="{{ site.image }}">
{% endif %}
{% feed_meta %}
<link rel="shortcut icon" type="image/png" sizes="32x32" href="{{ site.icon }}"/>
<link rel="apple-touch-icon" href="{{ site.icon }}">
<link rel="stylesheet" href="/assets/css/style.css">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>

25
_includes/header.html Normal file
View File

@@ -0,0 +1,25 @@
<header class="site-header" role="navigation">
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger"/>
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px" style="background: white;">
<path fill="#fff" 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"/>
<path fill="#fff" 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"/>
<path fill="#fff" 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"/>
</svg>
</span>
</label>
<div class="trigger">
<div class="trigger-container">
{% assign url = page.url%}
{% for menu in site.data.menus %}
{% if url == menu.url %}
<a class="page-link active" href="{{ menu.url }}">{{ menu.title }}</a>
{% else %}
<a class="page-link" href="{{ menu.url }}">{{ menu.title }}</a>
{% endif %}
{% endfor %}
</div>
</nav>
</header>

14
_includes/pagination.html Normal file
View File

@@ -0,0 +1,14 @@
<div class="pagination">
{% if paginator.previous_page %}
<a class="page-previous" href="{{ paginator.previous_page_path }}" class="previous">
<span aria-hidden="true"></span>
NEWER POSTS
</a>
{% endif %}
<span class="page_number">PAGE {{ paginator.page }} OF {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a class="page-next" href="{{ paginator.next_page_path }}" class="next">OLDER POSTS
<span aria-hidden="true"></span>
</a>
{% endif %}
</div>

14
_includes/post-nav.html Normal file
View File

@@ -0,0 +1,14 @@
<aside class="post-nav">
{% if page.previous %}
<a class="post-nav-item post-nav-prev" href="{{ page.previous | relative_url }}">
<h4>Previous</h4>
<span>{{ page.previous.title }}</span>
</a>
{% endif %}
{% if page.next %}
<a class="post-nav-item post-nav-next" href="{{ page.next | relative_url }}">
<h4>Next</h4>
<span>{{ page.next.title }}</span>
</a>
{% endif %}
</aside>

16
_includes/tags.html Normal file
View File

@@ -0,0 +1,16 @@
{% for tag in site.tags %}
{% capture tag_name %}{{ tag | first }}{% endcapture %}
<h4 class="home-title" id="{{ tag_name | downcase | slugify }}" class="category-head">{{ tag_name }}</h4>
<div class="content">
{% for post in site.tags[tag_name] %}
<article class="list-post tips">
<header class="list-post-header tips">
<h2 class="list-post-title"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2>
</header>
<small class="list-post-meta tips-time">
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.categories | first | capitalize }}</time>
</small>
</article>
{% endfor %}
</div>
{% endfor %}

20
_includes/tips.html Normal file
View File

@@ -0,0 +1,20 @@
<h4 class="home-title"><span role="img" aria-label="coffee">☕️</span>programming tips</h4>
<div class="content">
{% for post in site.tips %}
<article class="list-post tips">
<header class="list-post-header tips">
<h2 class="list-post-title">
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h2>
</header>
<small class="list-meta">
{% if post.tags != empty %}
{% assign tags = post.tags %}
{% for tag in tags %}
<a class="tag" href="{{site.url}}/tags/#{{tag | downcase | slugify}}">{{tag | downcase }}</a>{% unless forloop.last %},{% endunless %}
{% endfor %}
{% endif %}
</small>
</article>
{% endfor %}
</div>