summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/head.html7
-rw-r--r--_includes/header.html38
-rw-r--r--_includes/ordinal.html3
-rw-r--r--_includes/postmeta.html39
-rw-r--r--_includes/weighted_sorted_pages.html5
5 files changed, 53 insertions, 39 deletions
diff --git a/_includes/head.html b/_includes/head.html
index b1c8ce5..72c308f 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -3,9 +3,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
+ <title>{% if page.title %}{% unless page.title contains 'Irssi' %}Irssi - {% endunless %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">
- <link rel="stylesheet" href="/assets/css/bootstrap.min.css">
- <link rel="stylesheet" href="/assets/css/style.css">
+ <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/bootstrap.min.css">
+ <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
+ <link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/irssi.png" >
</head>
diff --git a/_includes/header.html b/_includes/header.html
index e902722..ca15f93 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -7,32 +7,36 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="/">
- <img alt="Irssi Logo" class="navbar-irssi-logo" src="/assets/logo.png">
+ <a class="navbar-brand" href="{{ site.baseurl }}/">
+ <img alt="Irssi Logo" class="navbar-irssi-logo" src="{{ site.baseurl }}/assets/logo.png">
{% comment %}{{ site.title }}{% endcomment %}
</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
- <li{% if page.url == "/index.html" %} class="active"{% endif %}><a href="/">News</a></li>
+ <li{% if page.url == "/index.html" %} class="active"{% endif %}><a href="{{ site.baseurl }}/">News</a></li>
{% comment %}
Exclude the news feed and the paginated news pages.
{% endcomment %}
- {% for node in site.pages %}
- {% if node.title != "News" and node.title != "News Feed" %}
- {% if page.url == node.url %}
- <li class="active">
- <a href="{{ node.url }}" class="active">{{ node.title }}</a>
- </li>
- {% else %}
- <li>
- <a href="{{ node.url }}">{{ node.title }}</a>
- </li>
- {% endif %}
- {% endif %}
+ {% capture pageidx %}{% include weighted_sorted_pages.html %}{% endcapture %}{% assign pageidx = pageidx | strip_newlines | split:',' %}
+ {% assign ap = site.pages %}
+ {% for it in pageidx %}{% assign p_idx = it | times:1 %}{% assign node = ap[p_idx] %}{% comment %}
+ {% endcomment %}
+ {% if node.categories contains "_nav" %}
+ {% if page.url == node.url %}
+ <li class="active">
+ <a href="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.title }}</a>
+ </li>
+ {% else %}
+ <li>
+ <a href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a>
+ </li>
+ {% endif %}
+ {% endif %}
{% endfor %}
- <li><a href="http://scripts.irssi.org/">Scripts</a></li>
- <li><a href="https://github.com/irssi/irssi/issues">Bugs</a></li>
+ <li><a rel="external" href="/themes/">Themes</a></li>
+ <li><a rel="external" href="http://scripts.irssi.org/">Scripts</a></li>
+ <li><a rel="external" href="https://github.com/irssi/irssi/issues">Bugs</a></li>
</ul>
</div>
</div>
diff --git a/_includes/ordinal.html b/_includes/ordinal.html
index c942963..aac7b74 100644
--- a/_includes/ordinal.html
+++ b/_includes/ordinal.html
@@ -1,5 +1,4 @@
-{% assign ordinalize=include.ordinalize %}
-{% if ordinalize == "1" or ordinalize == "21" or ordinalize == "31" %}st
+{% assign ordinalize=include.ordinalize %}{% if ordinalize == "1" or ordinalize == "21" or ordinalize == "31" %}st
{% elsif ordinalize == "2" or ordinalize == "22" %}nd
{% elsif ordinalize == "3" or ordinalize == "23" %}rd
{% else %}th{% endif %}
diff --git a/_includes/postmeta.html b/_includes/postmeta.html
index d71b943..4a4d5b3 100644
--- a/_includes/postmeta.html
+++ b/_includes/postmeta.html
@@ -1,19 +1,24 @@
{% assign node=include.node %}
-<p>
- <small>
- Posted by
- {% if node.web %}
- <a href="{{ node.web }}">{{ node.author }}</a>
- {% elsif node.email %}
- <a href="mailto:{{ node.email }}">{{ node.author }}</a>
- {% else %}
- {{ node.author }}
- {% endif %}
+{% if node.author or node.date %}
+ <p>
+ <small>
+ Posted
+ {% if node.author %}
+ by
+ {% if node.web %}
+ <a href="{{ node.web }}">{{ node.author }}</a>
+ {% elsif node.email %}
+ <a href="mailto:{{ node.email }}">{{ node.author }}</a>
+ {% else %}
+ {{ node.author }}
+ {% endif %}
+ {% endif %}
- {% if node.date %}
- {% assign ordinalize = node.date | date: "%-d" %}
- on {{ node.date | date: "%B %-d" }}<sup>{% include ordinal.html ordinalize=ordinalize %}</sup>
- {{ node.date | date: "%Y" }}
- {% endif %}
- </small>
-</p>
+ {% if node.date %}
+ {% assign ordinalize = node.date | date: "%-d" %}
+ on {{ node.date | date: "%B %-d" }}<sup>{% include ordinal.html ordinalize=ordinalize %}</sup>
+ {{ node.date | date: "%Y" }}
+ {% endif %}
+ </small>
+ </p>
+{% endif %}
diff --git a/_includes/weighted_sorted_pages.html b/_includes/weighted_sorted_pages.html
new file mode 100644
index 0000000..7b564f0
--- /dev/null
+++ b/_includes/weighted_sorted_pages.html
@@ -0,0 +1,5 @@
+{% capture sorted %}{% for node in site.pages %}{% assign top = node.categories | join:'~' | split:'~' | sort | first | remove_first:'_' | plus:10000 %}|{% if top != 10000 %}{{ top }}{% endif %}|{{ node.url }}|{{ forloop.index0 | plus:10000 }}*{% endfor %}{% endcapture %}{% comment %}
+{% endcomment %}{% capture sorted %}{{ sorted | split:'*' | sort | join:'*' }}{% endcapture %}{% comment %}
+{% endcomment %}{% assign sortedarr = sorted | split:'*' %}{% comment %}
+{% endcomment %}{% for item in sortedarr %}{% assign i2 = item | split:'|' %}{% assign iv = i2[3] | minus:10000 %}{{ iv }}{% unless forloop.last %},{% endunless %}{% comment %}
+{% endcomment %}{% endfor %}