base menu, about page, atom feed

This commit is contained in:
j 2023-07-25 20:03:54 +01:00
commit 0b64fd58a1
21 changed files with 284 additions and 47 deletions

View file

@ -1,4 +1,4 @@
<!DOCTYPE html>{% load static sass_tags compress %}
<!DOCTYPE html>{% load sass_tags compress %}
<html>
<head>
<meta charset="utf-8">
@ -15,8 +15,35 @@
<body>
{% block header %}
<header>
<a href="/">phantas.ma</a>
<span class="burger">[=]</span> <a href="/">{{ settings.SITENAME }}</a>
</header>
<nav class="overlay">
<a href="/about/">about</a><br>
{% if request.user.is_authenticated %}
<div>You are logged in as {{ request.user.username }}</div>
<a href="/logout/">logout</a><br>
{% else %}
<a href="/login/">login</a><br>
{% endif %}
</nav>
<style>
</style>
<script>
document.querySelector('.burger').addEventListener('click', event => {
event.preventDefault()
event.stopPropagation()
var overlay = document.querySelector('nav.overlay')
if (overlay.classList.contains('active')) {
overlay.classList.remove('active')
document.body.style.overflow = ''
document.querySelector('.burger').innerText = '[=]'
} else {
overlay.classList.add('active')
document.body.style.overflow = 'hidden'
document.querySelector('.burger').innerText = '[x]'
}
})
</script>
{% endblock %}
{% block main %}
<div class="content">

View file

@ -1,4 +1,7 @@
{% extends "base.html" %}
{% block head %}
<link rel="alternate" type="application/atom+xml" title="{{ settings.SITENAME }}" href="/atom.xml" />
{% endblock %}
{% block content %}
<style>
</style>

View file

@ -57,7 +57,7 @@
pandora.url = new URL('{{ item.url|escapejs }}');
pandora.comment = '{{ item.id | escapejs }}';
pandora.hostname = pandora.url.hostname
pandoraURL = `https://${pandora.hostname}`
pandoraURL = `${pandora.url.protocol}//${pandora.hostname}`
</script>
<script src="/static/js/overwrite.js"></script>