Compare commits

..

No commits in common. "817ea2a702346b2f7ea413ba0b6b61dfb45420de" and "33f5e7a285f899a2a995872154fd9199e746804e" have entirely different histories.

7 changed files with 309 additions and 608 deletions

View file

@ -1,52 +0,0 @@
html.dark body {
--splash: #5b47e0;
background: var(--dark-dark);
color: var(--medium-dust)
}
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6,
html.dark footer,
html.dark nav ol li a {
color: var(--medium-dust);
}
html.dark nav ol li a:not(.current):hover {
border-color: var(--medium-dust);
}
html.dark header,
html.dark main aside,
html.dark nav {
background: #1d1d1d;
}
html.dark nav {
border: none;
}
html.dark hr {
border-color: var(--twilight);
}
html.dark main aside div,
html.dark article div.content-view {
background: var(--dark-twilight);
}
html.dark article table tbody {
background: var(--dark-twilight);
}
html.dark article table tbody tr:nth-child(2n+1) {
background: var(--dark);
}
html.dark article table tbody tr:nth-child(2n+1) td {
border-top: 1px solid var(--dark-dark);
border-bottom: 1px solid var(--dark-dark);
}

View file

@ -1,66 +1,38 @@
/* Reset */
*,
*::before,
*::after {
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
body {
line-height: 1.5;
}
img,
picture,
video,
canvas,
svg {
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
input, button, textarea, select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
#root,
#__next {
#root, #__next {
isolation: isolate;
}
/* Variables */
:root {
color-scheme: light dark;
/* Colors */
--light: #ffffff;
--light-dust: #fefef9;
--dust: #f4f1ef;
--medium-dust: #dadada;
--light : #fff;
--light-dust : #f6f6f6;
--dust : #f1f1f1;
--dark-dust : #bfbfbf;
--fade : #878787;
--twilight : #4a4a4a;
--dark-twilight: #2f2f2f;
--dark : #2a2a2a;
--dark-dark: #121212;
--light-custard: #eee7d5;
--custard : #f0dcac;
--dark-custard: #d4c7a9;
--water : #a8f3f4;
--splash : #4b3aba;
@ -78,34 +50,17 @@ h6 {
}
}
html,
body {
html, body {
height : 100%;
font-size: 1.05em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
h1, h2, h3, h4, h5, h6 {
font-weight : 600;
color : var(--twilight);
}
a {
font-weight : 500;
color: var(--splash);
text-decoration: none;
cursor: pointer;
}
hr {
margin: var(--double-space) 0;
height: 0;
border: 0;
border-bottom: 1px solid var(--dark-custard);
}
body {
@ -130,36 +85,21 @@ header>h1 {
font-size : 1.44em;
}
#switch-icon {
width: 30px;
height: 30px;
display: inline-block;
vertical-align: middle;
margin: 0 var(--space);
top: -2px;
position: relative;
}
#switch-icon #layer1 path {
fill: var(--twilight);
}
header>div>a#logout {
header > a.logout {
padding : 6px 12px;
border-radius : 6px;
background : var(--twilight);
text-decoration : none;
color : var(--dust);
transition: background 0.2s;
}
header>div>a#logout:hover {
header > a.logout:hover {
background : var(--splash);
color : var(--light);
}
aside {
padding: 0 var(--outer-space) var(--double-space) var(--outer-space);
padding : var(--double-space) var(--outer-space);
background : var(--light);
}
@ -198,7 +138,7 @@ aside>div>dl>dt {
nav {
display : block;
border-bottom: 1px solid var(--dark-custard);
border-bottom : 1px solid var(--dark-dust);
background : var(--light);
}
@ -245,14 +185,14 @@ article {
padding : var(--double-space) var(--outer-space);
}
article>div.content-view {
article > div {
background : var(--dust);
padding : var(--double-space);
margin-bottom: var(--space);
margin-bottom : var(--double-space);
}
div.content-view > h2 {
margin: 0 0 var(--space) 0;
margin : 0 0 var(--double-space) 0;
}
div.services {
@ -293,20 +233,14 @@ button {
color : var(--light);
background : var(--splash);
padding : var(--space) var(--double-space);
border-radius: var(--quarter-space);
opacity: 0.85;
border-radius : 3px;
opacity : 0.9;
cursor : pointer;
text-align : center;
border : 0;
font-weight : 600;
letter-spacing : 0.03em;
text-decoration : none;
transition: opacity 0.15s;
}
button.small {
font-size: 0.78em;
padding: var(--half-space) var(--space);
}
div.services > div > a:hover,
@ -315,62 +249,6 @@ button:hover {
opacity : 1.0;
}
button:disabled {
opacity: 0.6;
background: var(--twilight);
cursor: default;
}
article table {
width: 100%;
border-spacing: 0;
margin: var(--space) 0;
}
article table thead th {
background: var(--twilight);
color: var(--medium-dust);
}
article table thead th a {
color: var(--light);
}
article table thead th:first-child {
border-radius: var(--half-space) 0 0 0;
}
article table thead th:last-child {
border-radius: 0 var(--half-space) 0 0;
}
article table tbody {
background: var(--light-dust);
}
article table tbody tr:nth-child(odd) {
background: var(--light-custard);
}
article table tbody tr:nth-child(odd) td {
border-top: 1px solid var(--dark-custard);
border-bottom: 1px solid var(--dark-custard);
}
article table tbody tr:last-child td {
border-bottom: var(--half-space) solid var(--twilight);
}
article table thead th,
article table tbody td {
padding: var(--space);
text-align: left;
}
article table#user_email_table tbody tr td:first-child {
text-align: center;
}
form > div {
margin : 0 0 var(--double-space);
}
@ -381,8 +259,7 @@ form>div>label {
}
form > div > input[type="text"],
form>div>input[type="password"],
input[type="email"] {
form > div > input[type="password"] {
border : 2px solid var(--twilight);
border-radius : 6px;
padding : 8px;
@ -390,18 +267,6 @@ input[type="email"] {
width : 100%;
}
form fieldset {
border: 0;
padding: 0;
margin: 0;
}
form div.buttonHolder {}
form div.buttonHolder button {
display: inline-block;
}
#login {
height : 100%;
display : flex;
@ -488,104 +353,10 @@ span.time_remaining {
display : flex;
justify-content : center;
list-style : none;
padding: var(--half-space) 0;
padding : 0;
margin : 0;
}
.pagination > li {
margin: 0 var(--half-space);
margin : 0 6px;
}
.pagination>li:first-child {
margin-right: var(--double-space);
}
.pagination>li:last-child {
margin-left: var(--double-space);
}
.pagination .page-item {
border: 1px solid var(--fade);
padding: var(--quarter-space) var(--half-space);
border-radius: var(--half-space);
background: var(--light-dust);
font-size: 0.78em;
}
.pagination .page-link {
padding: var(--half-space);
color: var(--twilight);
}
.pagination .page-item.active {
background: var(--twilight);
}
.pagination .page-item.active .page-link {
color: var(--light-dust);
font-weight: bold;
}
.pagination .page-item.disabled {
opacity: 0.6;
}
.pagination .page-item.disabled .page-link {
cursor: default;
}
/*
@media (prefers-color-scheme: dark) {
body {
background: var(--dark-dark);
color: var(--medium-dust)
}
h1,
h2,
h3,
h4,
h5,
h6,
footer,
nav ol li a {
color: var(--medium-dust);
}
nav ol li a:not(.current):hover {
border-color: var(--medium-dust);
}
header,
main aside,
nav {
background: #1d1d1d;
}
nav {
border: none;
}
hr {
border-color: var(--twilight);
}
main aside div,
article div.content-view {
background: var(--dark-twilight);
}
article table tbody {
background: var(--dark-twilight);
}
article table tbody tr:nth-child(2n+1) {
background: var(--dark);
}
article table tbody tr:nth-child(2n+1) td {
border-top: 1px solid var(--dark-dark);
border-bottom: 1px solid var(--dark-dark);
}
}
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -2,26 +2,29 @@
{% load i18n %}
{% block head_title %}{% trans "Email Addresses" %}{% endblock %}
{% block head_title %}{% trans "E-mail Addresses" %}{% endblock %}
{% block content %}
<div class="content-view">
<h2>{% trans "Email Addresses" %}</h2>
<p>{% trans 'The following email addresses are associated with your account:' %}</p>
<hr />
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4>{% trans "E-mail Addresses" %}</h4>
</div>
<div class="panel-body">
{% if user.emailaddress_set.all %}
<form action="{% url 'account_email' %}" class="email_list" method="post">
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list"
method="post">
{% csrf_token %}
<fieldset class="blockLabels">
<div class="buttonHolder">
<button class="small" name="action_add" style="float:right">Add Email …</button>
<button class="small" disabled type="submit" id="action_primary" name="action_primary">Make Primary</button>
<button class="small" type="submit" name="action_send">Re-send Verification</button>
<button class="small" type="submit" name="action_remove">Remove</button>
</div>
<table class="table" id="user_email_table">
<table class="table">
<thead>
<tr>
<th></th>
@ -31,8 +34,9 @@
</tr>
</thead>
<tbody>
{% for emailaddress in user.emailaddress_set.all %}
<tr>
<tr class="ctrlHolder">
<label for="email_radio_{{ forloop.counter }}"
class="{% if emailaddress.primary %}primary_email{% endif %}">
<td>
@ -44,7 +48,6 @@
{% if emailaddress.primary or user.emailaddress_set.count == 1 %}
checked="checked"
{% endif %}
class="{% if emailaddress.primary %}primary_email{% endif %}"
/>
</td>
<td>
@ -52,15 +55,14 @@
</td>
<td>
{% if emailaddress.verified %}
<span class="label label-success">{% trans "Verified" %}</span>
<span class="label label-success">Verified</span>
{% else %}
<span class="label label-danger">{% trans "Unverified" %}</span>
<span class="label label-danger">Unverified</span>
{% endif %}
</td>
<td>
{% if emailaddress.primary %}
<span class="label label-primary">{% trans "Primary" %}</span>
{% endif %}
<span class="label label-primary">Primary</span>{% endif %}
</td>
</label>
</tr>
@ -68,6 +70,19 @@
</tbody>
</table>
<div class="buttonHolder">
<button class="btn btn-success" type="submit"
name="action_primary">Make Primary
</button>
<button class="btn btn-primary" type="submit"
name="action_send">Re-send Verification
</button>
<button class="btn btn-danger" type="submit"
name="action_remove">Remove
</button>
</div>
</fieldset>
</form>
{% else %}
@ -76,10 +91,13 @@
{% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}
</p>
{% endif %}
<!--
<hr />
</div>
</div>
<h3>{% trans "Add E-mail" %}</h3>
<div class="panel panel-default">
<div class="panel-heading">
<h4>{% trans "Add E-mail" %}</h4>
</div>
<div class="panel-body">
<form method="post" action="{% url 'account_email' %}"
class="add_email">
@ -90,7 +108,9 @@
</button>
</form>
</div>
-->
</div>
</div>
</div>
<script type="text/javascript">
@ -104,15 +124,6 @@
}
});
}
let radio_actions = document.getElementsByName('email');
if (radio_actions.length) {
for (radio of radio_actions) {
radio.addEventListener("change", function (e) {
document.getElementById('action_primary').disabled = e.target.classList.contains('primary_email')
});
}
}
})();
</script>

View file

@ -20,13 +20,13 @@
<div>
<label for="id_username"
class="visually-hidden">
{% trans "Email" %}
{% trans "E-mail" %}
</label>
<input type="text"
id="id_username"
name="login"
class="form-control mb-lg-2"
placeholder="{% trans "Email" %}"
placeholder="{% trans "E-mail" %}"
required
autofocus>
</div>
@ -42,7 +42,7 @@
required>
</div>
<div>
<button type="submit">{% trans "Login" %}</button>
<button type="submit">{% trans "Sign in" %}</button>
</div>
</form>
<div>
@ -55,7 +55,7 @@
<div class="signup">
<img src="https://data.coop/static/img/logo_da.svg" alt="data.coop logo">
<div class="new_here">
<h2>{% trans "Are you new here?" %}</h2>
<h2> Are you new here? </h2>
<a class="button" href="{% url "account_signup" %}">{% trans "Become a member" %}</a>
</div>
</div>

View file

@ -10,39 +10,11 @@
<title>{% block head_title %}{% endblock %} {{ site.name }}</title>
<link rel="stylesheet" href="{% static "fonts/inter.css" %}">
<link rel="stylesheet" href="{% static "css/style.css" %}">
<link rel="stylesheet" href="{% static "css/dark-style.css" %}">
<script>
const savedTheme = localStorage.getItem('theme');
if (savedTheme === "dark" || (savedTheme == null && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
document.querySelector('html').classList.add('dark');
}
</script>
</head>
<body>
<header>
<h1> data.coop membersystem </h1>
<div>
<a id="theme-switcher" title="Switch theme">
<svg id="switch-icon"
width="20.00033mm"
height="20.000334mm"
viewBox="0 0 20.00033 20.000334"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g id="layer1">
<path id="path1"
style="fill-opacity:1;stroke:none;stroke-width:0.697782;stroke-linecap:round"
d="M 9.999906,20.000334 A 10,10 0 0 0 20.000329,9.999911 10,10 0 0 0 9.999906,0 10,10 0 0 0 0,9.999911 10,10 0 0 0 9.999906,20.000334 Z m 0,-2.00039 V 1.99988 a 8,8 0 0 1 8.000023,8.000031 8,8 0 0 1 -8.000023,8.000033 z" />
</g>
</svg>
</a>
<a id="logout" href="{% url "account_logout" %}">Log out</a>
</div>
<a class="logout" href="{% url "account_logout" %}">Log out</a>
</header>
<main>
<aside>
@ -108,14 +80,5 @@
<footer>
data.coop membersystem version 0.0.1
</footer>
<script>
const themeSwitcher = document.getElementById('theme-switcher');
themeSwitcher.addEventListener('click', function() {
themeSwitcher.classList.toggle('active')
let isDark = document.querySelector('html').classList.toggle('dark');
localStorage.setItem('theme', isDark ? 'dark' : 'light');
});
</script>
</body>
</html>