Merge branch 'feature/super-nice-frontend' of data.coop/membersystem into master
This commit is contained in:
commit
2f1cc75834
10
membersystem/context_processors.py
Normal file
10
membersystem/context_processors.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
"""Context processors for the membersystem app."""
|
||||
|
||||
from django.contrib.sites.shortcuts import get_current_site
|
||||
|
||||
|
||||
def current_site(request):
|
||||
"""Include the current site in the context."""
|
||||
return {
|
||||
'site': get_current_site(request)
|
||||
}
|
|
@ -36,10 +36,13 @@ INSTALLED_APPS = [
|
|||
'django.contrib.staticfiles',
|
||||
'django.contrib.sites',
|
||||
|
||||
'membersystem',
|
||||
'profiles',
|
||||
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'django_extensions',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -65,6 +68,7 @@ TEMPLATES = [
|
|||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'membersystem.context_processors.current_site',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
79
membersystem/static/css/membersystem.css
Normal file
79
membersystem/static/css/membersystem.css
Normal file
|
@ -0,0 +1,79 @@
|
|||
/* General styles */
|
||||
html
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: sans-serif;
|
||||
font-size: 2.5vmin;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background: #fff;
|
||||
color: #000;
|
||||
margin: 1em auto;
|
||||
max-width: 50em;
|
||||
padding: 0 1em;
|
||||
box-shadow: 0 0 2.5em rgba(0, 0, 0, 20%);
|
||||
}
|
||||
|
||||
header,
|
||||
footer
|
||||
{
|
||||
background: #eee;
|
||||
padding: .5em;
|
||||
margin: 0 -1em;
|
||||
}
|
||||
|
||||
footer
|
||||
{
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
|
||||
header h1
|
||||
{
|
||||
font-size: 1em;
|
||||
float: left;
|
||||
padding: .5em .5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header ul,
|
||||
footer ul
|
||||
{
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
header ul li,
|
||||
footer ul li
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
header ul li a,
|
||||
footer ul li a
|
||||
{
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: .5em .5em;
|
||||
}
|
||||
|
||||
|
||||
/* Forms */
|
||||
label
|
||||
{
|
||||
display: block;
|
||||
padding: .5em 0;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea
|
||||
{
|
||||
font-size: inherit;
|
||||
}
|
50
membersystem/templates/base.html
Normal file
50
membersystem/templates/base.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE html>
|
||||
{% load static %}
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block head_title %}{% endblock %} – {{ site.name }}</title>
|
||||
{% block extra_head %}{% endblock %}
|
||||
<link rel="stylesheet" href="{% static '/css/membersystem.css' %}" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">{{ site.name }}</a>
|
||||
</h1>
|
||||
<ul>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'account_email' %}">Change e-mail</a></li>
|
||||
<li><a href="{% url 'account_logout' %}">Sign out</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'account_login' %}">Sign in</a></li>
|
||||
<li><a href="{% url 'account_signup' %}">Sign up</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</header>
|
||||
{% block body %}
|
||||
{% if messages %}
|
||||
<ul id="messages">
|
||||
{% for message in messages %}
|
||||
<li>{{message}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
{% block extra_body %}
|
||||
{% endblock %}
|
||||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://data.coop">data.coop</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://git.data.coop/data.coop/membersystem">source code</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
Django==2.0.6
|
||||
django-allauth==0.36.0
|
||||
django-extensions==2.0.7
|
||||
|
|
Loading…
Reference in a new issue