-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.html
201 lines (175 loc) Β· 8.02 KB
/
base.html
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{% if title %}{{ title }}{% else %}Cinnamon{% endif %}</title>
<meta name="description" content="Cinnamon lets you keep track of posts on the web and post content to your website.">
<meta name="twitter:description" content="Cinnamon lets you keep track of posts on the web and post content to your website.">
<meta name="og:description" content="Cinnamon lets you keep track of posts on the web and post content to your website.">
<meta name="og:site_name" content="Cinnamon">
<meta property="og:image" content="/static/feed.png">
<meta name="twitter:image:src" content="/static/feed.png">
<link rel="manifest" href="/manifest.json">
<meta name="twitter:card" content="summary">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" sizes="16x16" href="/static/icons/16.png">
<link rel="apple-touch-icon" sizes="100x100" href="/static/icons/100.png">
<link rel="apple-touch-icon" sizes="196x196" href="/static/icons/196.png">
<link rel="apple-touch-icon" sizes="256x256" href="/static/icons/256.png">
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="Cinnamon">
<!-- Twitter Card data -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Cinnamon">
<!-- Open Graph data -->
<meta property="og:title" content="Cinnamon">
<meta property="og:url" content="{{ config.get('URL') }}">
<meta property="og:site_name" content="Cinnamon">
<link rel="stylesheet" href="/static/css/styles.css" />
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" />
<link rel="webmention" href="https://webmention.jamesg.blog/endpoint" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style id="darkmode" media="none">
.feed li, aside, .content_box, .main_content_box, .green_notification, .search_list, .modal_content, nav, details, summary, #top_navigation, .bottom-navigation, html {
background-color: #1F2937 !important;
background: #1F2937 !important;
}
a {
color: lightgreen;
border-bottom: 2px dotted lightgreen;
}
a:hover {
color: lavender;
}
h1, h2, h3 {
color: orange;
}
.social_interaction, .webmention {
background: none;
}
p, li, dt, dd, .indieweb_footer, input, label {
color: white;
}
input, textarea, .code, select, option, pre, code, .reaction, .reaction-no-link {
background-color: #0c2548 !important;
color: white;
}
@media screen and (max-width: 850px) {
#top_navigation {
background-color: #0c2548 !important;
color: white;
}
}
</style>
</head>
<body>
{% include "show_error.html" %}
<a href="#main" class="accessibility_label_top">Skip to main content</a>
<main>
<nav id="top_navigation">
{% if session.get("me") %}
{% if channel_name %}
<h2 style="text-align: center;">{{ channel_name }} Posts</h2>
{% elif title %}
<h2 style="text-align: center;">{{ title }}</h2>
{% else %}
<h2><a href="/reader/all" id="page_title">Cinnamon</a></h2>
{% endif %}
{% else %}
<p><a href="/">Cinnamon</a></p>
{% endif %}
{% if session.get("me") %}
<ul id="desktop_navigation">
<li><a href="#" onclick="trigger_modal('subscribe-modal')" class="subscribe_button">Subscribe</a></li>
<li><a href="/reader">π Home</a></li>
<li><a href="/following">π§βπ€βπ§ Following</a></li>
<li><a href="/lists">π Lists</a></li>
<li><a href="/search">π Search</a></li>
<li><a href="/reader/{{ channels[1]['uid'] }}">π Notifications ({{ channels[1]['unread'] }})</a></li>
<li><a href="/settings">π€ {{ session.get("me").replace("https://", "").strip("/") }}</a></li>
<li><a href="/logout">π Logout</a></li>
</ul>
<p id="mobile_navigation"><img src="https://jamesg.blog/assets/coffeeshop.jpg" height="40" width="40" onclick="trigger_modal('settings')" /></p>
{% else %}
<ul>
<li><a href="/setup">Setup</a></li>
<li><a href="/login">Login</a></li>
</ul>
{% endif %}
</nav>
<section id="subscribe-modal" style="display: none;" class="content_box">
<div class="inner_content_box">
<h2>Follow Someone</h2>
<p>Enter a website below to follow the owner's content.</p>
<form action="/discover-feed" method="GET">
<label for="subscribe-to">Feed Address:</label><br>
<input id="subscribe-to" type="url" name="subscribe-to" placeholder="https://jamesg.blog" /><br>
<input type="submit" value="Preview" />
</form>
</div>
</section>
<script>
if (localStorage.getItem('darkmode') == "true") {
document.getElementById('darkmode').media = "all";
} else if (localStorage.getItem('darkmode') == "false") {
document.getElementById('darkmode').media = "none";
}
var navigation = document.getElementById("top_navigation");
var ul = navigation.getElementsByTagName("ul")[0];
// create new li
var li = document.createElement("li");
var dark_style = document.getElementById("darkmode");
if (dark_style.media === "all") {
li.innerHTML = "<a onclick='toggleTheme();'>Light Mode</a>";
} else {
li.innerHTML = "<a onclick='toggleTheme();'>Dark Mode</a>";
}
ul.appendChild(li);
function toggleTheme() {
if (dark_style.media === "all") {
dark_style.media = "none";
li.innerHTML = "<a onclick='toggleTheme();'>Dark Mode</a>";
localStorage.setItem('darkmode', 'false');
} else {
dark_style.media = "all";
li.innerHTML = "<a onclick='toggleTheme();'>Light Mode</a>";
localStorage.setItem('darkmode', 'true');
}
}
</script>
<div id="main">
{% if session.get("me") %}
<div id="settings" style="display: none;">
<span class="close mobile_close" onclick="trigger_modal('settings')">×</span>
<h2 style="text-align: left;">Settings</h2>
<ul>
<li><a href="/following">π§βπ€βπ§ Following</a></li>
<li><a href="/lists">π Lists</a></li>
<li><a href="/settings">π€ {{ session.get("me").replace("https://", "").strip("/") }}</a></li>
<li><a href="/logout">π Logout</a></li>
</ul>
</div>
{% endif %}
{% block content %}
{% endblock %}
</div>
<script src="/static/js/reader.js"></script>
{% if session.get("me") %}
<footer class="sticky_footer mobile">
<ul>
<li><a href="/reader/all"><img src="/static/icons/home.svg" alt="Home" /></a></li>
<li><a href="/search"><img src="/static/icons/search.svg" alt="Search" /></a></li>
<li><a href="/reader/all"><img src="/static/icons/create.svg" alt="Write a Post" /></a></li>
<li><a href="/reader/{{ channels[1]['uid'] }}"><img src="/static/icons/bell.svg" alt="Notifications" />
{% if channels[1]['unread'] > 0 %}<span class="notification_item"></span>{% endif %}</a></li>
<li><a href="#" onclick="subscribe_modal()"><img src="/static/icons/follow.svg" alt="Follow" /></a></li>
<li><a href="/settings"><img src="/static/icons/settings.svg" alt="Settings" /></a></li>
</ul>
</footer>
{% endif %}
<a href="#main" class="accessibility_label">Go Back to the Top</a>
</main>
</body>
</html>