Skip to content

Commit

Permalink
✨ add new base template for fullscreen apps
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 authored and pajowu committed Nov 12, 2024
1 parent af3a742 commit 27bd570
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
46 changes: 24 additions & 22 deletions froide/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@
{% load static %}
{% load frontendbuild %}
{% block body_tag %}
{% if request.user.is_authenticated and request.session.impostor %}
{% include "account/includes/impostor.html" %}
{% endif %}
{% block top_block %}{% endblock %}
{% block navbar %}
{% include "header.html" %}
{% endblock %}
{% include "snippets/breadcrumbs.html" %}
{% block body_wrapper %}
<main class="main">
{% block index_banner %}{% endblock %}
{% block foisite_advice %}{% endblock %}
{% block messages %}
{% include "snippets/messages.html" %}
{% endblock messages %}
{% block body %}
<div class="container mb-5 mt-3">
{% block app_body %}{% endblock %}
</div>
{% endblock %}
</main>
{% endblock %}
{% block above_footer %}
{% if request.user.is_authenticated and request.session.impostor %}
{% include "account/includes/impostor.html" %}
{% endif %}
{% block top_block %}{% endblock %}
{% block navbar %}
{% include "header.html" %}
{% endblock %}
{% include "snippets/breadcrumbs.html" %}
{% block body_wrapper %}
<main class="main">
{% block index_banner %}{% endblock %}
{% block foisite_advice %}{% endblock %}
{% block messages %}
{% include "snippets/messages.html" %}
{% endblock messages %}
{% block body %}
<div class="container mb-5 mt-3">
{% block app_body %}{% endblock %}
</div>
{% endblock %}
</main>
{% endblock %}
{% endblock above_footer %}
{% block footer_container %}
{% include "footer.html" %}
{% endblock %}
Expand Down
4 changes: 4 additions & 0 deletions froide/templates/fullscreen_app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block above_footer %}
<div class="body-content">{{ block.super }}</div>
{% endblock above_footer %}
5 changes: 4 additions & 1 deletion frontend/styles/components/base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
body {
body,
.body-content {
display: flex;
min-height: 100vh;
flex-direction: column;
Expand All @@ -18,6 +19,8 @@ small,
}

.main {
display: flex;
flex-direction: column;
flex: 1 0 auto;
}

Expand Down

0 comments on commit 27bd570

Please sign in to comment.