Skip to content

Commit 4b2d026

Browse files
committed
✨ adjust pub_base for new header
1 parent f48c196 commit 4b2d026

File tree

1 file changed

+28
-50
lines changed

1 file changed

+28
-50
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,47 @@
1-
{% extends "cms/page.html" %}
1+
{% extends "cms/page_breadcrumb.html" %}
22

33
{% load i18n %}
44
{% load cms_tags %}
55
{% load menu_tags %}
66
{% load fds_cms_tags %}
77

88
{% block body %}
9+
{% page_url request.current_page|get_soft_root as base_url %}
10+
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}
911

10-
{% page_url request.current_page|get_soft_root as base_url %}
11-
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}
12-
13-
<div class="app bg-body-tertiary">
14-
<div class="sticky-top z-3">
15-
<nav class="navbar text-bg-highlight">
16-
<div class="container d-flex">
17-
<a href="{{ base_url }}" title="{{ base_title }}" class="navbar-brand mb-0 d-md-none w-100 text-truncate">{{ base_title }}</a>
18-
<a href="{{ base_url }}" class="navbar-brand mb-0 d-none d-md-block">{{ base_title }}</a>
12+
<div class="app container-md-full">
13+
<div class="row">
14+
<div class="col-md-10 col-lg-6 offset-lg-1 mt-3 mb-3 order-md-last">
15+
<div id="content" class="container">
16+
{% block app_body %}
17+
{% placeholder "content" %}
18+
{% endblock app_body %}
19+
</div>
20+
</div>
1921

20-
<button class="navbar-toggler me-lg-2 ms-xs-0 ms-lg-auto" type="button" data-bs-toggle="collapse" data-bs-target="#chapters" aria-controls="chapters" aria-expanded="false" aria-label="{% translate 'Toggle chapter navigation' %}">
21-
<i class="fa fa-list" aria-hidden="true"></i>
22-
<span class="d-none d-sm-inline">{% translate "Chapters" %}</span>
23-
</button>
22+
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
23+
<div class="col col-lg-3">
24+
<div class="sticky-top z-2 pt-md-1 small">
25+
<div class="bg-blue-100 p-3 tight-margin">
26+
<p class="text-muted">{% trans "In this chapter:" %}</p>
27+
<div id="toc" class="toc"></div>
28+
</div>
29+
30+
<div class="bg-body-tertiary p-3 tight-margin mt-3">
31+
<p class="text-muted">{% trans "Chapter overview:" %}</p>
2432

25-
<form role="search" method="get" action="{{ base_url }}suche/">
26-
<div class="input-group d-none d-sm-flex">
27-
<input class="form-control form-control-sm" type="text" size="20" name="q" placeholder="{% translate 'Search' %}" aria-label="{% translate 'Search' %}" {% if form %}value="{{ form.cleaned_data.q }}"{% endif %}>
28-
<button class="btn btn-sm btn-outline-dark" type="submit">
29-
<i class="fa fa-search" aria-hidden="true"></i>
30-
<span class="visually-hidden">{% translate "Search" %}</span>
31-
</button>
33+
<ol class="overflow-auto m-0" style="max-height: 50vh">
34+
{% show_menu 1 100 0 1 %}
35+
</ol>
36+
</div>
3237
</div>
33-
<button class="btn btn-sm btn-outline-dark d-block d-sm-none" type="submit">
34-
<i class="fa fa-search" aria-hidden="true"></i>
35-
<span class="visually-hidden">{% translate "Search" %}</span>
36-
</button>
37-
</form>
38-
</div>
39-
</nav>
40-
<div class="collapse text-bg-highlight" id="chapters">
41-
<div class="container">
42-
<ol class="pb-2 overflow-auto" style="max-height: 50vh">
43-
{% show_menu 1 100 0 1 %}
44-
</ol>
45-
</div>
46-
</div>
47-
</div>
48-
<div class="container">
49-
<div class="row justify-content-center">
50-
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
51-
<div class="col">
52-
<div id="toc" class="sticky-top z-2 toc bg-body-secondary my-3 mx-0 mx-md-3 p-3 small" style="top: 5rem"></div>
5338
</div>
5439
{% endif %}
55-
<div class="bg-body col-md-10 col-lg-8 order-md-last mt-3 mb-3 ">
56-
<div id="content" class="py-3 px-1 py-md-5 px-md-5">
57-
{% block app_body %}
58-
{% placeholder "content" %}
59-
{% endblock %}
60-
</div>
61-
</div>
6240
</div>
63-
</div>
41+
6442
</div>
6543

6644
{% static_placeholder "book_pub_footer" %}
6745

6846
{% include "_frontend.html" with entry_point="bookpub.js" %}
69-
{% endblock %}
47+
{% endblock body %}

0 commit comments

Comments
 (0)