diff options
| author | Bobby <[email protected]> | 2025-07-16 15:28:11 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-07-16 15:28:11 +0530 |
| commit | bb54eaf6623acdcfb2e9056eb803260dff2150a5 (patch) | |
| tree | 3a7fb956911f8e40c4e86ca9fde48b4ebef1a217 /templates | |
| parent | f13506cfba2da90764620dab2c624ac74767de62 (diff) | |
| download | imageboard-bb54eaf6623acdcfb2e9056eb803260dff2150a5.tar.xz imageboard-bb54eaf6623acdcfb2e9056eb803260dff2150a5.zip | |
enhance requests queries for posts; integrate backend with search
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/home.django | 2 | ||||
| -rw-r--r-- | templates/partials/search.django | 22 | ||||
| -rw-r--r-- | templates/posts/list.django | 2 | ||||
| -rw-r--r-- | templates/preferences.django | 2 |
4 files changed, 18 insertions, 10 deletions
diff --git a/templates/home.django b/templates/home.django index 148dbce..c0cacb7 100644 --- a/templates/home.django +++ b/templates/home.django @@ -3,7 +3,7 @@ <div class="centered-main"> <img src="/static/images/opwevhieia8ikwltpfgf.webp" alt="Main Image" class="main-img" /> <h1>Welcome to {{ Appname }}!</h1> - <p>~ 個人的な画像ボード ~</p> + <p style="margin-bottom: 16px;">~ 個人的な画像ボード ~</p> {% include 'partials/search.django' %} </div> {% endblock %} diff --git a/templates/partials/search.django b/templates/partials/search.django index ae67017..75f8368 100644 --- a/templates/partials/search.django +++ b/templates/partials/search.django @@ -1,26 +1,34 @@ <div class="search-container"> - <form action="/" method="GET"> + <form action="/posts" method="GET"> <h3>« Search Posts »</h3> - <input type="text" name="tags" placeholder="enter some tags..." value="{{ SearchQuery }}" /> + <input type="text" name="tags" class="search-tags-input" placeholder="enter some tags..." value="{{ QueryTags|default_if_none:'' }}" autocomplete="off" aria-label="Search tags" /> <input type="submit" value="Search" /> - <input type="button" value="Clear" onclick="this.form.reset();" /> + <input type="button" value="Clear" onclick="this.form.tags.value='';" /> <div class="rating-toggles"> <label class="rating-checkbox"> - <input type="checkbox" name="rating" value="safe" checked /> + <input type="checkbox" name="rating" value="safe" {{ QueryRatings.safe|yesno:'checked,' }} /> <span class="checkbox-custom safe"></span> </label> <label class="rating-checkbox"> - <input type="checkbox" name="rating" value="questionable" checked /> + <input type="checkbox" name="rating" value="questionable" {{ QueryRatings.questionable|yesno:'checked,' }} /> <span class="checkbox-custom questionable"></span> </label> <label class="rating-checkbox"> - <input type="checkbox" name="rating" value="sensitive" checked /> + <input type="checkbox" name="rating" value="sensitive" {{ QueryRatings.sensitive|yesno:'checked,' }} /> <span class="checkbox-custom sensitive"></span> </label> <label class="rating-checkbox"> - <input type="checkbox" name="rating" value="explicit" checked /> + <input type="checkbox" name="rating" value="explicit" {{ QueryRatings.explicit|yesno:'checked,' }} /> <span class="checkbox-custom explicit"></span> </label> </div> + <a href="/help" style="height: 24px;"> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-help"> + <path stroke="none" d="M0 0h24v24H0z" fill="none" /> + <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> + <path d="M12 17l0 .01" /> + <path d="M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4" /> + </svg> + </a> </form> </div> diff --git a/templates/posts/list.django b/templates/posts/list.django index d4f933b..2dc5d03 100644 --- a/templates/posts/list.django +++ b/templates/posts/list.django @@ -1,11 +1,11 @@ {% extends 'layouts/main.django' %} -{% include 'partials/search.django' %} {% block content %} {% if Error %} <div class="centered-main"> <div class="error">{{ Error }}</div> </div> {% endif %} + {% include 'partials/search.django' %} {% if Posts %} Will Show posts here {% else %} diff --git a/templates/preferences.django b/templates/preferences.django index bb489f9..d8a153e 100644 --- a/templates/preferences.django +++ b/templates/preferences.django @@ -68,5 +68,5 @@ </div> {% endblock %} {% block scripts %} - <script src="/static/scripts/preferences.js" type="text/javascript"></script> + <script type="text/javascript" src="/static/scripts/preferences.js" defer></script> {% endblock %} |
