style(css): change out CSS classes according to stylesheet update

This commit is contained in:
David Bailey 2025-01-06 22:46:28 +01:00
parent d609265862
commit 31150b9b12
5 changed files with 96 additions and 12 deletions

View file

@ -1,10 +1,10 @@
<div id="post_file_bar">
<menu id="post_file_titles">
<div class="navbar">
<menu class="_titles">
<li>
{{ page.basename }}
</li>
</menu>
<menu id="post_file_path">
<menu class="_path">
{% set split_post = page.path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>
@ -20,7 +20,7 @@
<li style="margin-left: auto;">
<label for="navbar-expander" id="navbar-expand-label"> {{ fa['bars'] | raw }} </label>
<label for="navbar-expander" class="expandable"> {{ fa['bars'] | raw }} </label>
<a rel="alternate" type="application/rss+xml" target="_blank"
style="padding-left: 0.3rem;" href="/feed/rss{{page.path}}">
{{ fa['rss']|raw }}
@ -28,10 +28,10 @@
</li>
</menu>
<input id="navbar-expander" class="navbar-expand" type="checkbox" hx-preserve>
<div class="navbar-expand">
<input id="navbar-expander" class="expandable" type="checkbox" hx-preserve>
<div class="_details expandable">
Full path:
<ul class="navbar-full-path">
<ul class="_full_path">
{% set split_post = page.path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>
@ -52,8 +52,8 @@
<h4>Folder browser: </h4>
<ul class="navbar-folder-list">
<li class="folder-listing">
<ul class="_folder_list">
<li>
<span>
{{ fa['turn-up'] | raw}}
</span>

View file

@ -1,6 +1,6 @@
<li class="folder-listing">
<li class="folder_listing">
{% set folder_key = random() %}
<input type="checkbox" id="folder-open-{{folder_key}}" name="folder-open-{{folder_key}}">
@ -17,7 +17,7 @@
{{ post.basename }} - {{ post.title }}
</a>
<ul class="folder-listing">
<ul class="folder_listing">
<li>
<span>
Loading...

View file

@ -9,5 +9,5 @@
{%block content_article%}
{{ include('fragments/directory/inline.html') }}
{{ content_html|raw }}
{{ page.html|raw }}
{%endblock%}

View file

@ -18,6 +18,7 @@
<script src="/static/htmx.min.js"></script>
<script id="main_banner_script" src="/static/banner.js"></script>
<script src="/static/toc.js"></script>
{% if page.base %}
<base href="{{ page.base }}">
@ -90,6 +91,9 @@
</menu>
</header>
<nav id="toc" class="table_of_contents">
</nav>
<main id="main_content_wrapper">
{% block main_content %}
<h3>This here should have been replaced by content.

80
www/templates/search.html Normal file
View file

@ -0,0 +1,80 @@
{% extends "pathed_content.html" %}
{% block second_title %}
<h2> Dergen Search </h2>
{% endblock %}
{%block content_article %}
<form class="dergen_search_form" method="get" enctype="multipart/form-data" action="/search">
<h1>
Dergle
</h1>
<input type="text" id="query" autocomplete="on" name="query" placeholder="Search for..."
{% if search_query.user_type %}
value="{{search_query.user_input}}"
{% endif %}
/> <br>
<button type="submit">Search!</button>
<button>I'm feeling cuddly</button>
<div class="_search_type">
{% for type in search_query.types %}
<input type="radio" name="search_type"
id="type_{{type[1]}}" value="{{type[1]}}"
onchange="this.form.submit();"
{% if type[1] == search_query.user_type %}
checked
{% endif %}
>
<label for="type_{{type[1]}}">
{{type[0]}}
</label>
{% endfor %}
</div>
</form>
{% if display_type == 'no_search' %}
<h3>Search for something :D</h3>
<ul>
<li>Type normal words to search for post title, brief descriptions and main content</li>
<li>Use the syntax <code>tags:tag_a,tag_b,...</code> to search for specific tags</li>
<li>Use the type selector to more precisely look for images, blogs, etc.</li>
</ul>
{% elseif display_type == 'image' %}
<ul class="gallery">
{% for post in search_results %}
<li class="entry">
<a href={{post.path}}>
<figure>
<img src="{{post.media_preview_url}}">
<figcaption>
{{ post.title }} ({{ post.search_score }})
</figcaption>
</figure>
</a>
</li>
{% endfor %}
</ul>
{%elseif display_type == 'no results' %}
<h4>How sad. There are no images yet... What a real shame :c </h4>
{%else%}
<ul class="dergen_search_result_listing">
{% for post in search_results %}
<li>
<ul class="_details">
<li class="_path_details"> <span>Score: {{post.search_score|round(2)}}</span> <span>Path: {{post.path}}</span> </li>
<li class="_title"> <a href="{{post.url}}" target="_blank">
{{post.title}} </a>
</li>
<li class="_brief"> {{post.brief}} </li>
</ul>
</li>
{% endfor %}
</ul>
{% endif %}
{%endblock%}