Files
python-tdd/src/static_src/scss/_base.scss

480 lines
12 KiB
SCSS

body {
display: flex;
flex-direction: column;
background-color: rgba(var(--priUser), 1);
color: rgba(var(--secUser), 1);
font-family: Georgia, serif;
height: 100vh;
a {
text-decoration: none;
font-weight: 700;
color: rgba(var(--terUser), 1);
&:hover {
color: rgba(var(--ninUser), 1);
text-shadow: 0 0 0.5rem rgba(var(--terUser), 1);
}
}
.container {
max-width: 960px;
width: 100%;
margin: 0 auto;
// padding: 0 1rem;
flex: 1;
.navbar {
padding: 0.75rem 0;
border-bottom: 0.1rem solid rgba(var(--secUser), 0.4);
.navbar-brand {
margin-left: 1rem;
h1 {
font-size: 2rem;
}
}
.container-fluid {
display: flex;
align-items: center;
gap: 1rem;
margin-right: 0.5rem;
> form { flex-shrink: 0; margin-left: auto; }
}
.navbar-text,
.navbar-link {
flex: 1;
min-width: 0;
text-align: center;
.navbar-label {
display: block;
color: rgba(var(--secUser), 0.7);
font-size: 0.75rem;
}
.navbar-identity {
display: block;
color: rgba(var(--quaUser), 1);
font-size: 0.875rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.input-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
.form-control {
width: auto;
}
}
.form-control {
background-color: rgba(var(--priUser), 1);
color: rgba(var(--secUser), 1);
border: 0.1rem solid rgba(var(--secUser), 0.5);
--_pad-v: 0.5rem;
padding: var(--_pad-v) 0.75rem;
border-radius: calc((var(--_pad-v) * 2 + 1em) / 3);
width: 100%;
font-family: inherit;
&.is-invalid {
border-color: rgba(var(--priRd), 1);
}
&.form-control-lg {
--_pad-v: 0.75rem;
padding: var(--_pad-v) 1rem;
font-size: 1.125rem;
}
&.is-invalid ~ .invalid-feedback {
display: block;
}
&:focus {
border-color: rgba(var(--terUser), 0.75);
box-shadow: 0 0 0.75rem rgba(var(--terUser), 0.5);
}
}
.invalid-feedback {
display: none;
color: rgba(var(--priRd), 1);
font-size: 0.875rem;
margin-top: 0.25rem;
}
.alert {
padding: 0.75rem 1rem;
margin: 0.75rem 0;
border-radius: 0.5rem;
border: 0.1rem solid rgba(var(--priYl), 0.5);
color: rgba(var(--priYl), 1);
&.alert-success {
border-color: rgba(var(--priGn), 0.5);
color: rgba(var(--priGn), 1);
}
&.alert-warning {
border-color: rgba(var(--priOr), 0.5);
color: rgba(var(--priOr), 1);
}
}
.row {
padding: 2rem 0;
.col-md-12 {
width: 100%;
justify-content: center;
}
.col-lg-6 {
max-width: inherit;
margin: 0 1rem;
h2 {
font-size: 3rem;
color: rgba(var(--secUser), 0.6);
margin-bottom: 1rem;
text-align: justify;
text-align-last: justify;
text-justify: inter-character;
text-transform: uppercase;
text-shadow:
1px 1px 0 rgba(255, 255, 255, 0.125), // highlight (up-left)
-0.125rem -0.125rem 0 rgba(0, 0, 0, 0.8) // shadow (down-right)
;
span {
color: rgba(var(--quaUser), 0.6);
}
}
}
}
}
}
@media (min-width: 1200px) {
body .container {
max-width: 1200px;
}
}
@media (orientation: landscape) and (max-width: 1440px) {
$sidebar-w: 4rem;
// ── Sidebar layout: navbar ← left, footer → right ────────────────────────────
body {
flex-direction: row;
}
// Navbar → fixed left sidebar
body .container .navbar {
position: fixed;
left: 0;
top: 0;
height: 100vh;
width: $sidebar-w;
padding: 0.5rem 0;
border-bottom: none;
border-right: 0.1rem solid rgba(var(--secUser), 0.4);
background-color: rgba(var(--priUser), 1);
z-index: 300;
overflow: hidden;
.container-fluid {
flex-direction: column;
height: 100%;
max-height: 700px;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0 0.25rem;
> form { flex-shrink: 0; order: -1; } // logout above brand
}
.navbar-brand h1 {
writing-mode: vertical-rl;
transform: rotate(180deg);
font-size: 1.2rem;
line-height: 1.2;
white-space: nowrap;
// margin-right: 3.25rem;
}
.navbar-brand {
order: 1; // brand at bottom
width: 100%;
display: flex;
justify-content: center;
}
.navbar-link { display: none; }
.navbar-text {
writing-mode: vertical-rl;
transform: rotate(180deg);
font-size: 0.65rem;
white-space: nowrap;
margin: auto 0;
.navbar-label { opacity: 0.7; }
}
.btn-primary {
width: 3rem;
height: 3rem;
font-size: 0.75rem;
border-width: 0.125rem;
// margin-left: 0.75rem;
}
// Login form: pull out of narrow sidebar, centre in the viewport content area
.input-group {
display: flex;
position: fixed;
left: $sidebar-w;
right: $sidebar-w;
top: 50%;
transform: translateY(-50%);
flex-direction: column;
align-items: center;
z-index: 50;
.navbar-text {
writing-mode: horizontal-tb;
transform: none;
font-size: 0.75rem;
white-space: normal;
margin: 0 0 0.25rem;
text-align: center;
}
}
}
// Container: fill centre, compensate for fixed sidebars on both sides
body .container {
flex: 1;
min-width: 0;
margin-left: $sidebar-w;
margin-right: $sidebar-w;
padding: 0 0.5rem;
}
// Header row: compact in landscape
body .container .row {
padding: 0.25rem 0;
.col-lg-6 h2 {
font-size: 1.5rem;
margin: 0 0 0.25rem;
letter-spacing: 0.4em;
text-align: center;
text-align-last: center;
}
}
// Footer → fixed right sidebar (mirrors navbar approach — explicit right boundary)
// Use body #id_footer (specificity 0,1,0,1) to beat base #id_footer (0,1,0,0)
// which compiles later in the output and would otherwise override height: 100vh.
body #id_footer {
position: fixed;
right: 0;
top: 0;
width: $sidebar-w;
height: 100vh;
flex-direction: column;
justify-content: center;
align-items: center;
border-top: none;
border-left: 0.1rem solid rgba(var(--secUser), 0.3);
padding: 1rem 0;
gap: 0;
#id_footer_nav {
flex-direction: column-reverse;
width: auto;
max-width: none;
gap: 3rem;
a {
font-size: 1.75rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.footer-container {
position: absolute;
bottom: 0.75rem;
text-align: center;
font-size: 0.55rem;
line-height: 1.4;
color: rgba(var(--secUser), 0.5);
br { display: block; }
}
}
}
@media (orientation: portrait) and (max-width: 500px) {
body .container {
.navbar {
padding: 0 0 0.25rem 0;
.navbar-brand h1 {
font-size: 1.2rem;
}
.btn-primary {
width: 3rem;
height: 3rem;
font-size: 0.75rem;
border-width: 0.125rem;
}
}
.row .col-lg-6 h2 {
text-align: center;
text-align-last: center;
letter-spacing: 0.33em;
margin: 0;
font-size: 2rem;
&#id_dash_wallet {
letter-spacing: 0.25em;
}
}
}
}
// @media (min-width: 1024px) and (max-height: 700px) {
// body .container .navbar {
// padding: 0.5rem 0;
// .navbar-brand h1 {
// font-size: 1.4rem;
// }
// }
// #id_footer {
// height: 3.5rem;
// padding: 0.7rem 1rem;
// gap: 0.35rem;
// #id_footer_nav a {
// font-size: 1.2rem;
// }
// }
// }
#id_footer {
flex-shrink: 0;
height: 6rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: center;
padding: 1rem 1rem;
border-top: 0.1rem solid rgba(var(--secUser), 0.3);
// background: linear-gradient(
// to top,
// rgba(var(--priUser), 1) 25%,
// transparent 100%
// );
#id_footer_nav {
display: flex;
justify-content: space-evenly;
width: 80%;
max-width: 500px;
a {
font-size: 1.75rem;
color: rgba(var(--secUser), 0.6);
text-shadow:
0 0 0.25rem rgba(0, 0, 0, 0.25),
;
&.active {
color: rgba(var(--quaUser), 1);
text-shadow:
0 0 0.5rem rgba(0, 0, 0, 0.5),
;
}
&:hover {
color: rgba(var(--quaUser), 1);
text-shadow:
0 0 1rem rgba(0, 0, 0, 0.25),
0 0 0.5rem rgba(var(--ninUser), 0.25)
;
}
}
}
.footer-container {
br { display: none; }
small {
font-size: 0.7rem;
opacity: 0.6;
}
}
}
.forthcoming {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
font-style: italic;
opacity: 0.6;
}
#id_guard_portal {
display: none;
position: fixed;
z-index: 10000;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
background-color: rgba(var(--tooltip-bg), 0.5);
backdrop-filter: blur(6px);
border: 0.1rem solid rgba(var(--secUser), 0.4);
box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4);
&.active {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.guard-message {
font-size: 0.85rem;
color: rgba(var(--secUser), 0.9);
text-align: center;
}
.guard-actions {
display: flex;
gap: 0.5rem;
}
}