create basic django app serving the Gähsnitz website
This commit is contained in:
0
gaehsnitz/__init__.py
Normal file
0
gaehsnitz/__init__.py
Normal file
6
gaehsnitz/apps.py
Normal file
6
gaehsnitz/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GaehsnitzConfig(AppConfig):
|
||||
name = "gaehsnitz"
|
||||
verbose_name = "Gähsnitz Open Air"
|
||||
79
gaehsnitz/static/gaehsnitz/style.css
Normal file
79
gaehsnitz/static/gaehsnitz/style.css
Normal file
@@ -0,0 +1,79 @@
|
||||
html, body, div,
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
a, p, b, i,
|
||||
form, label, input,
|
||||
table, thead, tbody, tr, td {
|
||||
margin: 0;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 600px) and (max-width: 899px) {
|
||||
html, body {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 900px) {
|
||||
html, body {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #111111;
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
#title, #navi, #content {
|
||||
flex: 0 1 auto;
|
||||
width: 95%;
|
||||
max-width: 1200px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
#title {
|
||||
margin-top: 16px;
|
||||
font-size: 1.6rem;
|
||||
text-align: center;
|
||||
color: #EE9933;
|
||||
text-shadow: 0 0 16px #EE9933;
|
||||
}
|
||||
|
||||
#navi {
|
||||
border-top: 1px solid #663322;
|
||||
border-bottom: 1px solid #663322;
|
||||
color: #663322;
|
||||
padding: 8px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #EE9933;
|
||||
transition: color 100ms;
|
||||
}
|
||||
|
||||
a:hover, a:focus {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 1.3rem;
|
||||
font-weight: bold;
|
||||
color: #EECC66;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 6px 0 10px;
|
||||
}
|
||||
30
gaehsnitz/templates/gaehsnitz/base.html
Normal file
30
gaehsnitz/templates/gaehsnitz/base.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<title>Gähsnitz Open Air</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'gaehsnitz/style.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="title">
|
||||
Gähsnitz Open Air 2022
|
||||
</div>
|
||||
|
||||
<div id="navi">
|
||||
<a href="#">News</a>
|
||||
|
|
||||
<a href="#">A-Z</a>
|
||||
|
|
||||
<a href="#">Bands</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
9
gaehsnitz/templates/gaehsnitz/index.html
Normal file
9
gaehsnitz/templates/gaehsnitz/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "gaehsnitz/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Bald, dooo!</h1>
|
||||
|
||||
<p>Das bisschen Website macht sich von allein, nimmt man an.</p>
|
||||
|
||||
{% endblock %}
|
||||
7
gaehsnitz/urls.py
Normal file
7
gaehsnitz/urls.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from gaehsnitz.views import IndexView
|
||||
|
||||
urlpatterns = [
|
||||
path("", IndexView.as_view(), name="index"),
|
||||
]
|
||||
5
gaehsnitz/views.py
Normal file
5
gaehsnitz/views.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
template_name = "gaehsnitz/index.html"
|
||||
Reference in New Issue
Block a user