fix map styles
This commit is contained in:
parent
9ecc3f62cf
commit
1761d75ddc
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -725,7 +725,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hauchiwa"
|
name = "hauchiwa"
|
||||||
version = "0.0.2"
|
version = "0.0.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"camino",
|
"camino",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
@ -43,10 +43,8 @@ where
|
||||||
// link rel="sitemap" href="/sitemap.xml";
|
// link rel="sitemap" href="/sitemap.xml";
|
||||||
|
|
||||||
link rel="stylesheet" href="/styles.css";
|
link rel="stylesheet" href="/styles.css";
|
||||||
link rel="stylesheet" href="/static/css/reveal.css";
|
link rel="stylesheet" href="/reveal.css";
|
||||||
link rel="stylesheet" href="/static/css/leaflet.css";
|
link rel="stylesheet" href="/leaflet.css";
|
||||||
link rel="stylesheet" href="/static/css/MarkerCluster.css";
|
|
||||||
link rel="stylesheet" href="/static/css/MarkerCluster.Default.css";
|
|
||||||
link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png";
|
link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png";
|
||||||
link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png";
|
link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png";
|
||||||
link rel="icon" href="/favicon.ico" sizes="any";
|
link rel="icon" href="/favicon.ico" sizes="any";
|
||||||
|
@ -165,6 +163,24 @@ where
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn full<'s, 'p, 'html>(
|
||||||
|
sack: &'s Sack,
|
||||||
|
main: impl Renderable + 'p,
|
||||||
|
title: String,
|
||||||
|
) -> impl Renderable + 'html
|
||||||
|
where
|
||||||
|
's: 'html,
|
||||||
|
'p: 'html,
|
||||||
|
{
|
||||||
|
let main = maud_move!(
|
||||||
|
(navbar())
|
||||||
|
(main)
|
||||||
|
);
|
||||||
|
|
||||||
|
bare(sack, main, title)
|
||||||
|
}
|
||||||
|
|
||||||
fn page<'s, 'p, 'html>(
|
fn page<'s, 'p, 'html>(
|
||||||
sack: &'s Sack,
|
sack: &'s Sack,
|
||||||
main: impl Renderable + 'p,
|
main: impl Renderable + 'p,
|
||||||
|
@ -174,18 +190,13 @@ where
|
||||||
's: 'html,
|
's: 'html,
|
||||||
'p: 'html,
|
'p: 'html,
|
||||||
{
|
{
|
||||||
maud_move!(
|
let main = maud_move!(
|
||||||
(Raw("<!DOCTYPE html>"))
|
|
||||||
html lang="en" {
|
|
||||||
(head(sack, title))
|
|
||||||
|
|
||||||
body {
|
|
||||||
(navbar())
|
(navbar())
|
||||||
(main)
|
(main)
|
||||||
(footer(sack))
|
(footer(sack))
|
||||||
}
|
);
|
||||||
}
|
|
||||||
)
|
bare(sack, main, title)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn to_list(sack: &Sack, list: Vec<LinkDate>, title: String) -> String {
|
pub(crate) fn to_list(sack: &Sack, list: Vec<LinkDate>, title: String) -> String {
|
||||||
|
@ -212,16 +223,14 @@ pub(crate) fn map<'s, 'html>(sack: &'s Sack) -> impl Renderable + 'html
|
||||||
where
|
where
|
||||||
's: 'html,
|
's: 'html,
|
||||||
{
|
{
|
||||||
page(
|
full(
|
||||||
sack,
|
sack,
|
||||||
maud!(
|
maud!(
|
||||||
main {
|
|
||||||
div #map style="height: 100%; width: 100%" {}
|
div #map style="height: 100%; width: 100%" {}
|
||||||
|
|
||||||
script type="module" {
|
script type="module" {
|
||||||
(Raw("import 'photos';"))
|
(Raw("import 'photos';"))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
),
|
),
|
||||||
String::from("Map"),
|
String::from("Map"),
|
||||||
)
|
)
|
||||||
|
|
31
styles/photos/leaflet.scss
Normal file
31
styles/photos/leaflet.scss
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
@use 'leaflet.css';
|
||||||
|
@use 'MarkerCluster.css';
|
||||||
|
@use 'MarkerCluster-Default.css';
|
||||||
|
|
||||||
|
.leaflet-marker-photo {
|
||||||
|
border: 2px solid #fff;
|
||||||
|
box-shadow: 3px 3px 10px #888;
|
||||||
|
|
||||||
|
div {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
b {
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
right: -11px;
|
||||||
|
color: #555;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 12px;
|
||||||
|
min-width: 12px;
|
||||||
|
line-height: 12px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 3px;
|
||||||
|
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
}
|
1
styles/reveal/reveal.scss
Normal file
1
styles/reveal/reveal.scss
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@use 'reveal.css';
|
Loading…
Reference in a new issue