From 4312fae3970e99240d0662cc202e350614661085 Mon Sep 17 00:00:00 2001
From: Anita Lipsky
Date: Fri, 5 Jul 2024 12:46:29 +0200
Subject: [PATCH 01/17] style: Usage, responsive font, alpaca-map tag aligned
within index.html, index.html has own content
---
public/index.html | 22 +++++++++++++++-------
src/alpaca-map.js | 8 ++++++++
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/public/index.html b/public/index.html
index db7d24e..3d4aec7 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,20 +2,28 @@
Home
+
+
-
+
+ Alpaca Map web component - index.html page header
+
diff --git a/src/alpaca-map.js b/src/alpaca-map.js
index f86d65b..245a8f0 100644
--- a/src/alpaca-map.js
+++ b/src/alpaca-map.js
@@ -26,8 +26,16 @@ export default class AlpacaMap extends LitElement {
iconStyles,
css`
:host {
+ /* Ref: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Responsive_Design#responsive_typography */
+ font-size: calc(1rem + 0.75vw);
+
display: block;
+ border: 1px solid black;
+ width: auto;
+ height: auto;
+ padding: 0rem;
}
+
#map {
top: 0;
bottom: 0;
From 808e4630054b78acc5aa1563b3dcf2675f84f9b6 Mon Sep 17 00:00:00 2001
From: Anita Lipsky
Date: Fri, 5 Jul 2024 13:04:59 +0200
Subject: [PATCH 02/17] style: Responsive toggles - work in progress
---
src/alpaca-map.js | 82 ++++++++++++++++++++++++++++++++++-------------
1 file changed, 59 insertions(+), 23 deletions(-)
diff --git a/src/alpaca-map.js b/src/alpaca-map.js
index 245a8f0..48ca1a5 100644
--- a/src/alpaca-map.js
+++ b/src/alpaca-map.js
@@ -36,6 +36,21 @@ export default class AlpacaMap extends LitElement {
padding: 0rem;
}
+ .toggles {
+ /* Ref: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids#the_minmax_function */
+ display: grid;
+ grid-template-columns: repeat(2, minmax(2rem, 1fr));
+ grid-auto-rows: minmax(2rem, auto);
+ gap: 0.25rem;
+
+ /*
+ Ref: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox#horizontal_and_vertical_alignment
+
+ display: flex;
+ align-items: center;
+ justify-content: space-around; */
+ }
+
#map {
top: 0;
bottom: 0;
@@ -169,6 +184,7 @@ export default class AlpacaMap extends LitElement {
}
_filterMarkers(element) {
+ // TODO bugfix to get form directly as added style tags breaks parent logic
const form = new FormData(element.target.parentElement);
const templatePublicPrivate = {
@@ -215,29 +231,49 @@ export default class AlpacaMap extends LitElement {
return html`
From f1aba38a5fcdc78c788e14bd09b1ad1a6ad10402 Mon Sep 17 00:00:00 2001
From: Anita Lipsky
Date: Sat, 6 Jul 2024 13:07:13 +0200
Subject: [PATCH 03/17] style: Skeleton for web component + map containers
---
public/skeleton.html | 61 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 public/skeleton.html
diff --git a/public/skeleton.html b/public/skeleton.html
new file mode 100644
index 0000000..b7015b9
--- /dev/null
+++ b/public/skeleton.html
@@ -0,0 +1,61 @@
+
+
+ Skeleton style
+
+
+
+
+
+
This is the external website content
+
It contains some info then shows the web component below
+
+
+
+ This is the external website which has content below the web component.
+
+
+
+
From d6b1eb34ebfbc392489401c15899cd27ebc57b1a Mon Sep 17 00:00:00 2001
From: Anita Lipsky
Date: Sat, 6 Jul 2024 13:52:54 +0200
Subject: [PATCH 04/17] style: Skeleton with actual map
---
public/skeleton.html | 57 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/public/skeleton.html b/public/skeleton.html
index b7015b9..638ecfa 100644
--- a/public/skeleton.html
+++ b/public/skeleton.html
@@ -25,6 +25,7 @@
.map-container {
background-color: lightgreen;
height: 50%;
+ position: relative;
}
#map {
@@ -33,6 +34,11 @@
height: 100%;
width: auto;
background-color: darkkhaki;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
}
@@ -57,5 +63,56 @@ This is the external website content
This is the external website which has content below the web component.
+
+