mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-03-10 20:03:12 +08:00
* Replace flexbox grid with CSS grid * Update new and edit forms * Update settings views * Update auth views * Fix margin in menu * Remove unused Spectre modules * Simplify navbar * Reuse CSS variables * Fix grid gap on small screen sizes * Simplify grid system * Improve section headers * Restructure SASS files * Cleanup base styles * Update test
67 lines
2.8 KiB
HTML
67 lines
2.8 KiB
HTML
{% load static %}
|
|
{% load sass_tags %}
|
|
|
|
<!DOCTYPE html>
|
|
{# Use data attributes as storage for access in static scripts #}
|
|
<html lang="en" data-api-base-url="{% url 'bookmarks:api-root' %}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="icon" href="{% static 'favicon.png' %}"/>
|
|
<link rel="apple-touch-icon" href="{% static 'apple-touch-icon.png' %}">
|
|
<link rel="manifest" href="{% url 'bookmarks:manifest' %}">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui">
|
|
<meta name="description" content="Self-hosted bookmark service">
|
|
<meta name="robots" content="index,follow">
|
|
<meta name="author" content="Sascha Ißbrücker">
|
|
<title>linkding</title>
|
|
{# Include SASS styles, files are resolved from bookmarks/styles #}
|
|
{# Include specific theme variant based on user profile setting #}
|
|
{% if request.user_profile.theme == 'light' %}
|
|
<link href="{% sass_src 'theme-light.scss' %}?v={{ app_version }}" rel="stylesheet" type="text/css"/>
|
|
{% elif request.user_profile.theme == 'dark' %}
|
|
<link href="{% sass_src 'theme-dark.scss' %}?v={{ app_version }}" rel="stylesheet" type="text/css"/>
|
|
{% else %}
|
|
{# Use auto theme as fallback #}
|
|
<link href="{% sass_src 'theme-dark.scss' %}?v={{ app_version }}" rel="stylesheet" type="text/css"
|
|
media="(prefers-color-scheme: dark)"/>
|
|
<link href="{% sass_src 'theme-light.scss' %}?v={{ app_version }}" rel="stylesheet" type="text/css"
|
|
media="(prefers-color-scheme: light)"/>
|
|
{% endif %}
|
|
</head>
|
|
<body ld-global-shortcuts>
|
|
<header class="container">
|
|
{% if has_toasts %}
|
|
<div class="toasts">
|
|
<form action="{% url 'bookmarks:toasts.acknowledge' %}?return_url={{ request.path | urlencode }}" method="post">
|
|
{% csrf_token %}
|
|
{% for toast in toast_messages %}
|
|
<div class="toast">
|
|
{{ toast.message }}
|
|
<button type="submit" name="toast" value="{{ toast.id }}" class="btn btn-clear float-right"></button>
|
|
</div>
|
|
{% endfor %}
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
<div class="d-flex justify-between">
|
|
<a href="{% url 'bookmarks:index' %}" class="d-flex align-center">
|
|
<img class="logo" src="{% static 'logo.png' %}" alt="Application logo">
|
|
<h1>LINKDING</h1>
|
|
</a>
|
|
{% if request.user.is_authenticated %}
|
|
{# Only show nav items menu when logged in #}
|
|
{% include 'bookmarks/nav_menu.html' %}
|
|
{% elif has_public_shares %}
|
|
{# Otherwise show link to shared bookmarks if there are publicly shared bookmarks #}
|
|
<a href="{% url 'bookmarks:shared' %}" class="btn btn-link">Shared bookmarks</a>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
<div class="content container">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html>
|