From 0b0aa75821dc25ac7e68388517e91530dea3e22f Mon Sep 17 00:00:00 2001 From: gael Date: Wed, 7 Feb 2024 11:17:26 +0100 Subject: [PATCH] feat: create and use mixins in draw and rendered shapes --- samples/draw-shapes-events/index.njk | 7 ++- samples/draw-shapes-events/index.ts | 2 +- samples/draw-shapes-events/style.scss | 11 +--- samples/draw-shapes/index.njk | 13 ++-- samples/draw-shapes/index.ts | 43 ++++++------- samples/draw-shapes/style.scss | 64 +++++--------------- samples/map-events/style.scss | 2 +- samples/render-shapes-data-events/index.njk | 7 ++- samples/render-shapes-data-events/index.ts | 2 +- samples/render-shapes-data-events/style.scss | 56 +++++++---------- samples/render-shapes-data/style.scss | 18 ++---- shared/scss/_mixins.scss | 33 ++++++++++ shared/scss/_modal.scss | 39 ++++++++++++ 13 files changed, 153 insertions(+), 144 deletions(-) create mode 100644 shared/scss/_modal.scss diff --git a/samples/draw-shapes-events/index.njk b/samples/draw-shapes-events/index.njk index 1961109f..0fc3a07e 100644 --- a/samples/draw-shapes-events/index.njk +++ b/samples/draw-shapes-events/index.njk @@ -1,6 +1,7 @@ {% extends '../../src/_includes/layout.njk' %} {% block html %} -
- -
+
+
+ +
{% endblock %} diff --git a/samples/draw-shapes-events/index.ts b/samples/draw-shapes-events/index.ts index 3e10133a..4d813e28 100644 --- a/samples/draw-shapes-events/index.ts +++ b/samples/draw-shapes-events/index.ts @@ -57,7 +57,7 @@ const data: woosmap.map.GeoJSONFeatureCollection = { }; function populateTable() { - const eventsTable = document.getElementById("events"); + const eventsTable = document.getElementById("sidebar"); let content = ""; for (let i = 0; i < events.length; i++) { content += `
${events[i]}
`; diff --git a/samples/draw-shapes-events/style.scss b/samples/draw-shapes-events/style.scss index 5388ee92..ed3474b9 100644 --- a/samples/draw-shapes-events/style.scss +++ b/samples/draw-shapes-events/style.scss @@ -1,16 +1,9 @@ @use 'sass:meta'; // To enable @use via meta.load-css and keep comments in order /* [START woosmap_draw_shapes_events] */ -@include meta.load-css("../../shared/scss/_default.scss"); +@include meta.load-css("../../shared/scss/_sidebar.scss"); -#events { - position: absolute; - top: 0; - left: 0; - right: 75%; - bottom: 0; - border-right: 2px solid #f5f5f5; - border-bottom: 1px solid #f5f5f5; +.events { font-family: "Droid Sans Mono", monospace; } diff --git a/samples/draw-shapes/index.njk b/samples/draw-shapes/index.njk index 0f2258cd..cf2aa425 100644 --- a/samples/draw-shapes/index.njk +++ b/samples/draw-shapes/index.njk @@ -1,12 +1,15 @@ {% extends '../../src/_includes/layout.njk' %} {% block html %} -
- -
+
+ +
-