Compare commits
No commits in common. "e51d14b47ccd1facccdf9331045352f1904b5a29" and "e1753ae84060af85ab699b5a504ad662bbc5a897" have entirely different histories.
e51d14b47c
...
e1753ae840
7 changed files with 32 additions and 26 deletions
|
|
@ -1,9 +1,6 @@
|
||||||
@import "tailwindcss";
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
@theme {
|
@tailwind utilities;
|
||||||
--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,6 +8,7 @@ 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">
|
||||||
|
|
@ -35,12 +36,15 @@ 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().into_any()}
|
<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>
|
||||||
</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 {
|
||||||
|
|
@ -58,18 +62,7 @@ pub fn content_page(title: &str, children: impl IntoAny) -> AnyView {
|
||||||
.into_any()
|
.into_any()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn footer() -> impl IntoView {
|
pub fn stats() -> 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 = {
|
||||||
|
|
|
||||||
16
crates/plcom/tailwind.config.js
Normal file
16
crates/plcom/tailwind.config.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
/** @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;
|
||||||
nativeBuildInputs = [ tailwindcss ];
|
buildInputs = [ tailwindcss ];
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
buildPhase = "${tailwindcss}/bin/tailwindcss --input ${src}/${inputFile} --output $out/output.css --cwd ${src} --minify";
|
buildPhase = "${tailwindcss}/bin/tailwindcss --config ${src}/tailwind.config.js --input ${src}/${inputFile} --output $out/output.css --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_4;
|
tailwindcss = pkgs.tailwindcss;
|
||||||
tailwindProjectRoot = ./crates/plcom;
|
tailwindProjectRoot = ./crates/plcom;
|
||||||
src = ./public;
|
src = ./public;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue