mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-17 23:14:08 +01:00
feat: ui styling, minification
This commit is contained in:
3424
assets/style.css
3424
assets/style.css
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "npx @tailwindcss/cli --input assets/input.css --output assets/style.css --watch"
|
||||
"dev": "npx @tailwindcss/cli --input assets/input.css --output assets/style.css --watch --minify"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
|
||||
@@ -171,7 +171,6 @@ fn html_routes(
|
||||
.route("/", get(index_handler))
|
||||
.route("/gdpr/accept", post(accept_gdpr))
|
||||
.route("/gdpr/deny", post(deny_gdpr))
|
||||
.route("/privacy-policy", get(show_privacy_policy))
|
||||
.route("/search", get(search_result_handler))
|
||||
.route("/signout", get(sign_out_user))
|
||||
.route("/signin", get(show_signin_form).post(authenticate_user))
|
||||
@@ -189,6 +188,7 @@ fn html_routes(
|
||||
get(show_signup_form).post(process_signup_and_show_verification),
|
||||
)
|
||||
.route("/documentation", get(show_documentation_index))
|
||||
.route("/documentation/privacy-policy", get(show_privacy_policy))
|
||||
.nest_service("/assets", ServeDir::new("assets/"))
|
||||
.layer(
|
||||
AuthSessionLayer::<User, String, SessionSurrealPool<Any>, Surreal<Any>>::new(Some(
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::{
|
||||
storage::types::user::User,
|
||||
};
|
||||
|
||||
page_data!(PrivacyPolicyData, "privacy_policy.html", {
|
||||
page_data!(PrivacyPolicyData, "documentation/privacy.html", {
|
||||
user: Option<User>
|
||||
});
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<div class="min-h-screen flex flex-col">
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar bg-base-200">
|
||||
<div class="container mx-auto">
|
||||
<div class="flex-1">
|
||||
<div class="container flex mx-auto">
|
||||
<div class="flex-1 flex items-center">
|
||||
<a class="btn text-2xl border-transparent btn-outline btn-primary" href="/" hx-boost="true">Minne</a>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
19
templates/documentation/base.html
Normal file
19
templates/documentation/base.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "body_base.html" %}
|
||||
{% block main %}
|
||||
<main class="flex justify-center grow mt-2 sm:mt-4">
|
||||
<div class="container">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-[auto_1fr] gap-4">
|
||||
<!-- Documentation Menu -->
|
||||
<aside class="bg-base-200 rounded-lg p-4">
|
||||
{% include "documentation/menu.html" %}
|
||||
</aside>
|
||||
<!-- Main Content -->
|
||||
|
||||
<article class="prose flex mx-auto justify-center flex-col">
|
||||
{% block article %}
|
||||
{% endblock %}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -1,35 +1,22 @@
|
||||
{% extends "body_base.html" %}
|
||||
{% block main %}
|
||||
<main class="flex justify-center grow mt-2 sm:mt-4">
|
||||
<div class="container">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-[auto_1fr] gap-4">
|
||||
<!-- Documentation Menu -->
|
||||
<aside class="bg-base-200 rounded-lg p-4">
|
||||
{% include "documentation/menu.html" %}
|
||||
</aside>
|
||||
<!-- Main Content -->
|
||||
<article class="prose flex mx-auto justify-center flex-col">
|
||||
<h1 class="">Personalised Knowledge Management (PKM)</h1>
|
||||
<p class="">
|
||||
Personalised Knowledge Management (PKM) is a system designed to help individuals organise, store, and retrieve
|
||||
information effectively. It empowers users to create a personalised workflow for managing knowledge, enabling
|
||||
better decision-making and productivity.
|
||||
</p>
|
||||
<p class="">
|
||||
This documentation will guide you through the core concepts, tools, and best practices for building and
|
||||
maintaining your own PKM system.
|
||||
</p>
|
||||
<div class="card p-6 rounded-lg shadow-md">
|
||||
<h2 class="">Getting Started</h2>
|
||||
<p class="">
|
||||
To begin, explore the sections in the navigation menu. Each section provides detailed insights into
|
||||
different
|
||||
aspects of PKM, from foundational principles to advanced techniques.
|
||||
</p>
|
||||
<a href="/documentation/submenu1" class="btn btn-primary" hx-boost="true">Learn More</a>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% extends "documentation/base.html" %}
|
||||
{% block article %}
|
||||
<h1 class="">Personalised Knowledge Management (PKM)</h1>
|
||||
<p class="">
|
||||
Personalised Knowledge Management (PKM) is a system designed to help individuals organise, store, and retrieve
|
||||
information effectively. It empowers users to create a personalised workflow for managing knowledge, enabling
|
||||
better decision-making and productivity.
|
||||
</p>
|
||||
<p class="">
|
||||
This documentation will guide you through the core concepts, tools, and best practices for building and
|
||||
maintaining your own PKM system.
|
||||
</p>
|
||||
<div class="card p-6 rounded-lg shadow-md">
|
||||
<h2 class="">Getting Started</h2>
|
||||
<p class="">
|
||||
To begin, explore the sections in the navigation menu. Each section provides detailed insights into
|
||||
different
|
||||
aspects of PKM, from foundational principles to advanced techniques.
|
||||
</p>
|
||||
<a href="/documentation/submenu1" class="btn btn-primary" hx-boost="true">Learn More</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
<ul class="menu bg-base-200 rounded-box">
|
||||
<li><a hx-boost="true" href="/documentation">Start</a></li>
|
||||
<li><a hx-boost="true" class="" href="/privacy-policy">Privacy Policy</a></li>
|
||||
<li><a hx-boost="true" class="" href="/documentation/privacy-policy">Privacy Policy</a></li>
|
||||
<li>
|
||||
<details open>
|
||||
<summary>Core Concepts</summary>
|
||||
|
||||
30
templates/documentation/privacy.html
Normal file
30
templates/documentation/privacy.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends 'documentation/base.html' %}
|
||||
{% block article %}
|
||||
<h1>Privacy Policy</h1>
|
||||
<p>We value your privacy and are committed to protecting your personal information. This policy
|
||||
outlines how we handle your data and ensures transparency in our practices.</p>
|
||||
|
||||
<h3>Data Collection</h3>
|
||||
<p>We only collect data that is necessary for the functionality of our services. Any data you upload to
|
||||
our site remains your property and will not be shared with third parties unless required by law.</p>
|
||||
|
||||
<h3>Cookies</h3>
|
||||
<p>We do not use cookies for tracking or analytics. The cookies we employ are strictly for session
|
||||
management, ensuring a smooth and secure user experience.</p>
|
||||
|
||||
<h3>No Unnecessary Data Extraction</h3>
|
||||
<p>We believe that unnecessary data extraction is unethical and a poor practice. We only collect the
|
||||
minimum amount of data required to provide our services effectively, ensuring your privacy is respected at all
|
||||
times.</p>
|
||||
|
||||
<h3>Your Rights</h3>
|
||||
<p>You have the right to access, modify, or delete your data at any time. If you have any concerns
|
||||
about how your data is handled, please contact us.</p>
|
||||
|
||||
<h3>Changes to This Policy</h3>
|
||||
<p>We may update this privacy policy from time to time. Any changes will be posted on this page, and we
|
||||
encourage you to review it periodically.</p>
|
||||
|
||||
<p>Thank you for trusting us with your information. We are committed to treating it with the care and
|
||||
respect it deserves.</p>
|
||||
{% endblock %}
|
||||
@@ -1,12 +1,12 @@
|
||||
<div id="gdpr-banner"
|
||||
class="fixed inset-x-0 mx-auto card max-w-(--breakpoint-sm) mb-2 bg-base-200 text-neutral-content bottom-0">
|
||||
<div id="gdpr-banner" class="fixed inset-x-0 mx-auto card max-w-(--breakpoint-sm) mb-2 bg-base-200 bottom-0">
|
||||
<div class="card-body items-center text-center">
|
||||
<p class="text-sm"> We use cookies to enhance your experience. By continuing to visit this site, you agree to
|
||||
<p class="text-sm text-base-content"> We use cookies to enhance your experience. By continuing to visit this site,
|
||||
you agree to
|
||||
our use cookies.
|
||||
<a href="/privacy-policy" class="link link-primary">Learn more</a>
|
||||
<a href="/documentation/privacy-policy" class="link link-primary">Learn more</a>
|
||||
</p>
|
||||
<div class="card-actions justify-end mt-2">
|
||||
<button class="btn btn-ghost btn-sm" hx-post="/gdpr/deny" hx-target="#gdpr-banner"
|
||||
<button class="btn btn-outline btn-sm text-base-content" hx-post="/gdpr/deny" hx-target="#gdpr-banner"
|
||||
hx-swap="outerHTML">Deny</button>
|
||||
<button class="btn btn-primary btn-sm" hx-post="/gdpr/accept" hx-target="#gdpr-banner"
|
||||
hx-swap="outerHTML">Accept</button>
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
<!-- <meta http-equiv="refresh" content="4"> -->
|
||||
|
||||
<!-- Preload critical assets -->
|
||||
<link rel="preload" href="assets/htmx.min.js" as="script">
|
||||
<link rel="preload" href="assets/style.css" as="style">
|
||||
<link rel="preload" href="/assets/htmx.min.js" as="script">
|
||||
<link rel="preload" href="/assets/style.css" as="style">
|
||||
|
||||
<!-- Core styles -->
|
||||
<link rel="stylesheet" href="assets/style.css">
|
||||
<link rel="stylesheet" href="/assets/style.css">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="assets/htmx.min.js" defer></script>
|
||||
<script src="assets/theme-toggle.js" defer></script>
|
||||
<script src="/assets/htmx.min.js" defer></script>
|
||||
<script src="/assets/theme-toggle.js" defer></script>
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="icon" href="/assets/icon/favicon.ico">
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
{% extends 'body_base.html' %}
|
||||
{% block main %}
|
||||
<main class="container justify-center grow flex mx-auto mt-4 p-5">
|
||||
<article class="prose">
|
||||
<h1>Privacy Policy</h1>
|
||||
|
||||
<p>We value your privacy and are committed to protecting your personal information. This policy
|
||||
outlines how we handle your data and ensures transparency in our practices.</p>
|
||||
|
||||
<h2>Data Collection</h2>
|
||||
<p>We only collect data that is necessary for the functionality of our services. Any data you upload to
|
||||
our site remains your property and will not be shared with third parties unless required by law.</p>
|
||||
|
||||
<h2>Cookies</h2>
|
||||
<p>We do not use cookies for tracking or analytics. The cookies we employ are strictly for session
|
||||
management, ensuring a smooth and secure user experience.</p>
|
||||
|
||||
<h2>No Unnecessary Data Extraction</h2>
|
||||
<p>We believe that unnecessary data extraction is unethical and a poor practice. We only collect the
|
||||
minimum amount of data required to provide our services effectively, ensuring your privacy is respected at all
|
||||
times.</p>
|
||||
|
||||
<h2>Your Rights</h2>
|
||||
<p>You have the right to access, modify, or delete your data at any time. If you have any concerns
|
||||
about how your data is handled, please contact us.</p>
|
||||
|
||||
<h2>Changes to This Policy</h2>
|
||||
<p>We may update this privacy policy from time to time. Any changes will be posted on this page, and we
|
||||
encourage you to review it periodically.</p>
|
||||
|
||||
<p>Thank you for trusting us with your information. We are committed to treating it with the care and
|
||||
respect it deserves.</p>
|
||||
</article>
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user