Skip to content

Commit

Permalink
✨ adjust pub_base for new header
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Oct 9, 2023
1 parent f48c196 commit 4b2d026
Showing 1 changed file with 28 additions and 50 deletions.
78 changes: 28 additions & 50 deletions fragdenstaat_de/fds_cms/templates/cms/pub_base.html
Original file line number Diff line number Diff line change
@@ -1,69 +1,47 @@
{% extends "cms/page.html" %}
{% extends "cms/page_breadcrumb.html" %}

{% load i18n %}
{% load cms_tags %}
{% load menu_tags %}
{% load fds_cms_tags %}

{% block body %}
{% page_url request.current_page|get_soft_root as base_url %}
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}

{% page_url request.current_page|get_soft_root as base_url %}
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}

<div class="app bg-body-tertiary">
<div class="sticky-top z-3">
<nav class="navbar text-bg-highlight">
<div class="container d-flex">
<a href="{{ base_url }}" title="{{ base_title }}" class="navbar-brand mb-0 d-md-none w-100 text-truncate">{{ base_title }}</a>
<a href="{{ base_url }}" class="navbar-brand mb-0 d-none d-md-block">{{ base_title }}</a>
<div class="app container-md-full">
<div class="row">
<div class="col-md-10 col-lg-6 offset-lg-1 mt-3 mb-3 order-md-last">
<div id="content" class="container">
{% block app_body %}
{% placeholder "content" %}
{% endblock app_body %}
</div>
</div>

<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' %}">
<i class="fa fa-list" aria-hidden="true"></i>
<span class="d-none d-sm-inline">{% translate "Chapters" %}</span>
</button>
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
<div class="col col-lg-3">
<div class="sticky-top z-2 pt-md-1 small">
<div class="bg-blue-100 p-3 tight-margin">
<p class="text-muted">{% trans "In this chapter:" %}</p>
<div id="toc" class="toc"></div>
</div>

<div class="bg-body-tertiary p-3 tight-margin mt-3">
<p class="text-muted">{% trans "Chapter overview:" %}</p>

<form role="search" method="get" action="{{ base_url }}suche/">
<div class="input-group d-none d-sm-flex">
<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 %}>
<button class="btn btn-sm btn-outline-dark" type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
<span class="visually-hidden">{% translate "Search" %}</span>
</button>
<ol class="overflow-auto m-0" style="max-height: 50vh">
{% show_menu 1 100 0 1 %}
</ol>
</div>
</div>
<button class="btn btn-sm btn-outline-dark d-block d-sm-none" type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
<span class="visually-hidden">{% translate "Search" %}</span>
</button>
</form>
</div>
</nav>
<div class="collapse text-bg-highlight" id="chapters">
<div class="container">
<ol class="pb-2 overflow-auto" style="max-height: 50vh">
{% show_menu 1 100 0 1 %}
</ol>
</div>
</div>
</div>
<div class="container">
<div class="row justify-content-center">
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
<div class="col">
<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>
</div>
{% endif %}
<div class="bg-body col-md-10 col-lg-8 order-md-last mt-3 mb-3 ">
<div id="content" class="py-3 px-1 py-md-5 px-md-5">
{% block app_body %}
{% placeholder "content" %}
{% endblock %}
</div>
</div>
</div>
</div>

</div>

{% static_placeholder "book_pub_footer" %}

{% include "_frontend.html" with entry_point="bookpub.js" %}
{% endblock %}
{% endblock body %}

0 comments on commit 4b2d026

Please sign in to comment.