Skip to content

Commit 83a8d5f

Browse files
authored
Merge pull request #48 from OpenWebconcept/feature/OWC-135
mobile responsive map fields
2 parents 4eaf60a + d5a1bc4 commit 83a8d5f

10 files changed

Lines changed: 44 additions & 17 deletions

File tree

build/blocks/owc-openkaarten/streetmap/client.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/blocks/owc-openkaarten/streetmap/client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/blocks/owc-openkaarten/streetmap/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/blocks/owc-openkaarten/streetmap/style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/blocks/owc-openkaarten/streetmap/client.js": "/blocks/owc-openkaarten/streetmap/client.js?id=21f222bad8813ba2e5e0951c3ae7e810",
3-
"/blocks/owc-openkaarten/streetmap/style.css": "/blocks/owc-openkaarten/streetmap/style.css?id=0c70cc29722d11466724176fc03cdd58",
2+
"/blocks/owc-openkaarten/streetmap/client.js": "/blocks/owc-openkaarten/streetmap/client.js?id=768a2afb3e562f7fb3f55633c193ec76",
3+
"/blocks/owc-openkaarten/streetmap/style.css": "/blocks/owc-openkaarten/streetmap/style.css?id=b3188898fe0cdd30cad5c03ec8995bf6",
44
"/blocks/owc-openkaarten/streetmap/editor.css": "/blocks/owc-openkaarten/streetmap/editor.css?id=f4316f0723fb86e3b028a9b448b1f3ae"
55
}

src/blocks/owc-openkaarten/streetmap/assets/scripts/vue/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ onMounted(() => {
234234
235235
.owc-openkaarten-streetmap-container {
236236
margin-inline: auto;
237-
width: min(calc(100% - 32px), 1440px);
237+
@media only screen and (min-width: 768px) {
238+
width: min(calc(100% - 32px), 1440px);
239+
}
238240
}
239241
240242
.owc-openkaarten-streetmap *:focus-visible {

src/blocks/owc-openkaarten/streetmap/assets/scripts/vue/BaseSearchInput.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ const searchStatus = computed(() => {
103103
.search-container {
104104
display: block;
105105
flex-grow: 1;
106+
width: 100%;
106107
margin-inline-end: 1.5rem;
108+
@media only screen and (min-width: 768px) {
109+
width: auto;
110+
margin-inline-end: 1.5rem;
111+
}
107112
}
108113
109114
.search-form {
@@ -120,10 +125,17 @@ const searchStatus = computed(() => {
120125
.search-input {
121126
width: 100%;
122127
padding: 0.75rem 1rem;
123-
padding-inline-end: 5rem; // Space for both buttons
128+
padding-inline-end: 4.5rem; // Space for both buttons
124129
border: 1px solid #7a7a7a;
125130
border-radius: 4px;
126131
font-size: 1rem;
132+
&::placeholder {
133+
overflow: visible;
134+
font-size: .875rem;
135+
@media only screen and (min-width: 768px) {
136+
font-size: 1rem;
137+
}
138+
}
127139
128140
&:focus {
129141
outline: 2px solid var(--search-primary-color);

src/blocks/owc-openkaarten/streetmap/assets/scripts/vue/ListView.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const toggleView = () => {
7676
};
7777
7878
const filterButtonHTML = computed(() => makeFilterButtonHTML('Filter', props.primaryColor));
79-
const mapButtonHTML = computed(() => makeMapButtonHTML('Kaart weergave', props.primaryColor));
79+
const mapButtonHTML = computed(() => makeMapButtonHTML('Kaart', props.primaryColor));
8080
8181
const handleDatasetChange = (id, checked) => {
8282
emits('datasetChange', id, checked);
@@ -217,10 +217,12 @@ const handleSearch = (query) => {
217217
218218
&__controls {
219219
display: flex;
220-
justify-content: flex-end;
220+
flex-wrap: wrap;
221221
gap: 0.5rem;
222222
margin-block-end: 0.5rem;
223-
223+
@media only screen and (min-width: 768px) {
224+
justify-content: flex-end;
225+
}
224226
button:not([class*="search"]) {
225227
align-items: center;
226228
border: 1px solid #328725;

src/blocks/owc-openkaarten/streetmap/assets/scripts/vue/TheMap.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ const initializeMap = (datasets) => {
251251
emit('toggleView');
252252
});
253253
254-
const title = 'Lijst weergave';
254+
const title = 'Lijst';
255255
btn.title = title;
256-
btn.innerHTML = makeListViewButtonHTML('Lijst weergave', props.primaryColor);
256+
btn.innerHTML = makeListViewButtonHTML(title, props.primaryColor);
257257
258258
return btn;
259259
},
@@ -428,8 +428,12 @@ const handleSearch = async (query) => {
428428
}
429429
430430
&__map {
431+
padding-top: 80px;
431432
position: relative;
432433
overflow: hidden;
434+
@media only screen and (min-width: 768px) {
435+
padding-top: 0;
436+
}
433437
.leaflet-marker-icon {
434438
&:focus-visible {
435439
border-radius: 50%;
@@ -491,12 +495,18 @@ const handleSearch = async (query) => {
491495
&__controls {
492496
position: absolute;
493497
inset-block-start: 20px;
494-
inset-inline-start: 20px;
498+
inset-inline-start: 10px;
495499
z-index: 1000;
496500
display: flex;
497501
gap: 0.5rem;
498-
max-width: min(450px, calc(100% - 2rem));
499502
width: 100%;
503+
@media only screen and (min-width: 768px) {
504+
inset-inline-start: 20px;
505+
max-inline-size: min(300px, calc(100% - 2rem));
506+
}
507+
@media only screen and (min-width: 900px) {
508+
max-inline-size: min(450px, calc(100% - 2rem));
509+
}
500510
}
501511
}
502512
</style>

src/blocks/owc-openkaarten/streetmap/assets/styles/style.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
.leaflet-top {
1313
align-items: center;
1414
display: flex;
15-
justify-content: flex-end;
1615
width: 100%;
17-
16+
@media only screen and (min-width: 768px) {
17+
justify-content: flex-end;
18+
}
1819
> .leaflet-control {
1920
margin-top: 10px !important;
2021
}

0 commit comments

Comments
 (0)