mirror of
https://github.com/jfmcbrayer/brutaldon
synced 2024-12-24 14:30:52 +01:00
258 lines
13 KiB
HTML
258 lines
13 KiB
HTML
{% load static %}
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>
|
|
{% block title %}
|
|
{% if own_acct %}
|
|
brutaldon ('{{ own_acct.username }}')
|
|
{% else %}
|
|
brutaldon
|
|
{% endif %}
|
|
{% endblock %}</title>
|
|
<link rel="manifest" href="{% static 'manifest.webmanifest' %}">
|
|
{% if not preferences %}
|
|
<link rel="stylesheet"
|
|
href="{% static 'css/bulma.min.css' %}">
|
|
<link rel="stylesheet"
|
|
href="{% static 'css/fork-awesome.min.css' %}">
|
|
<link rel="stylesheet" href="{% static "css/brutaldon.css" %}">
|
|
{% else %}
|
|
<link rel="stylesheet"
|
|
href="{% static preferences.theme.main_css %}">
|
|
<link rel="stylesheet" href="{% static preferences.theme.tweaks_css %}">
|
|
{% if not preferences.theme.is_brutalist %}
|
|
<link rel="stylesheet"
|
|
href="{% static 'css/fork-awesome.min.css' %}">
|
|
<link rel="stylesheet"
|
|
href="{% static 'css/photobox.css' %}">
|
|
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'js/jquery.photobox.js' %}"></script>
|
|
<script src="{% static 'js/jquery.p2r.min.js' %}" type='text/javascript'></script>
|
|
<script type="text/javascript" src="{% static 'js/brutaldon-enhancements.js' %}"></script>
|
|
{% block page_scripts %}
|
|
{% endblock %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if own_acct %}
|
|
<link rel="icon" href="{{ own_acct.avatar_static }}">
|
|
{% else %}
|
|
<link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png">
|
|
{% endif %}
|
|
</head>
|
|
<body class="has-navbar-fixed-top"
|
|
ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
|
|
<div id="page-load-indicator"> </div>
|
|
{% block navbar %}
|
|
<nav class="navbar is-fixed-top is-primary" role="navigation"
|
|
aria-label="main navigation" id="main-nav-bar">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="{% url "home" %}"
|
|
ic-get-from="{% url "home" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Home');"
|
|
ic-indicator="#page-load-indicator">
|
|
{% if own_acct %}
|
|
<img src="{{ own_acct.avatar_static }}"
|
|
class="image is-32x32 avatar"
|
|
alt="Brutaldon ('{{ own_acct.username }}')">
|
|
{% else %}
|
|
<img src="{% static "images/brutaldon.png" %}"
|
|
class="image is-32x32" alt="Brutaldon">
|
|
{% endif %}
|
|
</a>
|
|
</div>
|
|
{% if request.session.instance %}
|
|
{% if request.session.username or request.session.access_token %}
|
|
<div class="navbar-menu is-active" id="navMenu">
|
|
<!-- navbar start, navbar end -->
|
|
<div class="navbar-start">
|
|
<a href="{% url "home" %}" class="navbar-item"
|
|
ic-get-from="{% url "home" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Home');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-home"></span>
|
|
<span> Home</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "note" %}"
|
|
ic-get-from="{% url "note" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-bell-o"></span>
|
|
<span > Notifications</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "local" %}"
|
|
ic-get-from="{% url "local" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Local timeline');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-community"></span>
|
|
<span > Local</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "fed" %}"
|
|
ic-get-from="{% url "fed" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Federated timeline');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-globe"></span>
|
|
<span > Federated</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "toot" %}"
|
|
ic-get-from="{% url "toot" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'New toot');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-edit"> </span>
|
|
<span > New Toot</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "search" %}"
|
|
ic-get-from="{% url "search" %}"
|
|
ic-target="#main"
|
|
ic-scroll-to-target="true"
|
|
ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Search');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-search"> </span>
|
|
<span > Search</span>
|
|
</a>
|
|
</div>
|
|
<div class="navbar-end" >
|
|
<a class="navbar-item" href="{% url "settings" %}"
|
|
ic-get-from="{% url "settings" %}"
|
|
ic-target="#main"
|
|
|
|
ic-scroll-to-target="true" ic-select-from-response="#main"
|
|
ic-push-url="true"
|
|
ic-on-beforeSend="savePlace"
|
|
ic-on-success="afterPage('{{ own_acct.username }}', 'Settings');"
|
|
ic-indicator="#page-load-indicator">
|
|
<span class="fa fa-gear"></span>
|
|
<span > Settings</span>
|
|
</a>
|
|
<a class="navbar-item" href="{% url "logout" %}">
|
|
<span class="fa fa-power-off"></span>
|
|
<span > Log out</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</nav>
|
|
{% endblock %}
|
|
|
|
<div id="before-main" class="is-hidden-desktop">
|
|
<span class="fa fa-bars"></span>
|
|
</div>
|
|
|
|
<section id="main" class="section" ic-history-elt="true">
|
|
<div class="container">
|
|
{% block content %}
|
|
<h1 class="title">
|
|
Title
|
|
</h1>
|
|
<p class="subtitle">
|
|
Brutaldon is totally a thing.
|
|
</p>
|
|
{% endblock %}
|
|
</div>
|
|
</section>
|
|
|
|
<footer class="footer">
|
|
<div class="level">
|
|
<div class="level-left">
|
|
<a class="level-item is-size-7" href="{% url "about" %}">
|
|
About
|
|
</a>
|
|
<a class="level-item is-size-7" href="https://github.com/jfmcbrayer/brutaldon">
|
|
Source
|
|
</a>
|
|
</div>
|
|
<div class="level-right">
|
|
{% if preferences.theme.is_brutalist %}
|
|
<img class="level-item" src="{% static '/images/lynx.gif' %}"
|
|
alt="Lynx Now!">
|
|
<img class="level-item" src="{% static '/images/now9.gif' %}"
|
|
alt="Netscape Now!">
|
|
{% endif %}
|
|
<a class="level-item is-size-7" href="{% url "privacy" %}">
|
|
Privacy
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
{% if not preferences.theme.is_brutalist %}
|
|
|
|
<script type="application/javascript">
|
|
$(document).ready(function () {
|
|
menuPrepare();
|
|
$("#before-main").pullToRefresh({
|
|
refresh: 200,
|
|
simulateTouch: false,
|
|
threshold: 100,
|
|
scroll: "before-main",
|
|
});
|
|
$(document).on("refresh.pulltorefresh", function ($element, y){
|
|
$("page-load-indicator").show();
|
|
window.location.reload();
|
|
});
|
|
});
|
|
$(document).on('handle.onpopstate.ic',
|
|
restorePlace);
|
|
if (navigator.serviceWorker.controller) {
|
|
console.log('[PWA Builder] active service worker found, no need to register')
|
|
} else {
|
|
|
|
//Register the ServiceWorker
|
|
navigator.serviceWorker.register('pwabuilder-sw.js', {
|
|
scope: '{% url '' %}'
|
|
}).then(function(reg) {
|
|
console.log('Service worker has been registered for scope:'+ reg.scope);
|
|
});
|
|
}
|
|
Intercooler.ready(function ()
|
|
{
|
|
$(".attachments").photobox('a', { history: true });
|
|
var refresh = new Event('refreshOffline');
|
|
self.dispatchEvent(refresh);
|
|
});
|
|
</script>
|
|
{% block page_scripts_inline %}
|
|
{% endblock %}
|
|
|
|
{% endif %}
|
|
</body>
|
|
</html>
|