Skip to content

Commit

Permalink
collect static
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikiejoe committed Oct 29, 2024
1 parent f986cb8 commit 898027c
Show file tree
Hide file tree
Showing 36 changed files with 6,534 additions and 5,297 deletions.
2 changes: 2 additions & 0 deletions cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from decouple import config
import sys
from dotenv import load_dotenv

load_dotenv()

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand Down Expand Up @@ -55,6 +56,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
]

ROOT_URLCONF = "cms.urls"
Expand Down
4 changes: 4 additions & 0 deletions static/admin/css/autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,7 @@ select.admin-autocomplete {
display: block;
padding: 6px;
}

.errors .select2-selection {
border: 1px solid var(--error-fg);
}
90 changes: 62 additions & 28 deletions static/admin/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ html[data-theme="light"],
--body-fg: #333;
--body-bg: #fff;
--body-quiet-color: #666;
--body-medium-color: #444;
--body-loud-color: #000;

--header-color: #ffc;
Expand All @@ -22,11 +23,11 @@ html[data-theme="light"],

--breadcrumbs-fg: #c4dce8;
--breadcrumbs-link-fg: var(--body-bg);
--breadcrumbs-bg: var(--primary);
--breadcrumbs-bg: #264b5d;

--link-fg: #417893;
--link-hover-color: #036;
--link-selected-fg: #5b80b2;
--link-selected-fg: var(--secondary);

--hairline-color: #e8e8e8;
--border-color: #ccc;
Expand All @@ -42,10 +43,10 @@ html[data-theme="light"],
--selected-row: #ffc;

--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--button-bg: var(--secondary);
--button-hover-bg: #205067;
--default-button-bg: #205067;
--default-button-hover-bg: var(--secondary);
--close-button-bg: #747474;
--close-button-hover-bg: #333;
--delete-button-bg: #ba2121;
Expand All @@ -56,8 +57,6 @@ html[data-theme="light"],
--object-tools-hover-bg: var(--close-button-hover-bg);

--font-family-primary:
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
system-ui,
Roboto,
Expand Down Expand Up @@ -86,6 +85,8 @@ html[data-theme="light"],
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";

color-scheme: light;
}

html, body {
Expand Down Expand Up @@ -149,7 +150,6 @@ h1 {
margin: 0 0 20px;
font-weight: 300;
font-size: 1.25rem;
color: var(--body-quiet-color);
}

h2 {
Expand All @@ -165,14 +165,15 @@ h2.subhead {
h3 {
font-size: 0.875rem;
margin: .8em 0 .3em 0;
color: var(--body-quiet-color);
color: var(--body-medium-color);
font-weight: bold;
}

h4 {
font-size: 0.75rem;
margin: 1em 0 .8em 0;
padding-bottom: 3px;
color: var(--body-medium-color);
}

h5 {
Expand Down Expand Up @@ -219,6 +220,10 @@ fieldset {
border-top: 1px solid var(--hairline-color);
}

details summary {
cursor: pointer;
}

blockquote {
font-size: 0.6875rem;
color: #777;
Expand Down Expand Up @@ -315,7 +320,7 @@ td, th {
}

th {
font-weight: 600;
font-weight: 500;
text-align: left;
}

Expand All @@ -336,7 +341,7 @@ tfoot td {
}

thead th.required {
color: var(--body-loud-color);
font-weight: bold;
}

tr.alt {
Expand Down Expand Up @@ -484,8 +489,13 @@ textarea {
vertical-align: top;
}

input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=tel], textarea, select, .vTextField {
/*
Minifiers remove the default (text) "type" attribute from "input" HTML tags.
Add input:not([type]) to make the CSS stylesheet work the same.
*/
input:not([type]), input[type=text], input[type=password], input[type=email],
input[type=url], input[type=number], input[type=tel], textarea, select,
.vTextField {
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 5px 6px;
Expand All @@ -494,9 +504,13 @@ input[type=number], input[type=tel], textarea, select, .vTextField {
background-color: var(--body-bg);
}

input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=url]:focus, input[type=number]:focus, input[type=tel]:focus,
textarea:focus, select:focus, .vTextField:focus {
/*
Minifiers remove the default (text) "type" attribute from "input" HTML tags.
Add input:not([type]) to make the CSS stylesheet work the same.
*/
input:not([type]):focus, input[type=text]:focus, input[type=password]:focus,
input[type=email]:focus, input[type=url]:focus, input[type=number]:focus,
input[type=tel]:focus, textarea:focus, select:focus, .vTextField:focus {
border-color: var(--body-quiet-color);
}

Expand Down Expand Up @@ -586,7 +600,7 @@ input[type=button][disabled].default {
font-weight: 400;
font-size: 0.8125rem;
text-align: left;
background: var(--primary);
background: var(--header-bg);
color: var(--header-link-color);
}

Expand Down Expand Up @@ -722,6 +736,11 @@ div.breadcrumbs a:focus, div.breadcrumbs a:hover {
background: url(../img/icon-viewlink.svg) 0 1px no-repeat;
}

.hidelink {
padding-left: 16px;
background: url(../img/icon-hidelink.svg) 0 1px no-repeat;
}

.addlink {
padding-left: 16px;
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
Expand Down Expand Up @@ -831,10 +850,6 @@ a.deletelink:focus, a.deletelink:hover {
height: 100%;
}

#container > div {
flex-shrink: 0;
}

#container > .main {
display: flex;
flex: 1 0 auto;
Expand Down Expand Up @@ -879,9 +894,10 @@ a.deletelink:focus, a.deletelink:hover {
margin-right: -300px;
}

#footer {
clear: both;
padding: 10px;
@media (forced-colors: active) {
#content-related {
border: 1px solid;
}
}

/* COLUMN TYPES */
Expand Down Expand Up @@ -919,7 +935,6 @@ a.deletelink:focus, a.deletelink:hover {
padding: 10px 40px;
background: var(--header-bg);
color: var(--header-color);
overflow: hidden;
}

#header a:link, #header a:visited, #logout-form button {
Expand All @@ -930,11 +945,17 @@ a.deletelink:focus, a.deletelink:hover {
text-decoration: underline;
}

@media (forced-colors: active) {
#header {
border-bottom: 1px solid;
}
}

#branding {
display: flex;
}

#branding h1 {
#site-name {
padding: 0;
margin: 0;
margin-inline-end: 20px;
Expand All @@ -943,7 +964,7 @@ a.deletelink:focus, a.deletelink:hover {
color: var(--header-branding-color);
}

#branding h1 a:link, #branding h1 a:visited {
#site-name a:link, #site-name a:visited {
color: var(--accent);
}

Expand Down Expand Up @@ -1143,3 +1164,16 @@ a.deletelink:focus, a.deletelink:hover {
.base-svgs {
display: none;
}

.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
color: var(--body-fg);
background-color: var(--body-bg);
}
19 changes: 17 additions & 2 deletions static/admin/css/changelists.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
margin: 0 0 0 30px;
}

@media (forced-colors: active) {
#changelist-filter {
border: 1px solid;
}
}

#changelist-filter h2 {
font-size: 0.875rem;
text-transform: uppercase;
Expand Down Expand Up @@ -215,9 +221,9 @@
color: var(--link-hover-color);
}

#changelist-filter #changelist-filter-clear a {
#changelist-filter #changelist-filter-extra-actions {
font-size: 0.8125rem;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid var(--hairline-color);
}

Expand Down Expand Up @@ -265,6 +271,15 @@
background-color: var(--selected-row);
}

@media (forced-colors: active) {
#changelist tbody tr.selected {
background-color: SelectedItem;
}
#changelist tbody tr:has(.action-select:checked) {
background-color: SelectedItem;
}
}

#changelist .actions {
padding: 10px;
background: var(--body-bg);
Expand Down
23 changes: 8 additions & 15 deletions static/admin/css/dark_mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

--body-fg: #eeeeee;
--body-bg: #121212;
--body-quiet-color: #e0e0e0;
--body-quiet-color: #d0d0d0;
--body-medium-color: #e0e0e0;
--body-loud-color: #ffffff;

--breadcrumbs-link-fg: #e0e0e0;
Expand All @@ -29,6 +30,8 @@

--close-button-bg: #333333;
--close-button-hover-bg: #666666;

color-scheme: dark;
}
}

Expand All @@ -39,7 +42,8 @@ html[data-theme="dark"] {

--body-fg: #eeeeee;
--body-bg: #121212;
--body-quiet-color: #e0e0e0;
--body-quiet-color: #d0d0d0;
--body-medium-color: #e0e0e0;
--body-loud-color: #ffffff;

--breadcrumbs-link-fg: #e0e0e0;
Expand All @@ -63,6 +67,8 @@ html[data-theme="dark"] {

--close-button-bg: #333333;
--close-button-hover-bg: #666666;

color-scheme: dark;
}

/* THEME SWITCH */
Expand Down Expand Up @@ -122,16 +128,3 @@ html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
display: block;
}

.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
color: var(--body-fg);
background-color: var(--body-bg);
}
Loading

0 comments on commit 898027c

Please sign in to comment.