mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-31 14:43:20 +02:00
fix: template fixes
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="flex justify-center grow container mx-auto px-4 sm:px-0 sm:max-w-md flex justify-center flex-col">
|
||||
<div class="flex justify-center grow container mx-auto px-4 sm:px-0 sm:max-w-md flex-col">
|
||||
<h1
|
||||
class="text-5xl sm:text-6xl py-4 pt-10 font-bold bg-linear-to-r from-primary to-secondary text-center text-transparent bg-clip-text">
|
||||
Minne
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- Navbar -->
|
||||
{% include "navigation_bar.html" %}
|
||||
<!-- Main Content Area -->
|
||||
<main class="flex-1 overflow-y-auto">
|
||||
<main class="flex flex-1 overflow-y-auto">
|
||||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-4" id="text_content_cards">
|
||||
{% for text_content in text_contents %}
|
||||
<div class="card min-w-72 bg-base-100 shadow">
|
||||
<div class="card min-w-72 bg-base-100 shadow" hx-get="/content/{{ text_content.id }}/read" hx-target="#modal"
|
||||
hx-swap="innerHTML">
|
||||
{% if text_content.url_info %}
|
||||
<img class="rounded-t-md overflow-clip" src="/file/{{text_content.url_info.image_id}}" />
|
||||
<figure>
|
||||
<img src="/file/{{text_content.url_info.image_id}}" alt="website screenshot" />
|
||||
</figure>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<div class="flex justify-between space-x-2">
|
||||
<h2 class="card-title truncate">
|
||||
{% if text_content.url_info %}
|
||||
<a href="{{ text_content.url_info.url}}">{{text_content.url_info.title}}</a>
|
||||
{{text_content.url_info.title}}
|
||||
{% elif text_content.file_info %}
|
||||
{{text_content.file_info.file_name}}
|
||||
{% else %}
|
||||
{{text_content.text}}
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="flex-shrink-0">
|
||||
{% if text_content.url_info %}
|
||||
{% include "icons/globe_icon.html" %}
|
||||
{% elif text_content.file_info %}
|
||||
{% include "icons/document_icon.html" %}
|
||||
{% else %}
|
||||
{% include "icons/chat_icon.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<p class="text-xs opacity-60">
|
||||
@@ -31,6 +25,13 @@
|
||||
</p>
|
||||
<div class="badge badge-soft badge-secondary mr-2">{{ text_content.category }}</div>
|
||||
<div class="flex gap-2">
|
||||
{% if text_content.url_info %}
|
||||
<button class="btn-btn-square btn-ghost btn-sm">
|
||||
<a href="{{text_content.url_info.url}}">
|
||||
{% include "icons/globe_icon.html" %}
|
||||
</a>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button hx-get="/content/{{ text_content.id }}/read" hx-target="#modal" hx-swap="innerHTML"
|
||||
class="btn btn-square btn-ghost btn-sm">
|
||||
{% include "icons/read_icon.html" %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex justify-center grow mt-2 sm:mt-4 gap-6">
|
||||
<div class="flex grow mt-2 sm:mt-4">
|
||||
<div class="container">
|
||||
{% include 'index/signed_in/searchbar.html' %}
|
||||
|
||||
|
||||
@@ -1,30 +1,15 @@
|
||||
<nav class="bg-base-200 sticky top-0 z-10">
|
||||
<div class="container mx-auto navbar">
|
||||
<div class="flex-none lg:hidden">
|
||||
<label for="my-drawer" aria-label="open sidebar" class="hover:cursor-pointer ">
|
||||
{% include "icons/hamburger_icon.html" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<a class="text-2xl p-2 text-primary font-bold" href="/" hx-boost="true">Minne</a>
|
||||
</div>
|
||||
<div class="flex-none">
|
||||
<ul class="menu menu-horizontal px-1 items-center">
|
||||
<ul class="menu menu-horizontal px-2 items-center">
|
||||
{% include "theme_toggle.html" %}
|
||||
<li><a hx-boost="true" href="/documentation">Docs</a></li>
|
||||
{% if user %}
|
||||
<li>
|
||||
<details>
|
||||
<summary>Account</summary>
|
||||
<ul class="bg-base-100 rounded-t-none p-2 z-50 shadow w-40">
|
||||
<li><a hx-boost="true" href="/account">Account</a></li>
|
||||
{% if user.admin %}
|
||||
<li><a hx-boost="true" href="/admin">Admin</a></li>
|
||||
{% endif %}
|
||||
<li><a hx-boost="true" href="/signout">Sign out</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
<label for="my-drawer" aria-label="open sidebar" class="hover:cursor-pointer lg:hidden">
|
||||
{% include "icons/hamburger_icon.html" %}
|
||||
</label>
|
||||
{% else %}
|
||||
<li><a hx-boost="true" href="/signin">Sign in</a></li>
|
||||
{% endif %}
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
<ul class="menu p-0 w-64 h-full bg-base-200 text-base-content flex flex-col">
|
||||
|
||||
<!-- === TOP FIXED SECTION === -->
|
||||
<div class="divider mt-14"></div>
|
||||
<div class="px-2">
|
||||
<div class="px-2 mt-14">
|
||||
{% for url, name, label in [
|
||||
("/", "home", "Dashboard"),
|
||||
("/knowledge", "book", "Knowledge"),
|
||||
|
||||
Reference in New Issue
Block a user