Compare commits

..

1 Commits

Author SHA1 Message Date
17590b9ea1 Fix navbar 2024-03-10 19:59:15 +03:00
4 changed files with 790 additions and 594 deletions

1348
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -135,13 +135,13 @@ img.tiny-logo {
#nav span#links { #nav span#links {
width: 100%; width: 100%;
} }
#nav a { #nav a {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
} }
span.tiny-logo { a.tiny-logo {
display: none; display: none;
} }

View File

@@ -10,17 +10,15 @@ export default {
<style scoped> <style scoped>
#header { #header {
background: url('../assets/headcut.png') no-repeat center; background: url('../assets/headcut.png') no-repeat top;
height: 388px; background-size: cover;
aspect-ratio: 2000/388;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
#header { #header {
background: url('../assets/head.png') no-repeat center; background: url('../assets/head.png') no-repeat top;
background-size: contain; background-size: contain;
height: 0;
padding-top: 17.25%; /* (img-height / img-width * container-width) */
/* (388 / 2000 * 100) */
} }
} }
</style> </style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div id="home"> <div id="home">
<Header/> <Header/>
<h1>Любимые булочные Северной Столицы</h1> <h1 class="header">Любимые булочные Северной Столицы</h1>
<div id="map"> <div id="map">
<div id="napkin"> <div id="napkin">
<yandex-map :settings=settings :coords=markers[selected] :zoom=16> <yandex-map :settings=settings :coords=markers[selected] :zoom=16>
@@ -162,6 +162,7 @@ export default {
methods: { methods: {
selectMarker: function(n) { selectMarker: function(n) {
this.selected = n; this.selected = n;
document.querySelector("ymaps").scrollIntoView();
}, },
selectOnMap: function(n) { selectOnMap: function(n) {
this.selected = +n; this.selected = +n;
@@ -178,7 +179,7 @@ export default {
for (let marker of this.markers) { for (let marker of this.markers) {
let distLat = marker[0] - coords.latitude; let distLat = marker[0] - coords.latitude;
let distLon = marker[1] - coords.longitude; let distLon = marker[1] - coords.longitude;
if (this.pythagorean(selectedDistLat, selectedDistLon) > this.pythagorean(distLat, distLon)) { if (this.pythagorean(selectedDistLat, selectedDistLon) > this.pythagorean(distLat, distLon)) {
this.nearest = marker; this.nearest = marker;
} }
@@ -197,6 +198,7 @@ h1 {
margin-bottom: 50px; margin-bottom: 50px;
margin-top: 50px; margin-top: 50px;
font-size: 5vh; font-size: 5vh;
text-wrap: balance;
} }
h4 { h4 {
@@ -229,7 +231,7 @@ h4 {
.marker { .marker {
font-family: 'Playfair Display', serif; font-family: 'Playfair Display', serif;
width: 100px; width: 100px;
color: #000000; color: #000000;
font-weight: bold; font-weight: bold;
} }
@@ -254,7 +256,7 @@ h4 {
#napkin { #napkin {
position: relative; position: relative;
width: 100%; width: 100%;
padding: 0px; padding: 0;
background: none; background: none;
} }
@@ -264,4 +266,16 @@ h4 {
padding-bottom: 100%; padding-bottom: 100%;
} }
} }
@media screen and (max-width: 1024px) {
.header {
font-size: 48px;
}
}
@media screen and (max-width: 1024px) {
.header {
font-size: 32px;
}
}
</style> </style>