Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4561c825a4 | ||
|
|
693bddbcf0 | ||
|
|
eae7cefae1 | ||
|
|
212728e138 | ||
|
|
0d627f297e | ||
|
|
f07ae979a2 | ||
|
|
8bdbbafcff | ||
|
|
3856ccb576 | ||
|
|
9f839d3f5d |
No files matched your search
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#noPano {
|
#noPano {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@@ -23,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#noPano>p {
|
#noPano>p {
|
||||||
margin: auto;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#control {
|
#control {
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ div.mapItem>div.inner>div.info {
|
|||||||
grid-template-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.mapItem>div.inner>div.description {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
div.mapItem>div.inner>div.info>p:nth-child(1) {
|
div.mapItem>div.inner>div.info>p:nth-child(1) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-21
@@ -30,7 +30,9 @@ $cssFiles = [
|
|||||||
-->~ <?= $map['area'][0] ?> <?= $map['area'][1] ?><sup>2</sup>
|
-->~ <?= $map['area'][0] ?> <?= $map['area'][1] ?><sup>2</sup>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p class="small center marginTop"><?= $map['description'] ?></p>
|
<div class="description marginTop">
|
||||||
|
<p class="small center"><?= $map['description'] ?></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($isAdmin): ?>
|
<?php if ($isAdmin): ?>
|
||||||
<div class="buttonContainer">
|
<div class="buttonContainer">
|
||||||
@@ -64,7 +66,7 @@ $cssFiles = [
|
|||||||
const GOOGLE_MAPS_JS_API_KEY = '<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>';
|
const GOOGLE_MAPS_JS_API_KEY = '<?= $_ENV['GOOGLE_MAPS_JS_API_KEY'] ?>';
|
||||||
|
|
||||||
var Maps = {
|
var Maps = {
|
||||||
innerDivs: null,
|
descriptionDivs: null,
|
||||||
|
|
||||||
addStaticMaps: function () {
|
addStaticMaps: function () {
|
||||||
var imgContainers = document.getElementById('mapContainer').getElementsByClassName('imgContainer');
|
var imgContainers = document.getElementById('mapContainer').getElementsByClassName('imgContainer');
|
||||||
@@ -81,29 +83,29 @@ $cssFiles = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initializeInnerDivs: function () {
|
initializeDescriptionDivs: function () {
|
||||||
Maps.innerDivs = document.getElementById('mapContainer').getElementsByClassName('inner');
|
Maps.descriptionDivs = document.getElementById('mapContainer').getElementsByClassName('description');
|
||||||
|
|
||||||
for (var i = 0; i < Maps.innerDivs.length; i++) {
|
for (var i = 0; i < Maps.descriptionDivs.length; i++) {
|
||||||
var inner = Maps.innerDivs[i];
|
var description = Maps.descriptionDivs[i];
|
||||||
var boundingClientRect = inner.getBoundingClientRect();
|
var boundingClientRect = description.getBoundingClientRect();
|
||||||
|
|
||||||
inner.defaultHeight = boundingClientRect.height;
|
description.defaultHeight = boundingClientRect.height;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
calculateInnerDivHeights: function () {
|
calculateDescriptionDivHeights: function () {
|
||||||
var currentY;
|
var currentY;
|
||||||
var rows = [];
|
var rows = [];
|
||||||
for (var i = 0; i < Maps.innerDivs.length; i++) {
|
for (var i = 0; i < Maps.descriptionDivs.length; i++) {
|
||||||
var inner = Maps.innerDivs[i];
|
var description = Maps.descriptionDivs[i];
|
||||||
var boundingClientRect = inner.getBoundingClientRect();
|
var boundingClientRect = description.getBoundingClientRect();
|
||||||
|
|
||||||
if (currentY !== boundingClientRect.y) {
|
if (currentY !== boundingClientRect.y) {
|
||||||
rows.push([]);
|
rows.push([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
rows[rows.length - 1].push(inner);
|
rows[rows.length - 1].push(description);
|
||||||
|
|
||||||
currentY = boundingClientRect.y;
|
currentY = boundingClientRect.y;
|
||||||
}
|
}
|
||||||
@@ -113,17 +115,17 @@ $cssFiles = [
|
|||||||
|
|
||||||
var maxHeight = 0;
|
var maxHeight = 0;
|
||||||
for (var j = 0; j < row.length; j++) {
|
for (var j = 0; j < row.length; j++) {
|
||||||
var inner = row[j];
|
var description = row[j];
|
||||||
|
|
||||||
if (inner.defaultHeight > maxHeight) {
|
if (description.defaultHeight > maxHeight) {
|
||||||
maxHeight = inner.defaultHeight;
|
maxHeight = description.defaultHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var j = 0; j < row.length; j++) {
|
for (var j = 0; j < row.length; j++) {
|
||||||
var inner = row[j];
|
var description = row[j];
|
||||||
|
|
||||||
inner.style.height = maxHeight + 'px';
|
description.style.height = maxHeight + 'px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,11 +133,11 @@ $cssFiles = [
|
|||||||
|
|
||||||
Maps.addStaticMaps();
|
Maps.addStaticMaps();
|
||||||
|
|
||||||
Maps.initializeInnerDivs();
|
Maps.initializeDescriptionDivs();
|
||||||
Maps.calculateInnerDivHeights();
|
Maps.calculateDescriptionDivHeights();
|
||||||
|
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
Maps.calculateInnerDivHeights();
|
Maps.calculateDescriptionDivHeights();
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
MapGuesser = {
|
var MapGuesser = {
|
||||||
cookiesAgreed: false,
|
cookiesAgreed: false,
|
||||||
|
|
||||||
agreeCookies: function () {
|
agreeCookies: function () {
|
||||||
@@ -29,10 +29,13 @@
|
|||||||
document.cookie = 'COOKIES_CONSENT=1; expires=' + expirationDate + '; path=/';
|
document.cookie = 'COOKIES_CONSENT=1; expires=' + expirationDate + '; path=/';
|
||||||
|
|
||||||
MapGuesser.cookiesAgreed = true;
|
MapGuesser.cookiesAgreed = true;
|
||||||
document.getElementById('cookiesNotice').style.display = 'none';
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
document.getElementById('agreeCookies').onclick = function () {
|
||||||
|
document.getElementById('cookiesNotice').style.display = 'none';
|
||||||
|
};
|
||||||
|
|
||||||
window.onclick = function () {
|
window.onclick = function () {
|
||||||
MapGuesser.agreeCookies();
|
MapGuesser.agreeCookies();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
<?php if (!isset($_COOKIE['COOKIES_CONSENT'])): ?>
|
||||||
<div id="cookiesNotice">
|
<div id="cookiesNotice">
|
||||||
<p class="small">
|
<p class="small">
|
||||||
<?= $_ENV['APP_NAME'] ?> uses cookies to improve user experience. By using the app or clicking I agree, you consent to our use of cookies.
|
<?= $_ENV['APP_NAME'] ?> uses cookies to improve user experience. By using the app or clicking 'Agree', you consent to our use of cookies.
|
||||||
</p>
|
</p>
|
||||||
<button id="agreeCookies" class="small marginTop">I agree</button>
|
<button id="agreeCookies" class="small marginTop">Agree</button>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div id="loading">
|
<div id="loading">
|
||||||
|
|||||||
Reference in new issue
Block a user