Skip to content

Commit

Permalink
feat: load nav item from menu
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Oct 9, 2024
1 parent 1dc3b1e commit 8f86054
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pycon/templates/components/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
{% get_site_root as site_root %}
<ul>
<li><a href="{% pageurl site_root %}" class="nav-link">首页</a></li>
<li><a href="/2024/supporter" class="nav-link">赞助</a></li>
<li><a href="/2024/talks" class="nav-link">演讲</a></li>
{% for child in site_root.get_children.live.in_menu %}
<li><a href="{% pageurl child %}" class="nav-link">{{ child.title }}</a></li>
{% endfor %}
<li><a href="https://jsj.top/f/BYWgq6" class="nav-link">志愿者</a></li>
</ul>
</nav>
14 changes: 14 additions & 0 deletions schedule/templates/schedule/schedule_list_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% load wagtailcore_tags wagtailimages_tags %}


{% block content %}
<main>
<h1 class="title">{{ page.title }}</h1>
<div class="card">
<div class="card-body content">
{{ page.body|richtext }}
</div>
</div>
</main>
{% endblock %}

0 comments on commit 8f86054

Please sign in to comment.