aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/template/common.go
blob: 6e7b8b9a6486deee4f360cdb25e03e95247695f0 (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Code generated by go generate; DO NOT EDIT.
// 2017-12-16 17:48:32.321995978 -0800 PST m=+0.055632657

package template

var templateCommonMap = map[string]string{
	"entry_pagination": `{{ define "entry_pagination" }}
<div class="pagination">
    <div class="pagination-prev">
        {{ if .prevEntry }}
            <a href="{{ .prevEntryRoute }}" title="{{ .prevEntry.Title }}" data-page="previous">{{ t "Previous" }}</a>
        {{ else }}
            {{ t "Previous" }}
        {{ end }}
    </div>

    <div class="pagination-next">
        {{ if .nextEntry }}
            <a href="{{ .nextEntryRoute }}" title="{{ .nextEntry.Title }}" data-page="next">{{ t "Next" }}</a>
        {{ else }}
            {{ t "Next" }}
        {{ end }}
    </div>
</div>
{{ end }}`,
	"layout": `{{ define "base" }}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="Miniflux">

    <meta name="robots" content="noindex,nofollow">
    <meta name="referrer" content="no-referrer">

    <link rel="icon" type="image/png" href="{{ route "appIcon" "filename" "favicon.png" }}">
    <link rel="apple-touch-icon" href="{{ route "appIcon" "filename" "touch-icon-iphone.png" }}">
    <link rel="apple-touch-icon" sizes="72x72" href="{{ route "appIcon" "filename" "touch-icon-ipad.png" }}">
    <link rel="apple-touch-icon" sizes="114x114" href="{{ route "appIcon" "filename" "touch-icon-iphone-retina.png" }}">
    <link rel="apple-touch-icon" sizes="144x144" href="{{ route "appIcon" "filename" "touch-icon-ipad-retina.png" }}">
    <link rel="shortcut icon" type="image/x-icon" href="{{ route "favicon" }}">

    {{ if .csrf }}
        <meta name="X-CSRF-Token" value="{{ .csrf }}">
    {{ end }}
    <title>{{template "title" .}} - Miniflux</title>
    {{ if .user }}
        <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .user.Theme }}">
    {{ else }}
        <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "white" }}">
    {{ end }}
    <script type="text/javascript" src="{{ route "javascript" }}" defer></script>
</head>
<body data-entries-status-url="{{ route "updateEntriesStatus" }}">
    {{ if .user }}
    <header class="header">
        <nav>
            <div class="logo">
                <a href="{{ route "unread" }}">Mini<span>flux</span></a>
            </div>
            <ul>
                <li {{ if eq .menu "unread" }}class="active"{{ end }}>
                    <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}</a>
                    {{ if gt .countUnread 0 }}
                        <span class="unread-counter" title="Unread articles">({{ .countUnread }})</span>
                    {{ end }}
                </li>
                <li {{ if eq .menu "history" }}class="active"{{ end }}>
                    <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
                </li>
                <li {{ if eq .menu "feeds" }}class="active"{{ end }}>
                    <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
                </li>
                <li {{ if eq .menu "categories" }}class="active"{{ end }}>
                    <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
                </li>
                <li {{ if eq .menu "settings" }}class="active"{{ end }}>
                    <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
                </li>
                <li>
                    <a href="{{ route "logout" }}" title="Logged as {{ .user.Username }}">{{ t "Logout" }}</a>
                </li>
            </ul>
        </nav>
    </header>
    {{ end }}
    {{ if .flashMessage }}
        <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
    {{ end }}
    {{ if .flashErrorMessage }}
        <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
    {{ end }}
    <main>
        {{template "content" .}}
    </main>
</body>
</html>
{{ end }}`,
	"pagination": `{{ define "pagination" }}
<div class="pagination">
    <div class="pagination-prev">
        {{ if .ShowPrev }}
            <a href="{{ .Route }}{{ if gt .PrevOffset 0 }}?offset={{ .PrevOffset }}{{ end }}" data-page="previous">{{ t "Previous" }}</a>
        {{ else }}
            {{ t "Previous" }}
        {{ end }}
    </div>

    <div class="pagination-next">
        {{ if .ShowNext }}
            <a href="{{ .Route }}?offset={{ .NextOffset }}" data-page="next">{{ t "Next" }}</a>
        {{ else }}
            {{ t "Next" }}
        {{ end }}
    </div>
</div>
{{ end }}
`,
}

var templateCommonMapChecksums = map[string]string{
	"entry_pagination": "f1465fa70f585ae8043b200ec9de5bf437ffbb0c19fb7aefc015c3555614ee27",
	"layout":           "ff5e3d87a48e4d3aeceda4aabe6c2c2f607006c6b6e83dfcab6c5eb255a1e6f2",
	"pagination":       "6ff462c2b2a53bc5448b651da017f40a39f1d4f16cef4b2f09784f0797286924",
}