add a guide topics system

This commit is contained in:
2025-12-05 13:53:21 +03:00
parent 65abea2093
commit db677abaa5
17 changed files with 405 additions and 19 deletions

View File

@@ -2,5 +2,6 @@
<span>Pyrom commit <a href="{{ "https://git.poto.cafe/yagich/pyrom/commit/" + __commit }}">{{ __commit[:8] }}</a></span>
<ul class="horizontal">
<li><a href="{{ url_for('guides.contact') }}">Contact</a></li>
<li><a href="{{ url_for('guides.guides_index') }}">Guides</a></li>
</ul>
</footer>

View File

@@ -99,7 +99,7 @@
<button data-send="insertBabycodeTag" data-tag="spoiler=" data-break-line="1" data-prefill="hidden content" class="babycode-button contain-svg" type=button id="post-editor-spoiler" title="Insert spoiler" {{"disabled" if "spoiler" in banned_tags else ""}}>{{ icn_spoiler() }}</button>
</span>
<textarea class="babycode-editor" name="{{ ta_name }}" id="babycode-content" placeholder="{{ ta_placeholder }}" {{ "required" if not optional else "" }} autocomplete="off" data-receive="insertBabycodeTag addQuote">{{ prefill }}</textarea>
<a href="{{ url_for("guides.babycode") }}" target="_blank">babycode guide</a>
<a href="{{ url_for("guides.guide_page", category='user', slug='babycode') }}" target="_blank">babycode guide</a>
{% if banned_tags %}
<div>Forbidden tags:</div>
<div>
@@ -296,6 +296,7 @@
</div>
<div class="guide-toc">
<h2>Table of contents</h2>
<a href="#top">(top)</a>
{% set toc = sections | extract_h2 %}
<ul>
{% for heading in toc %}