all repos — nasg @ 0f7eb328c0056a5f5bdb9fb1725884608ab04668

templates/block_header_close.html (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
    <style media="all">
        {% include 'style-dark.css' %}
    </style>
    <style id="css_alternative" media="none">
        {% include 'style-light.css' %}
    </style>
    <style media="print">
        {% include 'style-print.css' %}
    </style>
    <script>
        var current = localStorage.getItem("stylesheet");
        if (current) {
            document.querySelector('#css_alternative').setAttribute("media", current);
        }

        function toggleStylesheet(trigger){
            var setto = 'all';
            var e = document.querySelector('#css_alternative');
            if (e.getAttribute("media") == 'all') {
                setto = 'none';
            }
            localStorage.setItem("stylesheet", setto);
            e.setAttribute("media", setto);
        }
    </script>
</head>
<body>

<header class="content-header" id="main-header">
    <nav class="content-navigation">
        <ul>
            <li>
{% set cssclass = '' %}
{% if taxonomy is defined and taxonomy.name == '' %}
    {% set cssclass = 'active' %}
{% endif %}
                <a title="home" href="/" class="{{ cssclass }}">
                    <svg class="icon" width="16" height="16"><use xlink:href="#icon-home" /></svg>
                    home
                </a>
            </li>
{% set cssclass = '' %}
{% if (post is defined and post.category ==  'photo' ) or ( taxonomy is defined and taxonomy.name == 'photo' ) %}
    {% set cssclass = 'active' %}
{% endif %}
            <li>
                <a title="photos" href="/category/photo/" class="{{ cssclass }}">
                    <svg class="icon" width="18" height="16"><use xlink:href="#icon-photo" /></svg>
                    photos
                </a>
            </li>
{% set cssclass = '' %}
{% if (post is defined and post.category ==  'journal' ) or ( taxonomy is defined and taxonomy.name == 'journal' ) %}
    {% set cssclass = 'active' %}
{% endif %}
            <li>
                <a title="journal" href="/category/journal/" class="{{ cssclass }}">
                    <svg class="icon" width="16" height="16"><use xlink:href="#icon-journal" /></svg>
                    journal
                </a>
            </li>
{% set cssclass = '' %}
{% if (post is defined and post.category ==  'article' ) or ( taxonomy is defined and taxonomy.name == 'article' ) %}
    {% set cssclass = 'active' %}
{% endif %}
            <li>
                <a title="IT" href="/category/article/" class="{{ cssclass }}">
                    <svg class="icon" width="16" height="16"><use xlink:href="#icon-article" /></svg>
                    IT
                </a>
            </li>
{% set cssclass = '' %}
{% if (post is defined and post.category ==  'note' ) or ( taxonomy is defined and taxonomy.name == 'note' ) %}
    {% set cssclass = 'active' %}
{% endif %}
            <li>
                <a title="notes" href="/category/note/" class="{{ cssclass }}">
                    <svg class="icon" width="16" height="16"><use xlink:href="#icon-note" /></svg>
                    notes
                </a>
            </li>
        </ul>
    </nav>

    <form role="search" method="get" class="search-form" action="/search">
        <label for="s">Search</label>
        <input type="search" class="search-field" placeholder="search..." value="" name="s" id="s" title="Search for:" />
        <input type="submit" class="search-submit" value="Go ➡" />
    </form>

    <p class="contrast">
        <a title="toggle site colour scheme" href="#"
            onclick="toggleStylesheet(this)">
            <svg class="icon" width="16" height="16">
                <use xlink:href="#icon-contrast" />
            </svg>
        </a>
    </p>


</header>