diff options
author | Ailin Nemui <ailin@linux.site> | 2015-06-14 23:04:52 +0200 |
---|---|---|
committer | Ailin Nemui <ailin@linux.localdomain> | 2015-07-01 22:42:55 +0200 |
commit | aeefab4eb333d47d9d0af936e9e3f59cf86815e1 (patch) | |
tree | 993b072fc34e9449e1caac6d0e763cf5dde92a9e /_includes | |
parent | 2c5262dcacc95f80f8c4736e1210ced4b609063e (diff) | |
download | irssi.github.io-aeefab4eb333d47d9d0af936e9e3f59cf86815e1.zip |
irssi-import
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/head.html | 3 | ||||
-rw-r--r-- | _includes/header.html | 32 | ||||
-rw-r--r-- | _includes/weighted_sorted_pages.html | 5 |
3 files changed, 25 insertions, 15 deletions
diff --git a/_includes/head.html b/_includes/head.html index a96a782..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="{{ 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 dfe0a4d..ca15f93 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -18,21 +18,25 @@ {% 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="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.title }}</a> - </li> - {% else %} - <li> - <a href="{{ site.baseurl }}{{ 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/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 %} |