An open source, non-profit web search engine
Replace the right bit of html
Daoud Clarke820b5f80d132
diff --git a/devdata/index-v2.tinysearch b/devdata/index-v2.tinysearchindex cacdc4a..550f6ad 100644Binary files a/devdata/index-v2.tinysearch and b/devdata/index-v2.tinysearch differdiff --git a/mwmbl/templates/home.html b/mwmbl/templates/home.htmlindex 6cfda90..9ab0243 100644--- a/mwmbl/templates/home.html+++ b/mwmbl/templates/home.html@@ -1,57 +1,55 @@{% load humanize %}{% include "title.html" %}-<div class="main">- <div is="mwmbl-add-result" style="display: none">- <form class="modal-content"- hx-post="/app/add/"- hx-target=".main"- hx-include=".result"- hx-vals='{"query": "{{ query }}"{% if curation %}, "curation_id": {{ curation.id }}{% endif %}}'- hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>- <span class="close">×</span>- <label>- Enter a URL: <input class="add-result" name="new_url" placeholder="https://something.org">- </label>- <input type="submit" class="button" value="Save"/>- </form>- </div>- {% if query %}- <button class="button curate-add" is="mwmbl-add-button">+ Add new</button>- {% if curation %}- <button class="button"- id="revert-button"- hx-post="/app/revert-current/"- hx-target=".main"- hx-vals='{"curation_id": {{ curation.id }}}'- hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>↺ Revert {{ curation.num_changes }} change{{ curation.num_changes|pluralize:"s" }}</button>- {% else %}- <button class="disabled-button" id="revert-button">↺ Revert</button>- {% endif %}- {% if results %}- <ul class='results'>- {% for result in results %}- {% include "result.html" %}- {% endfor %}- </ul>- {% else %}- <ul>- <li class="home">- <h1>- No results found for "{{query}}".- </h1>- </li>- </ul>- {% endif %}+<div is="mwmbl-add-result" style="display: none">+ <form class="modal-content"+ hx-post="/app/add/"+ hx-target=".main"+ hx-include=".result"+ hx-vals='{"query": "{{ query }}"{% if curation %}, "curation_id": {{ curation.id }}{% endif %}}'+ hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>+ <span class="close">×</span>+ <label>+ Enter a URL: <input class="add-result" name="new_url" placeholder="https://something.org">+ </label>+ <input type="submit" class="button" value="Save"/>+ </form>+</div>+{% if query %}+ <button class="button curate-add" is="mwmbl-add-button">+ Add new</button>+ {% if curation %}+ <button class="button"+ id="revert-button"+ hx-post="/app/revert-current/"+ hx-target=".main"+ hx-vals='{"curation_id": {{ curation.id }}}'+ hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>↺ Revert {{ curation.num_changes }} change{{ curation.num_changes|pluralize:"s" }}</button>{% else %}- {% for item in activity %}- <ul>- <li class="activity">- <h1>- {% if item.user %}{{ item.user }}{% else %}Anonymous{% endif %} made {{ item.num_changes | apnumber }}- changes to <a href="/?q={{ item.query|urlencode }}">{{ item.query }}</a> {{ item.timestamp | naturaltime }}.- </h1>- </li>- </ul>- {% endfor %}+ <button class="disabled-button" id="revert-button">↺ Revert</button>{% endif %}-</div>+ {% if results %}+ <ul class='results'>+ {% for result in results %}+ {% include "result.html" %}+ {% endfor %}+ </ul>+ {% else %}+ <ul>+ <li class="home">+ <h1>+ No results found for "{{query}}".+ </h1>+ </li>+ </ul>+ {% endif %}+{% else %}+ {% for item in activity %}+ <ul>+ <li class="activity">+ <h1>+ {% if item.user %}{{ item.user }}{% else %}Anonymous{% endif %} made {{ item.num_changes | apnumber }}+ changes to <a href="/?q={{ item.query|urlencode }}">{{ item.query }}</a> {{ item.timestamp | naturaltime }}.+ </h1>+ </li>+ </ul>+ {% endfor %}+{% endif %}diff --git a/mwmbl/templates/index.html b/mwmbl/templates/index.htmlindex 595acd1..36f044a 100644--- a/mwmbl/templates/index.html+++ b/mwmbl/templates/index.html@@ -74,7 +74,9 @@{% endif %}</header><main>- {% include "home.html" %}+ <div class="main">+ {% include "home.html" %}+ </div></main><div class="footer"><ul class="footer-list">