123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- {%- apply spaceless -%}{%- set search_tooltip = 'The search function is primitive. It only searches for the literal string as entered. – "fluffy cloud" will only search the exact string "fluffy cloud" – and not "fluffy" OR "cloud". – Searches are case insensitive, tags and some special characters are stripped.' -%}<!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
- <title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
- {%- if meta.description -%}<meta name="description" content="{{- meta.description -}}"/>
- {# i don't understand what og:... is good for. i hope i'm doing this right. #}
- <meta property="og:description" content="{{- meta.description -}}"/>{%- endif -%}
- {%- if meta.robots -%}
- <meta name="robots" content="{{- meta.robots -}}">{%- endif -%}
- {# i don't understand what og:... is good for. i hope i'm doing this right. #}
- <meta property="og:type" content="{{- current_page.meta.template -}}"/>
- <meta property="og:title" content="{{ current_page.title }} | {{ site_title }}"/>
- <meta property="og:url" content="{{- current_page.url -}}"/>
- <meta property="og:site_name" content="{{- site_title -}}"/>
- {%- if current_page -%}
- <link rel="canonical" href="{{- current_page.url -}}" />
- {%- endif -%}
- <link rel="stylesheet" href="{{-theme_url-}}/css/style.css" type="text/css" />
- <style>*{scrollbar-color:{%- if config.tb_col.scrollbar_fg -%}{{- config.tb_col.scrollbar_fg -}}{%- else -%}{{- "#aaa" -}}{%- endif -%} {%- if config.tb_col.def_bg -%}{{- config.tb_col.def_bg -}}{%- else -%}{{- "#eee" -}}{%- endif -%}}::-webkit-scrollbar-thumb{background:{%- if config.tb_col.scrollbar_fg -%}{{- config.tb_col.scrollbar_fg -}}{%- else -%}{{- "#aaa" -}}{%- endif -%}}::-webkit-scrollbar-track{background:{%- if config.tb_col.def_bg -%}{{- config.tb_col.def_bg -}}{%- else -%}{{- "#eee" -}}{%- endif -%}}body{color:{%- if config.tb_col.def_fg -%}{{- config.tb_col.def_fg -}}{%- else -%}{{- "#222" -}}{%- endif -%};background:{%- if config.tb_col.def_bg -%}{{- config.tb_col.def_bg -}}{%- else -%}{{- "#eee" -}}{%- endif -%}}.tag_cloud li a,h1,h2,h3,h4,h5,h6{color:{%- if config.tb_col.h_fg -%}{{- config.tb_col.h_fg -}}{%- else -%}{{- "#444" -}}{%- endif -%}}code,pre{color:{%- if config.tb_col.code_fg -%}{{- config.tb_col.code_fg -}}{%- else -%}{{- "#73001d" -}}{%- endif -%}}a,article.list h1:first-child,label[for=menu-icon]:hover,.four04,.p01-contact .required label:after,a>code{color:{%- if config.tb_col.a_fg -%}{{- config.tb_col.a_fg -}}{%- else -%}{{- "#003a73" -}}{%- endif -%}}code::selection,pre::selection{background:{%- if config.tb_col.code_fg -%}{{- config.tb_col.code_fg -}}{%- else -%}{{- "#73001d" -}}{%- endif -%};color:{%- if config.tb_col.box_bg -%}{{- config.tb_col.box_bg -}}{%- else -%}{{- "#ccc" -}}{%- endif -%}}::selection{background:{%- if config.tb_col.def_fg -%}{{- config.tb_col.def_fg -}}{%- else -%}{{- "#222" -}}{%- endif -%};color:{%- if config.tb_col.def_bg -%}{{- config.tb_col.def_bg -}}{%- else -%}{{- "#eee" -}}{%- endif -%}}.p01-contact input[type=submit]:not([type=radio]):not([type=checkbox]),.p01-contact input[type=button]:not([type=radio]):not([type=checkbox]){color:{%- if config.tb_col.def_bg -%}{{- config.tb_col.def_bg -}}{%- else -%}{{- "#eee" -}}{%- endif -%};background:{%- if config.tb_col.a_fg -%}{{- config.tb_col.a_fg -}}{%- else -%}{{- "#003366" -}}{%- endif -%}}#toc,code,pre,blockquote,kbd,aside,article.list:hover,input[type=checkbox]:checked~label,nav#menu-icon,input,textarea,select,.boxed{background:{%- if config.tb_col.box_bg -%}{{- config.tb_col.box_bg -}}{%- else -%}{{- "#ccc" -}}{%- endif -%}}blockquote,kbd,aside,pre,.border,input,textarea,select{border-color:{%- if config.tb_col.box_border -%}{{- config.tb_col.box_border -}}{%- else -%}{{- "#999" -}}{%- endif -%}}hr,details{border-color:{%- if config.tb_col.box2_bg -%}{{- config.tb_col.box2_bg -}}{%- else -%}{{- "#bbb" -}}{%- endif -%}}header,footer,.small span,input.submit{background:{%- if config.tb_col.box2_bg -%}{{- config.tb_col.box2_bg -}}{%- else -%}{{- "#bbb" -}}{%- endif -%}}input,textarea,select{color:{%- if config.tb_col.input_fg -%}{{- config.tb_col.input_fg -}}{%- else -%}{{- "#111" -}}{%- endif -%}}input:focus,textarea:focus,select:focus{border-color:{%- if config.tb_col.input_hi -%}{{- config.tb_col.input_hi -}}{%- else -%}{{- "#333" -}}{%- endif -%}}@media screen and (min-width:768px){nav#menu-icon{background:unset}}</style>
- {%- if meta.template == config.TableOfContent.template or not config.TableOfContent.template -%}
- {%- if meta.toc_alt -%}<link rel="stylesheet" href="{{- theme_url -}}/css/{{- meta.toc_alt -}}.css" type="text/css" />
- {%- else -%}<link rel="stylesheet" href="{{- theme_url -}}/css/TableOfContent.css" type="text/css" />
- {%- endif -%}
- {%- endif -%}
- {%- if meta.css_extra -%}<link rel="stylesheet" href="{{- theme_url -}}/css/{{- meta.css_extra -}}.css" type="text/css" />{%- endif -%}
- {%- if config.tagblog.custom_header -%}{%- include config.tagblog.custom_header -%}{%- endif -%}
- </head>
- <body>
- <header>
- <div class="inner flexbox">
- {%- include 'includes/topmenu.twig' ignore missing -%}
- {%- if config.tagblog.site_logo -%}<a href="{{- "index"|link -}}"><img src="{{- config.tagblog.site_logo -}}" alt="{{- site_title -}}"></a>{%- endif -%}
- <div class="title">
- <a href="{{- "index"|link -}}">{{- site_title -}}</a>
- </div>
- </div>
- </header>
- <div class="inner">
- <section id="sidebar">
- {# looping over all pages to pick out what we need (i.e. pages with tags) #}
- {%- set tag_count = {} -%} {# tag_count contains: tag : count of occurences #}
- {%- set tag_pages = {} -%} {# tag_pages contains: tag : page ids of occurences hash '#' separated #}
- {%- set aut_count = {} -%} {# aut_count contains: author : count of occurences #}
- {%- set aut_pages = {} -%} {# aut_pages contains: author : page ids of occurences hash '#' separated #}
- {%- set tbpages = {} -%} {# contains ALL pages to be considered, saves some cycles later on #}
- {%- for page in pages if page.meta.tags or page.meta.author -%}
- {%- if page.meta.tags -%}
- {%- set tbpages = tbpages|merge([page]) -%}
- {%- for tag in page.meta.tags|split(',') -%}
- {# tag_count contains: tag : count of occurences #}
- {%- set tag_count = tag_count|merge({(tag):(tag_count[tag] + 1)}) -%}
- {# tag_pages contains: tag : page ids of occurences hash '#' separated #}
- {%- set tag_pages = tag_pages|merge( { (tag) : (tag_pages[tag] ~ '#' ~ page.id) } ) -%}
- {%- endfor -%}
- {%- endif -%}
- {%- if page.meta.author -%}
- {%- set aut_count = aut_count|merge({(page.meta.author):(aut_count[page.meta.author] + 1)}) -%}
- {%- set aut_pages = aut_pages|merge({(page.meta.author):(aut_pages[page.meta.author]~'#'~page.id)}) -%}
- {%- endif -%}
- {%- endfor -%}
- {# sort tag_count into tag_sorting, according to config options #}
- {%- set tag_sorting = {} -%}
- {%- if config.tagblog.tagsort.method == 'numerical' -%}
- {%- set tag_sorting = tag_count|sort -%}
- {%- elseif config.tagblog.tagsort.method == 'alphabetical' -%}
- {%- for tag in tag_count|keys|sort -%}
- {%- set tag_sorting = tag_sorting|merge({(tag): tag_count[tag] }) -%}
- {%- endfor -%}
- {%- endif -%}
- {# ... and sort it back into tag_count array #}
- {%- if config.tagblog.tagsort.reverse -%}
- {%- set tag_count = tag_sorting|reverse -%}
- {%- else -%}
- {%- set tag_count = tag_sorting -%}
- {%- endif -%}
- <input id="menu-icon" type="checkbox"/>
- {# There used to be a fontawesome-kindof hamburger icon here, and a span besides it - but less is more #}
- <label for="menu-icon">Menu</label>
- <nav id="menu-icon"> {# this nav's visibility is controled by the checkbox above! (mobile only) #}
- {%- include 'includes/sidebar-top.twig' ignore missing -%}
- {# Tag List #}
- {%- if config.tagblog.taglist.enabled and tag_count -%}
- <div class="tag_list">
- {%- if config.tagblog.taglist.title -%}<h2>{{- config.tagblog.taglist.title -}}</h2>{%- endif -%}
- <ul>
- {%- for tag,total in tag_count -%}
- <li>
- <a href="/tags?q={{- tag -}}">{{- tag -}}{%- if config.tagblog.tagcount.enabled -%}<span> ({{- total -}})</span>{%- endif -%}</a>
- </li>
- {%- endfor -%}
- </ul>
- </div>
- {%- endif -%}
- {# Tag Cloud #}
- {%- if config.tagblog.tagcloud.enabled and tag_count -%}
- {# Levels Validation #}
- {%- if max(tag_count) < config.tagblog.tagcloud.maxoccur -%}
- {%- set tagmaxoccur = max(tag_count) -%}
- {%- else -%}
- {%- set tagmaxoccur = config.tagblog.tagcloud.maxoccur -%}
- {%- endif -%}
- {# Render Tag Cloud #}
- <div class="tag_cloud">
- {%- if config.tagblog.tagcloud.title -%}<div>{{- config.tagblog.tagcloud.title -}}</div>{%- endif -%}
- <ul>
- {%- for tag,total in tag_count -%}
- {%- if total > tagmaxoccur -%}{%- set size = tagmaxoccur -%}{%- else -%}{%- set size = total -%}
- {%- endif -%}
- {%- if size == 1 -%}{%- set fontsize = config.tagblog.tagcloud.fontsizemin -%}
- {%- else -%}
- {# calculate tag font size - https://stackoverflow.com/a/3717340 #}
- {%- set fontsize = ( (size / tagmaxoccur) * ( config.tagblog.tagcloud.fontsizemax - config.tagblog.tagcloud.fontsizemin ) + config.tagblog.tagcloud.fontsizemin ) -%}
- {%- endif -%}
- <li style="font-size:{{- fontsize -}}rem;">
- <a href="/tags?q={{- tag -}}">{{- tag -}}{%- if config.tagblog.tagcount.enabled -%}<span>{{- total -}}</span>{%- endif -%}</a></li>
- {%- endfor -%}
- </ul>
- </div>
- {%- endif -%}
- <hr />
- <div class="clearfix">
- {%- if config.tagblog.search.enabled -%}
- {# searches go to the /search.md page #}
- <form class="search paragraph" id="search_form" action="/search">
- {# <label for="search_input">Search» </label> #}
- <span><input title='{{ search_tooltip }}' class="submit" type="submit" value="Search" /></span>
- <span><input pattern=".{0{{- config.tagblog.search.minlength -}},}" required title="{{- config.tagblog.search.minlength -}} characters minimum" size="15" type="text" id="search_input" name="q" /></span>
- </form>
- {%- endif -%}
- {%- if config.tagblog.feed.enabled -%}
- <div class="rss paragraph"><a href="/feed">RSS Feed</a></div>
- {%- endif -%}
- {%- include 'includes/sidebar-bottom.twig' ignore missing -%}
- </div>
- </nav>
- </section>
- <section id="content">
- {%- block content -%}
- {%- set count = tbpages|length -%}
- <h3>All Articles ({{- count -}})</h3>
- {%- set paging_url_base = current_page.url ~ '?' -%}
- {%- set paging_array = tbpages -%}
- {%- include 'includes/paging.twig' -%}
- {%- endblock -%}
- </section>
- </div>
- <footer>
- {%- include 'includes/footer.twig' ignore missing -%}
- </footer>
- </body>
- <!-- made with tagblog version 2020-09-26 -->
- </html>{%- endapply -%}
|