Compare commits
3 commits
e1753ae840
...
e51d14b47c
| Author | SHA1 | Date | |
|---|---|---|---|
| e51d14b47c | |||
| fd947858e9 | |||
| 8ef8d0bf81 |
7 changed files with 26 additions and 32 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
@tailwind base;
|
@import "tailwindcss";
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
@theme {
|
||||||
|
--almostscreen: 90vh;
|
||||||
|
--halfscreen: 60vh;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fixed background when scrolling in tailwind
|
/* Fixed background when scrolling in tailwind
|
||||||
* Disabled on iOS devices
|
* Disabled on iOS devices
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ pub fn hero(wallpaper: Option<&'static Wallpaper>) -> impl IntoAny {
|
||||||
<div
|
<div
|
||||||
id="wallpaper"
|
id="wallpaper"
|
||||||
class=tw_join!(
|
class=tw_join!(
|
||||||
"relative", "text-white", "w-full", "h-almostscreen", "bg-center", "bg-cover"
|
"relative", "text-white", "w-full", "h-(--almostscreen)", "bg-center", "bg-cover"
|
||||||
)
|
)
|
||||||
|
|
||||||
style=background_image
|
style=background_image
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub fn wallpapers_page() -> impl IntoAny {
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
|
||||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||||
<div id="map" class="w-full h-halfscreen"></div>
|
<div id="map" class="w-full h-(--halfscreen)"></div>
|
||||||
|
|
||||||
<script inner_html=r#"
|
<script inner_html=r#"
|
||||||
let map = L.map('map').setView([48.858288, 2.294442], 2);
|
let map = L.map('map').setView([48.858288, 2.294442], 2);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ pub fn shell(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
title.into()
|
title.into()
|
||||||
};
|
};
|
||||||
|
|
||||||
let year = jiff::Zoned::now().year();
|
|
||||||
view! {
|
view! {
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
@ -36,15 +35,12 @@ pub fn shell(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
<main class=tw_join!("flex-grow")>
|
<main class=tw_join!("flex-grow")>
|
||||||
{children.into_any()}
|
{children.into_any()}
|
||||||
</main>
|
</main>
|
||||||
<footer class=tw_join!("bg-black")>
|
{footer().into_any()}
|
||||||
<div class=tw_join!("container", "mx-auto", "px-4", "py-8")>
|
|
||||||
<p>"© 2015 - "{year}" Philippe Loctaux, made with "{underline_link(Link::new(uri!("https://leptos.dev").into(), "Leptos"), None).into_any()}"."</p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
</body>
|
||||||
{stats().into_any()}
|
{stats().into_any()}
|
||||||
</html>
|
</html>
|
||||||
}.into_any()
|
}
|
||||||
|
.into_any()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn content_page(title: &str, children: impl IntoAny) -> AnyView {
|
pub fn content_page(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
|
|
@ -62,7 +58,18 @@ pub fn content_page(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
.into_any()
|
.into_any()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn stats() -> impl IntoView {
|
fn footer() -> impl IntoView {
|
||||||
|
let year = jiff::Zoned::now().year();
|
||||||
|
view! {
|
||||||
|
<footer class=tw_join!("bg-black")>
|
||||||
|
<div class=tw_join!("container", "mx-auto", "px-4", "py-8")>
|
||||||
|
<p>"© 2015 - "{year}" Philippe Loctaux, made with "{underline_link(Link::new(uri!("https://leptos.dev").into(), "Leptos"), None).into_any()}"."</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn stats() -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<script inner_html=r#"
|
<script inner_html=r#"
|
||||||
window.goatcounter = {
|
window.goatcounter = {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: {
|
|
||||||
relative: true,
|
|
||||||
files: ["./src/**/*.rs"],
|
|
||||||
},
|
|
||||||
theme: {
|
|
||||||
extend: {
|
|
||||||
height: {
|
|
||||||
almostscreen: "90vh",
|
|
||||||
halfscreen: "60vh",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
}
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "plcom-css-tailwind";
|
name = "plcom-css-tailwind";
|
||||||
inherit src;
|
inherit src;
|
||||||
buildInputs = [ tailwindcss ];
|
nativeBuildInputs = [ tailwindcss ];
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
buildPhase = "${tailwindcss}/bin/tailwindcss --config ${src}/tailwind.config.js --input ${src}/${inputFile} --output $out/output.css --minify";
|
buildPhase = "${tailwindcss}/bin/tailwindcss --input ${src}/${inputFile} --output $out/output.css --cwd ${src} --minify";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
# Gather assets
|
# Gather assets
|
||||||
plcomAssets = import ./crates/plcom/assets.nix {
|
plcomAssets = import ./crates/plcom/assets.nix {
|
||||||
stdenvNoCC = pkgs.stdenvNoCC;
|
stdenvNoCC = pkgs.stdenvNoCC;
|
||||||
tailwindcss = pkgs.tailwindcss;
|
tailwindcss = pkgs.tailwindcss_4;
|
||||||
tailwindProjectRoot = ./crates/plcom;
|
tailwindProjectRoot = ./crates/plcom;
|
||||||
src = ./public;
|
src = ./public;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue