initial commit, add Publish, add minimal theme, add content
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
<div class="alert alert-{{ include.style }}" role="alert">
|
||||
{{ include.content }}
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
{% if page.comments != false %}
|
||||
<section>
|
||||
<h2>Comments</h2>
|
||||
|
||||
</section>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
© {{ site.time | date: '%Y' }}.
|
||||
<a href="{{ "/LICENSE.md" | relative_url }}">MIT License.</a>
|
||||
</p>
|
||||
@@ -0,0 +1,5 @@
|
||||
{% if post.last_modified_at %}
|
||||
<span class="badge bg-secondary">{% octicon sync height:12 class:"" %} {{ post.last_modified_at | date: "%Y-%m-%d" }}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">{{ post.date | date: "%Y-%m-%d" }}</span>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,2 @@
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "/favicon.png" | relative_url }}" />
|
||||
<link rel="shortcut icon" href="{{ "/favicon.png" | relative_url}}" />
|
||||
@@ -0,0 +1,26 @@
|
||||
<head>
|
||||
<link href="https://gmpg.org/xfn/11" rel="profile" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Enable responsiveness on mobile devices-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
|
||||
|
||||
<title>
|
||||
{% if page.title == "Home" %}
|
||||
{{ site.title }}{% if site.tagline %} · {{ site.tagline }}{% endif %}
|
||||
{% else %}
|
||||
{{ page.title }} · {{ site.title }}
|
||||
{% endif %}
|
||||
</title>
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
|
||||
|
||||
<!-- Icons -->
|
||||
{% include favicons.html %}
|
||||
|
||||
<!-- RSS -->
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ site.feed.path | default: 'feed.xml' | relative_url }}" />
|
||||
|
||||
</head>
|
||||
@@ -0,0 +1,5 @@
|
||||
<header class="row py-3">
|
||||
<div class="col">
|
||||
<h1 class="display-1">{{ page.title }}</h1>
|
||||
</div>
|
||||
</header>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{% comment %}
|
||||
Dynamically generate list of links to all category pages
|
||||
{% endcomment %}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-expanded="false">Categories</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% assign pages_list = site.pages|sort:"sidebar_sort_order" %}
|
||||
{% for node in pages_list %}
|
||||
{% if node.title != null %}
|
||||
{% if node.layout == "category" %}
|
||||
<li><a class="dropdown-item {% if page.url == node.url %} active{% endif %}" href="{{ node.url | relative_url }}">{{ node.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<nav class="navbar navbar-dark bg-dark navbar-expand-md ">
|
||||
<div class="container-fluid">
|
||||
{% if site.sidebar_home_link %}
|
||||
<a class="nav-link navbar-brand {% if page.url == '/' %} active{% endif %}" href="{{ "/" | relative_url }}"><img src="/favicon.png" width="30" height="30" alt=""> </a>
|
||||
{% endif %}
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation-toggle" aria-controls="navigation-toggle" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navigation-toggle">
|
||||
<div class="navbar-nav">
|
||||
{% include nav/tags.html %}
|
||||
|
||||
{% comment %}
|
||||
The code below dynamically generates a sidebar nav of pages with
|
||||
`sidebar_link: true` in the front-matter. See readme for usage.
|
||||
{% endcomment %}
|
||||
|
||||
{% include nav/pages.html %}
|
||||
{% include nav/categories.html %}
|
||||
|
||||
{% if tags_page %}
|
||||
<a class="nav-link{% if page.url == '/tags' %} active{% endif %}" title="Tags" aria-label="Tags" href="{{ tags_page.url | relative_url }}">Tags</a>
|
||||
{% endif %}
|
||||
<a class="nav-link" title="Subscribe" aria-label="Subscribe" href="{{ site.feed.path | default: 'feed.xml' | relative_url }}">RSS</a>
|
||||
{% if site.author.flair %}
|
||||
<span>{{ site.author.flair }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,8 @@
|
||||
{% assign pages_list = site.pages|sort:"sidebar_sort_order" %}
|
||||
{% for node in pages_list %}
|
||||
{% if node.title != null %}
|
||||
{% if node.sidebar_link %}
|
||||
<a class="nav-link{% if page.url == node.url %} active{% endif %}" href="{{ node.url | relative_url }}">{{ node.title }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,9 @@
|
||||
{% comment %}
|
||||
Check if we have tag or search pages page active before linking to it.
|
||||
{% endcomment %}
|
||||
{% assign tags_page = false %}
|
||||
{% for node in site.pages %}
|
||||
{% if node.layout == "tags" %}
|
||||
{% assign tags_page = node %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,48 @@
|
||||
{% if paginator.total_pages > 1 %}
|
||||
<nav aria-label="page navigation">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ul class="pagination justify-content-center">
|
||||
{% if paginator.previous_page %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ paginator.previous_page_path | relative_url }}">←</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">←</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for page in (1..paginator.total_pages) %}
|
||||
{% if page == paginator.page %}
|
||||
|
||||
<li class="page-item active" aria-current="page">
|
||||
<span class="page-link">
|
||||
{{ page }}
|
||||
</span>
|
||||
</li>
|
||||
{% elsif page == 1 %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ '/' | relative_url }}">{{ page }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if paginator.next_page %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ paginator.next_page_path | relative_url }}">→</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">→</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="card-subtitle mb-2 text-muted">
|
||||
{% if include.post.last_modified_at %}
|
||||
<span class="">{{ include.post.date | date: "%Y-%m-%d" }}</span> •
|
||||
<span class="">{% octicon sync height:12 class:"" %} Updated: {{ include.post.last_modified_at | date: "%Y-%m-%d" }}</span>
|
||||
{% else %}
|
||||
<span class="">{{ include.post.date | date: "%Y-%m-%d" }}</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="post-categories">
|
||||
{% for category in include.post.categories %}
|
||||
•
|
||||
|
||||
{% comment %}
|
||||
Check if this category has a corresponding page before decide
|
||||
to link to it. This is an O(n^2) operations so consider removing
|
||||
it and linking for all categories (or no categories) if this
|
||||
site has a lot of pages and/or a lot of categories.
|
||||
{% endcomment %}
|
||||
{% assign category_page = false %}
|
||||
{% for node in site.pages %}
|
||||
{% if node.category == category or node.title == category %}
|
||||
{% assign category_page = node %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if category_page %}
|
||||
<a href="{{ category_page.url | relative_url }}">{{ category_page.title | default: category_page.category }}</a>
|
||||
{% else %}
|
||||
{{ category }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</span>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="py-3">
|
||||
{% comment %}
|
||||
Check if we have a tags page active before linking to it.
|
||||
{% endcomment %}
|
||||
{% assign tags_page = false %}
|
||||
{% for node in site.pages %}
|
||||
{% if node.layout == "tags" %}
|
||||
{% assign tags_page = node %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for tag in include.post.tags %}
|
||||
{% if tags_page %}<a href="{{ tags_page.url | relative_url }}#{{ tag | slugify }}">{% endif %}<span class="btn btn-sm btn-secondary">{% octicon tag height:12 class:"" %} {{ tag }}</span>{% if tags_page %}</a>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<section>
|
||||
<h2>Related Posts</h2>
|
||||
<ul>
|
||||
{% for post in site.related_posts limit:3 %}
|
||||
<li>
|
||||
<a href="{{ post.url | relative_url }}"> {{ post.title }}</a>
|
||||
{% include date-badges.html %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="">
|
||||
<h3 class="">
|
||||
<a href="{{ repository.html_url }}">
|
||||
{{ repository.name }}
|
||||
</a>
|
||||
</h3>
|
||||
<div>
|
||||
{{ repository.description }}
|
||||
</div>
|
||||
<div>
|
||||
{% if repository.stargazers_count %}
|
||||
<span class="">
|
||||
<svg style="fill: #767676" class="octicon octicon-star" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path></svg>
|
||||
{{ repository.stargazers_count }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if repository.forks_count %}
|
||||
<span class="">
|
||||
<svg style="fill: #767676" octicon octicon-git-branch" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 5c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v.3c-.02.52-.23.98-.63 1.38-.4.4-.86.61-1.38.63-.83.02-1.48.16-2 .45V4.72a1.993 1.993 0 0 0-1-3.72C.88 1 0 1.89 0 3a2 2 0 0 0 1 1.72v6.56c-.59.35-1 .99-1 1.72 0 1.11.89 2 2 2 1.11 0 2-.89 2-2 0-.53-.2-1-.53-1.36.09-.06.48-.41.59-.47.25-.11.56-.17.94-.17 1.05-.05 1.95-.45 2.75-1.25S8.95 7.77 9 6.73h-.02C9.59 6.37 10 5.73 10 5zM2 1.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2C1.35 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2zm0 12.41c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm6-8c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
|
||||
{{ repository.forks_count }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<script src="{{ "/assets/js/bootstrap.min.js" | relative_url }}" crossorigin="anonymous"></script>
|
||||
Reference in New Issue
Block a user