wizyta oraz widok księdza
This commit is contained in:
94
backend/templates/base.html
Normal file
94
backend/templates/base.html
Normal file
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
{% load static i18n %}
|
||||
|
||||
<html lang="pl" dir="ltr" data-theme="light">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="author" content="Nikola Kubiczek" />
|
||||
|
||||
<title>eParafia</title>
|
||||
<base href="/" />
|
||||
|
||||
{% block head %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="x5-page-mode" content="app" />
|
||||
<meta name="browsermode" content="application" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css" />
|
||||
{% comment %} <link rel="stylesheet" href="/background.css" /> {% endcomment %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Get all "navbar-burger" elements
|
||||
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0)
|
||||
|
||||
// Add a click event on each of them
|
||||
$navbarBurgers.forEach((el) => {
|
||||
el.addEventListener('click', () => {
|
||||
// Get the target from the "data-target" attribute
|
||||
const target = el.dataset.target
|
||||
const $target = document.getElementById(target)
|
||||
|
||||
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
||||
el.classList.toggle('is-active')
|
||||
$target.classList.toggle('is-active')
|
||||
})
|
||||
})
|
||||
|
||||
// main.js
|
||||
|
||||
let installPrompt = null
|
||||
const installButton = document.querySelector('#install')
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
event.preventDefault()
|
||||
installPrompt = event
|
||||
installButton.classList.remove('is-hidden')
|
||||
})
|
||||
|
||||
installButton.addEventListener('click', async () => {
|
||||
if (!installPrompt) {
|
||||
return
|
||||
}
|
||||
const result = await installPrompt.prompt()
|
||||
console.log(`Install prompt was: ${result.outcome}`)
|
||||
disableInAppInstallPrompt()
|
||||
})
|
||||
|
||||
function disableInAppInstallPrompt() {
|
||||
installPrompt = null
|
||||
installButton.classList.add('is-hidden')
|
||||
}
|
||||
|
||||
window.addEventListener('appinstalled', disableInAppInstallPrompt)
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.navbar-link.is-active,
|
||||
a.navbar-item.is-active {
|
||||
color: #0a0a0a;
|
||||
}
|
||||
.navbar-link.is-active:not(:focus):not(:hover),
|
||||
a.navbar-item.is-active:not(:focus):not(:hover) {
|
||||
background-color: initial;
|
||||
}
|
||||
.navbar-item.has-dropdown.is-active .navbar-link,
|
||||
.navbar-item.has-dropdown:focus .navbar-link,
|
||||
.navbar-item.has-dropdown:hover .navbar-link {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="container section">
|
||||
{% block layout %}
|
||||
<main class="section container">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
16
backend/templates/index.html
Normal file
16
backend/templates/index.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="has-text-centered is-flex is-flex-direction-column">
|
||||
<p class="is-size-2 has-text-weight-semibold is-family-monospace">eParafia</p>
|
||||
|
||||
<p class="is-family-monospace">Dziękujemy za korzystanie z naszej aplikacji! Poniżej znajduje się lista odnośników do wszystkich zarejestrowanych z nami parafii. Klikając w przycisk zostaniecie państwo bezpośrednio przekierowani do aplikacji danej parafii</p>
|
||||
|
||||
<p class="is-size-4 has-text-weight-light">Zapraszamy!</p>
|
||||
<div class="is-flex is-flex-direction-column mt-6">
|
||||
{% for parish in parishes %}
|
||||
<a class="button has-text-weight-semibold mx-auto my-2" href="{% url 'parish' parish.slug %}">{{ parish.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
5
backend/templates/parish/announcements.html
Normal file
5
backend/templates/parish/announcements.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">{{res | safe}}</div>
|
||||
{% endblock %}
|
45
backend/templates/parish/base.html
Normal file
45
backend/templates/parish/base.html
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load pictures %}
|
||||
|
||||
{% block head %}
|
||||
<link href="{% img_url parish.icon file_type='png' width=512 %}" rel="icon" type="image/png" sizes="512x512" />
|
||||
<link href="{% img_url parish.icon file_type='png' width=192 %}" rel="icon" type="image/png" sizes="192x192" />
|
||||
<link rel="manifest" href="{% url 'manifest' parish.slug %}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block layout %}
|
||||
<div class="container">
|
||||
<nav class="navbar is-transparent" role="navigation" aria-label="menu">
|
||||
<div class="navbar-brand is-flex is-flex-wrap-wrap is-justify-content-space-between is-flex-shrink-1">
|
||||
<span class="navbar-item is-is-active is-flex-shrink-1"><span class="title is-4 is-unselectable">{{ parish.name }}</span></span>
|
||||
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-menu" id="navMenu">
|
||||
<h5 class="navbar-end has-text-weight-bold">
|
||||
<a class="navbar-item {{ announcements }}" href="{% url 'announcements' parish.slug %}">Ogłoszenia parafialne</a>
|
||||
<a class="navbar-item {{ intentions }}" href="{% url 'intentions' parish.slug %}">Intencje</a>
|
||||
{% if parish.channel %}
|
||||
<a class="navbar-item {{ live }}" href="{% url 'live' parish.slug %}">Transmisja on-line</a>
|
||||
{% endif %}
|
||||
|
||||
{% if parish.submissions %}
|
||||
<a class="navbar-item {{ visit }}" href="{% url 'visit' parish.slug %}">Wizyta Duszpasterska</a>
|
||||
{% endif %}
|
||||
<a class="navbar-item is-clickable is-hidden" id="install">Zainstaluj</a>
|
||||
</h5>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="section">
|
||||
<div id="backgroundDesktop"></div>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
<div id="backgroundMobile"></div>
|
||||
</div>
|
||||
{% endblock %}
|
5
backend/templates/parish/intentions.html
Normal file
5
backend/templates/parish/intentions.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">{{ res | safe }}</div>
|
||||
{% endblock %}
|
14
backend/templates/parish/live.html
Normal file
14
backend/templates/parish/live.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="is-flex-shrink-0">
|
||||
<figure class="image is-16by9">
|
||||
<iframe
|
||||
class="has-ratio"
|
||||
src="https://www.youtube-nocookie.com/embed/live_stream?channel={{parish.channel}}"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
22
backend/templates/parish/manifest.json
Normal file
22
backend/templates/parish/manifest.json
Normal file
@ -0,0 +1,22 @@
|
||||
{% load pictures %}
|
||||
|
||||
{
|
||||
"name": "{{ parish.name }}",
|
||||
"display": "standalone",
|
||||
"scope": "{% url 'parish' parish.slug %}",
|
||||
"start_url": "{% url 'parish' parish.slug %}",
|
||||
"icons": [
|
||||
{
|
||||
"src": "{% img_url parish.icon file_type="png" width=192 %}",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
},
|
||||
{
|
||||
"src": "{% img_url parish.icon file_type="png" width=512 %}",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
}
|
||||
]
|
||||
}
|
8
backend/templates/parish/visit/auth.html
Normal file
8
backend/templates/parish/visit/auth.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<p class="has-text-centered">
|
||||
<a class="button is-light" href="{% url 'visit_login' parish.slug %}">Zaloguj się</a>
|
||||
<a class="button is-light" href="{% url 'visit_signup' parish.slug %}">Zarejestruj się</a>
|
||||
</p>
|
||||
{% endblock %}
|
18
backend/templates/parish/visit/form.html
Normal file
18
backend/templates/parish/visit/form.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<p class="is-size-3 has-text-centered">Zapisz się na wizytę duszpasterską</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<p class="has-text-centered">
|
||||
<button type="submit" class="button is-success">Zatwierdź</button>
|
||||
</p>
|
||||
</form>
|
||||
<form action="{% url 'visit_logout' parish.slug %}" method="post" class="is-flex is-justify-content-flex-end is-gap-2">
|
||||
{% csrf_token %}
|
||||
<a href="{% url 'visit_account' parish.slug %}" class="button is-info">Zmień dane konta</a>
|
||||
<button type="submit" class="button is-danger">Wyloguj się</button>
|
||||
</form>
|
||||
{% endblock %}
|
14
backend/templates/parish/visit/login.html
Normal file
14
backend/templates/parish/visit/login.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<p class="is-size-2 has-text-centered">Zaloguj się</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<p class="has-text-centered">
|
||||
<button type="submit" class="button is-success">Zaloguj się</button>
|
||||
<a href="{% url 'visit' parish.slug %}" class="button is-light">Powrót</a>
|
||||
</p>
|
||||
</form>
|
||||
{% endblock %}
|
14
backend/templates/parish/visit/signup.html
Normal file
14
backend/templates/parish/visit/signup.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<p class="is-size-2 has-text-centered">Zarejestruj się</p>
|
||||
<form method="post" class="form">
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<p class="has-text-centered">
|
||||
<button type="submit" class="button is-success">Zarejestruj się</button>
|
||||
<a href="{% url 'visit' parish.slug %}" class="button is-light">Powrót</a>
|
||||
</p>
|
||||
</form>
|
||||
{% endblock %}
|
28
backend/templates/parish/visit/submitted.html
Normal file
28
backend/templates/parish/visit/submitted.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<p class="is-size-3 has-text-centered">Twoje zgłoszenie</p>
|
||||
<div class="is-size-5 has-text-centered mb-2">
|
||||
<p>
|
||||
<b>Imię i nazwisko:</b> {{ submission.name }}, <b>Telefon:</b> {{ submission.phone }}
|
||||
</p>
|
||||
<p>
|
||||
<b>Adres:</b> {{ submission.street }} {{ submission.street_number }}{% if submission.apartement_number %}/{% endif %}{{ submission.apartement_number|default_if_none:'' }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<p class="has-text-centered">
|
||||
<button type="submit" class="button is-success">Wycofaj zgłoszenie</button>
|
||||
</p>
|
||||
</form>
|
||||
<p>
|
||||
<form action="{% url 'visit_logout' parish.slug %}" method="post" class="is-flex is-justify-content-flex-end">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="button is-danger">Wyloguj się</button>
|
||||
</form>
|
||||
</p>
|
||||
{% endblock %}
|
18
backend/templates/parish/visit/update.html
Normal file
18
backend/templates/parish/visit/update.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends 'parish/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<p class="is-size-3 has-text-centered">Zmień dane konta</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<p class="has-text-centered">
|
||||
<button type="submit" class="button is-success">Zatwierdź</button>
|
||||
<a href="{% url 'visit' parish.slug %}" class="button is-secondary">Powrót</a>
|
||||
</p>
|
||||
</form>
|
||||
{% comment %} <form action="{% url 'visit_logout' parish.slug %}" method="post" class="is-flex is-justify-content-flex-end">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="button is-danger">Wyloguj się</button>
|
||||
</form> {% endcomment %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user