Compare commits
31 commits
422e21aaf1
...
103be9d13d
| Author | SHA1 | Date | |
|---|---|---|---|
|
103be9d13d |
|||
|
f1eacc8484 |
|||
|
d26f237828 |
|||
|
7ed66f1d3f |
|||
|
c1a1f4a600 |
|||
|
bac79a2c08 |
|||
|
b1ddb32ff0 |
|||
|
76a48250e9 |
|||
|
3948872042 |
|||
|
67019cad4c |
|||
|
0feb51d7b4 |
|||
|
bb69f2fa37 |
|||
|
0dda2aec8f |
|||
|
934691c0f9 |
|||
|
9d58927cb4 |
|||
|
67b8322705 |
|||
|
aa68d742c9 |
|||
|
5e0f404fc7 |
|||
|
2daa1e4395 |
|||
|
ee5df288bc |
|||
|
60b6aa1fe8 |
|||
|
1ee225201a |
|||
|
2f43279dd7 |
|||
|
6b8444f19c |
|||
|
5b817e0b3e |
|||
|
e15dad208e |
|||
|
8023dc606b |
|||
|
c6efd3661f |
|||
|
0e79ba0518 |
|||
|
cf735b4278 |
|||
|
ede8a26e59 |
4 changed files with 2 additions and 39 deletions
BIN
Cargo.lock
generated
BIN
Cargo.lock
generated
Binary file not shown.
|
|
@ -38,6 +38,3 @@ default = ["web"]
|
||||||
web = ["dioxus/web"]
|
web = ["dioxus/web"]
|
||||||
desktop = ["dioxus/desktop"]
|
desktop = ["dioxus/desktop"]
|
||||||
mobile = ["dioxus/mobile"]
|
mobile = ["dioxus/mobile"]
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
grass = "0.13"
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
#![expect(
|
|
||||||
clippy::expect_used,
|
|
||||||
reason = "build scripts conventionally panic on failure; there is no caller \
|
|
||||||
to propagate errors to"
|
|
||||||
)]
|
|
||||||
|
|
||||||
use std::{fs, path::Path};
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
// Compile SCSS to CSS
|
|
||||||
let scss_dir = Path::new("assets/styles");
|
|
||||||
let css_dir = Path::new("assets/css");
|
|
||||||
|
|
||||||
// Create CSS output directory if it doesn't exist
|
|
||||||
fs::create_dir_all(css_dir).expect("Failed to create CSS directory");
|
|
||||||
|
|
||||||
// Compile main.scss
|
|
||||||
let scss_input = scss_dir.join("main.scss");
|
|
||||||
let css_output = css_dir.join("main.css");
|
|
||||||
|
|
||||||
if scss_input.exists() {
|
|
||||||
let css = grass::from_path(
|
|
||||||
&scss_input,
|
|
||||||
&grass::Options::default().style(grass::OutputStyle::Compressed),
|
|
||||||
)
|
|
||||||
.expect("Failed to compile SCSS");
|
|
||||||
|
|
||||||
fs::write(&css_output, css).expect("Failed to write CSS");
|
|
||||||
|
|
||||||
// Tell cargo to rerun if SCSS files change
|
|
||||||
println!("cargo:rerun-if-changed=assets/styles");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
//! Styles module for Pinakes UI
|
//! Styles module for Pinakes UI
|
||||||
//!
|
//!
|
||||||
//! Exports the CSS asset for use with Dioxus.
|
//! Exports the SCSS asset for use with Dioxus.
|
||||||
//! SCSS files are compiled to CSS via build.rs.
|
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
pub static STYLES: Asset = asset!("/assets/css/main.css");
|
pub static STYLES: Asset = asset!("/assets/styles/main.scss");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue