-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SCSS styling capabilities * make more use of scss nesting and mixins * up * copy assets to assets-dist, rebuild on change * delete directory before copy * do not canonicalize the prepared assets path * serve the dist dir
- Loading branch information
Showing
16 changed files
with
279 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
@use "../../kitsune-fe/src/styles/colours" as *; | ||
@use "../../kitsune-fe/src/styles/mixins" as *; | ||
|
||
* { | ||
font-family: "Courier New", Courier, monospace; | ||
} | ||
|
||
a { | ||
font-weight: 500; | ||
color: $shade1light; | ||
text-decoration: inherit; | ||
} | ||
|
||
body { | ||
//background-image: url("/public/assets/BG.webp"); | ||
//background-size: cover; | ||
//backdrop-filter: blur(2.5px) saturate(1.4); | ||
//background-position: center; | ||
//background-repeat: no-repeat; | ||
|
||
background-color: $dark1; | ||
color: white; | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
width: 100vw; | ||
} | ||
|
||
.header { | ||
font-size: 4.3rem; | ||
color: $shade2light; | ||
text-shadow: $shade2dark 3px 3px 4.5px; | ||
line-height: 100%; | ||
margin: 25px auto; | ||
|
||
@include only-on-mobile { | ||
font-size: 42px; | ||
color: $shade2light; | ||
text-shadow: $shade2dark 3px 3px 4.5px; | ||
line-height: 100%; | ||
margin: 25px auto; | ||
} | ||
} | ||
|
||
form, | ||
.message { | ||
background: linear-gradient(to top left, $dark2, $dark1); | ||
border: 10px solid; | ||
border-image-slice: 1; | ||
border-width: 4px; | ||
border-image-source: linear-gradient(to left, $shade1light, $shade1dark); | ||
font-size: 18px; | ||
font-weight: 300; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
align-items: center; | ||
justify-content: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
form { | ||
padding: 8vh 4.5vh; | ||
|
||
& .field { | ||
width: 280px; | ||
min-height: 30px; | ||
margin: 10px auto; | ||
margin-bottom: 20px; | ||
border: 0.5px solid $shade2light; | ||
border-radius: 2px; | ||
font-size: 20px; | ||
|
||
@include only-on-mobile { | ||
width: 200px; | ||
min-height: 25px; | ||
margin: 10px auto; | ||
margin-bottom: 20px; | ||
border: 0.5px solid $shade2light; | ||
border-radius: 2px; | ||
font-size: 16px; | ||
} | ||
} | ||
} | ||
|
||
.message, | ||
.consent-forms form { | ||
padding: 2vh; | ||
} | ||
|
||
div.consent-forms { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1em; | ||
} | ||
|
||
.label { | ||
text-transform: uppercase; | ||
} | ||
|
||
.disclaimer { | ||
background: linear-gradient(to right, $dark2, $dark1); | ||
padding: 2vh; | ||
border: 10px solid; | ||
border-image-slice: 1; | ||
border-width: 3px; | ||
border-image-source: linear-gradient(to left, $shade1light, $shade1dark); | ||
font-size: 16px; | ||
font-weight: bold; | ||
max-width: 80%; | ||
|
||
@include only-on-mobile { | ||
font-size: 13px; | ||
max-width: 70%; | ||
text-align: center; | ||
border-width: 3px; | ||
} | ||
} | ||
|
||
.authUsername, | ||
.appName { | ||
color: $shade2light; | ||
font-weight: bold; | ||
} | ||
|
||
.appName { | ||
text-transform: uppercase; | ||
} | ||
|
||
.formButton { | ||
background-color: $shade2dark; | ||
border: 0.5px solid $shade2light; | ||
border-radius: 5px; | ||
padding: 10px; | ||
color: white; | ||
font-size: 20px; | ||
font-weight: 500; | ||
width: 100px; | ||
cursor: pointer; | ||
font-weight: bold; | ||
transition: 0.5s; | ||
|
||
&:hover { | ||
background-color: $shade2light; | ||
color: $dark1; | ||
transition: 0.3s; | ||
} | ||
|
||
@include only-on-mobile { | ||
padding: 8px; | ||
font-size: 16px; | ||
width: 80px; | ||
} | ||
} | ||
|
||
.tokenContainer { | ||
background: linear-gradient(to top left, $dark2, $dark1); | ||
padding: 8vh 4.5vh; | ||
border: 10px solid; | ||
border-image-slice: 1; | ||
border-width: 4px; | ||
border-image-source: linear-gradient(to left, $shade1light, $shade1dark); | ||
font-size: 20px; | ||
font-weight: 300; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
align-items: center; | ||
justify-content: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.token { | ||
border: 0.5px solid $shade2light; | ||
width: 400px; | ||
padding: 20px 10px; | ||
text-align: center; | ||
overflow-x: auto; | ||
font-weight: bold; | ||
|
||
&::-webkit-scrollbar { | ||
width: 0.5em; | ||
height: 10px; | ||
} | ||
|
||
&::-webkit-scrollbar-track { | ||
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background-color: $shade2dark; | ||
outline: 1px solid $dark2; | ||
} | ||
|
||
@include only-on-mobile { | ||
max-width: 250px; | ||
} | ||
} | ||
|
||
@include only-on-mobile { | ||
form, | ||
.tokenContainer { | ||
padding: 6vh 4vh; | ||
font-size: 16px; | ||
border-width: 3px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,43 @@ | ||
fn main() { | ||
use camino::Utf8Path; | ||
use fs_extra::dir::{self, CopyOptions}; | ||
use std::{env, error::Error, io, process::Command}; | ||
|
||
/// Run an `xtask` subcommand | ||
fn xtask(args: &[&str]) -> io::Result<()> { | ||
let output = Command::new(env!("CARGO")) | ||
.args(["run", "--manifest-path", "../xtask/Cargo.toml", "--"]) | ||
.args(args) | ||
.output()?; | ||
|
||
output.status.success().then_some(()).ok_or_else(|| { | ||
let stderr = String::from_utf8(output.stderr).unwrap(); | ||
io::Error::new( | ||
io::ErrorKind::Other, | ||
format!("Failed to run xtask: {stderr}"), | ||
) | ||
}) | ||
} | ||
|
||
fn main() -> Result<(), Box<dyn Error>> { | ||
println!("cargo:rerun-if-changed=assets"); | ||
println!("cargo:rerun-if-changed=templates"); | ||
|
||
let assets_path = Utf8Path::new("./assets").canonicalize_utf8()?; | ||
let prepared_assets_path = Utf8Path::new("./assets-dist"); | ||
|
||
// Only clean the `assets-dist` directory on non-debug builds | ||
if !cfg!(debug_assertions) { | ||
dir::remove(prepared_assets_path)?; | ||
} | ||
|
||
let copy_options = CopyOptions { | ||
overwrite: true, | ||
content_only: true, | ||
..CopyOptions::default() | ||
}; | ||
dir::copy(assets_path, prepared_assets_path, ©_options)?; | ||
|
||
xtask(&["build-scss", "--path", prepared_assets_path.as_str()])?; | ||
|
||
Ok(()) | ||
} |
Oops, something went wrong.