- Attendance log
- Total hours for the month: {{period_total}}
+
+ Attendance log
+ Total hours for the month: {{period_total}}
(Does not include current session.)
-
+
+ {% now "F Y" %}
| Station |
@@ -38,9 +45,9 @@
{% if period.clocked_out %}
| {{ period.station_number }} |
- {{ period.clocked_in|localize }} |
+ {{ period.clocked_in }} |
{% if period.clocked_out %}
- {{ period.clocked_out|localize }} |
+ {{ period.clocked_out }} |
{{ period.clocked_in|timesince:period.clocked_out }} |
{% else %}
Current sesson: {{ period.clocked_in|timesince }} |
@@ -52,4 +59,4 @@
{% endfor %}
-
+
diff --git a/attendance/templates/attendance/code_detail.html b/attendance/templates/attendance/code_detail.html
index 56be2e8..26159d4 100644
--- a/attendance/templates/attendance/code_detail.html
+++ b/attendance/templates/attendance/code_detail.html
@@ -4,11 +4,9 @@
{% block content %}
Clock in
-
-
- {% qr_from_text code.qr_code_str size=24 version=2 %}
-
+
Scan code at clock-in station
- Done
+ {% qr_from_text code.qr_code_str size=24 version=2 %}
+ Done
{% endblock %}
diff --git a/static/css/base.css b/static/css/base.css
index 8342344..9417237 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -62,6 +62,7 @@ hr {
display: flex;
align-items: baseline;
justify-content: space-between;
+ margin: 0 1rem;
}
.header {
@@ -104,13 +105,23 @@ label {
font-weight: 700;
}
+select {
+ text-align: left;
+ border: 4px solid #bdc3c7;
+ padding: 0.5em;
+ outline: 0;
+
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
input[type=text],
input[type=email],
input[type=number],
input[type=password],
select[multiple=multiple],
textarea,
-.action-button,
.datepickr {
text-align: left;
color: #2c3e50;
@@ -178,6 +189,10 @@ textarea {
font-style: oblique;
}
+article {
+ margin: 0 1rem;
+}
+
section {
padding: 1em;
@@ -212,9 +227,31 @@ th {
border-color: #bdc3c7;
}
+.action-button {
+
+ font-weight: 900;
+ padding: 0.5em 1em;
+ border: none;
+ max-width: 12rem;
+ background-color: #2980B9;
+ color: #ffffff;
+ cursor: pointer;
+ text-decoration: none;
+
+ box-shadow: 0 4px 0 #2980B9;
+}
+
/* Messages */
.info {color: green;}
+
+
+.code_detail {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ text-align: center;
+}
diff --git a/static/css/normalize.css b/static/css/normalize.css
new file mode 100644
index 0000000..192eb9c
--- /dev/null
+++ b/static/css/normalize.css
@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
diff --git a/static/scss/_codes.scss b/static/scss/_codes.scss
new file mode 100644
index 0000000..e69de29
diff --git a/static/scss/_forms.scss b/static/scss/_forms.scss
new file mode 100644
index 0000000..788da3d
--- /dev/null
+++ b/static/scss/_forms.scss
@@ -0,0 +1,91 @@
+button,
+input,
+optgroup,
+select,
+textarea {
+ color: inherit;
+ font: inherit;
+ margin: 0;
+ max-width: 100%;
+}
+
+input {
+ text-align: left;
+ outline: 0;
+}
+
+label {
+ text-align: left;
+ font-weight: 700;
+}
+
+select {
+ text-align: left;
+ border: 4px solid $grey;
+ padding: 0.5em;
+ outline: 0;
+}
+
+input[type=text],
+input[type=email],
+input[type=number],
+input[type=password],
+select[multiple=multiple],
+textarea {
+ text-align: left;
+ color: $primary-color;
+ border: 4px solid $grey;
+ padding: 0.5rem;
+ outline: 0;
+}
+
+input[type=submit],
+.action-button {
+ font-weight: 900;
+ padding: 0.5em 1em;
+ border: none;
+ background-color: $blue;
+ color: white;
+ cursor: pointer;
+ text-decoration: none;
+}
+
+ input:focus,
+ textarea:focus {
+ border-color: $blue;
+ }
+
+select[multiple=multiple] {
+ height: 125px;
+}
+
+input[type=number] {
+ max-width: 6.25rem;
+ padding: 0 1rem;
+ // height: 3.32em;
+}
+
+input[type=checkbox] {
+ width: 1em;
+ vertical-align: text-top;
+}
+
+textarea {
+ width: 100%;
+ height: 6.25rem;
+ line-height: 1.45;
+}
+
+::-webkit-input-placeholder {
+ font-style: oblique;
+}
+::-moz-input-placeholder {
+ font-style: oblique;
+}
+::-ms-input-placeholder {
+ font-style: oblique;
+}
+
+.action-button {
+ border-radius: 3.75rem;
+}
diff --git a/static/scss/_globals.scss b/static/scss/_globals.scss
new file mode 100644
index 0000000..8ad9e20
--- /dev/null
+++ b/static/scss/_globals.scss
@@ -0,0 +1,81 @@
+html {
+ font-size: 100%;
+}
+
+body {
+ background-color: $bg-color;
+ color: $primary-color;
+ font-family: 'Lato', sans-serif;
+ font-weight: 400;
+ line-height: 1.75;
+ text-rendering: optimizeLegibility;
+}
+p {
+ margin-bottom: 1rem;
+}
+h1, h2, h3, h4, h5 {
+ margin: 3rem 0 1.38rem;
+ font-family: 'Lato', sans-serif;
+ line-height: 1.3;
+ text-rendering: optimizeLegibility;
+}
+h1 {
+ margin-top: 0;
+ font-size: 2.488rem;
+}
+h2 {
+ font-size: 2.074rem;
+}
+h3 {
+ font-size: 1.728rem;
+}
+h4 {
+ font-size: 1.44rem;
+}
+h5 {
+ font-size: 1.2rem;
+}
+small {
+ font-size: 0.833rem;
+}
+
+a {
+ color: $blue;
+ cursor: pointer;
+ white-space: nowrap;
+}
+
+hr {
+ margin: 0;
+ border: 0.8px solid $grey;
+}
+
+// BLOCK ELEMENTS
+main {
+ max-width: 58rem;
+ margin: 0 auto;
+}
+
+
+// TABLES
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ width: 100%;
+ margin-bottom: 1.3em;
+ border: 1px solid $grey;
+}
+
+table a {
+ white-space: normal;
+}
+
+td,
+th {
+ text-align: left;
+ font-size: 0.85em;
+ padding: 2px 10px;
+ border-bottom: 1px solid;
+ border-color: $grey;
+}
diff --git a/static/scss/_helpers.scss b/static/scss/_helpers.scss
new file mode 100644
index 0000000..e5ab0d9
--- /dev/null
+++ b/static/scss/_helpers.scss
@@ -0,0 +1,14 @@
+.panel {
+ max-width: 58rem;
+ padding: 1rem;
+ background-color: white;
+ border-top: 1px solid $grey;
+ border-bottom: 1px solid $grey;
+ margin-bottom: 1.5rem;
+}
+@media screen and (min-width: 58rem) {
+ .panel {
+ border: 1px solid $grey;
+ }
+
+}
diff --git a/static/scss/_instructors.scss b/static/scss/_instructors.scss
new file mode 100644
index 0000000..e69de29
diff --git a/static/scss/_nav.scss b/static/scss/_nav.scss
new file mode 100644
index 0000000..b379aa9
--- /dev/null
+++ b/static/scss/_nav.scss
@@ -0,0 +1,27 @@
+.navbar {
+ display: flex;
+ justify-content: space-between;
+ margin: 1rem;
+
+ &__logo {
+ font-weight: bold;
+ font-size: 1rem;
+ }
+
+ &__nav {
+
+ }
+
+}
+
+.nav {
+ &nav__user {
+
+ }
+ &nav__logout {
+
+ }
+ &nav__login {
+
+ }
+}
diff --git a/static/scss/_periods.scss b/static/scss/_periods.scss
new file mode 100644
index 0000000..e69de29
diff --git a/static/scss/_registration.scss b/static/scss/_registration.scss
new file mode 100644
index 0000000..e69de29
diff --git a/static/scss/_students.scss b/static/scss/_students.scss
new file mode 100644
index 0000000..ce50305
--- /dev/null
+++ b/static/scss/_students.scss
@@ -0,0 +1,27 @@
+.student {
+
+ &__header {
+ display: flex;
+ justify-content: space-between;
+ align-items: baseline;
+ }
+
+ &__department {
+ margin-top: 0;
+ }
+
+ &__clocked-in {
+ background-color: $green;
+ color: white;
+ padding: 0.5rem;
+ font-weight: bold;
+ }
+}
+
+.attendance {
+ margin: 0 1rem;
+
+ &__month {
+ font-weight: bold;
+ }
+}
diff --git a/static/scss/_variables.scss b/static/scss/_variables.scss
new file mode 100644
index 0000000..a170298
--- /dev/null
+++ b/static/scss/_variables.scss
@@ -0,0 +1,16 @@
+/*bg (gray) white
+primary (black) #323834
+faded (light-black) #747a7c
+accent 1 (red) #2980B9
+accent 2 (orange) #9b6f45
+accent 3 (blue) #242e34
+*/
+
+$bg-color: #f7f7f7;
+$primary-color: #323834;
+$faded-color: #747a7c;
+$blue: #2980B9;
+$orange: #9b6f45;
+$darkblue: #242e34;
+$grey: #bdc3c7;
+$green: green;
diff --git a/static/scss/main.scss b/static/scss/main.scss
new file mode 100644
index 0000000..bc4d059
--- /dev/null
+++ b/static/scss/main.scss
@@ -0,0 +1,11 @@
+@import "variables";
+@import "globals";
+@import "helpers";
+@import "forms";
+@import "nav";
+@import "registration";
+@import "students";
+@import "instructors";
+@import "periods";
+@import "codes";
+
diff --git a/templates/application.html b/templates/application.html
index 6c4e9ea..8e5d3af 100644
--- a/templates/application.html
+++ b/templates/application.html
@@ -1,4 +1,5 @@
{% load static %}
+{% load compress %}
@@ -10,25 +11,33 @@
{% block head %}
{% endblock %}
-
-
+
+ {% compress css %}
+
+
+ {% endcompress %}
-