mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Naprawienie
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
<template>
|
||||
<div class="app-bar">
|
||||
<div class="bar-content flex flex-spaced">
|
||||
<div class="bar-left">
|
||||
<Options />
|
||||
</div>
|
||||
<Options />
|
||||
|
||||
<div class="bar-center"></div>
|
||||
<div></div>
|
||||
|
||||
<div class="bar-right">
|
||||
<span class="counter dispatchers">
|
||||
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
||||
{{stationCount}}
|
||||
</span>
|
||||
<div class="counter">
|
||||
<img src="@/assets/icon-dispatcher.svg" alt="icon dispatcher" />
|
||||
<span>{{stationCount}}</span>
|
||||
|
||||
<span class="counter trains">
|
||||
{{trainCount}}
|
||||
<img src="@/assets/icon-train.svg" alt="icon train" />
|
||||
</span>
|
||||
</div>
|
||||
<span>{{trainCount}}</span>
|
||||
<img src="@/assets/icon-train.svg" alt="icon train" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -28,7 +20,7 @@ import { Vue, Component, Prop } from "vue-property-decorator";
|
||||
import Options from "@/components/ui/Options.vue";
|
||||
|
||||
@Component({
|
||||
components: { Options }
|
||||
components: { Options },
|
||||
})
|
||||
export default class AppBar extends Vue {
|
||||
@Prop(Number) trainCount;
|
||||
@@ -37,33 +29,31 @@ export default class AppBar extends Vue {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../styles/responsive.scss";
|
||||
|
||||
.app-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
position: sticky;
|
||||
top: 0;
|
||||
font-size: 0.25em;
|
||||
font-size: 0.35em;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
.bar {
|
||||
&-left {
|
||||
display: flex;
|
||||
.counter {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
|
||||
& > .legend {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 1.6em;
|
||||
}
|
||||
}
|
||||
span {
|
||||
margin: 0 0.3em;
|
||||
}
|
||||
}
|
||||
|
||||
&-right {
|
||||
font-size: 1.35em;
|
||||
display: flex;
|
||||
@include smallScreen {
|
||||
.app-bar {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -8,25 +8,31 @@ import Vue from "vue";
|
||||
export default Vue.extend({
|
||||
name: "clock",
|
||||
data: () => ({
|
||||
timestamp: Date.now()
|
||||
timestamp: Date.now(),
|
||||
}),
|
||||
computed: {
|
||||
formattedDate() {
|
||||
return new Date(this.timestamp).toLocaleString("pl-PL");
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setInterval(() => (this.timestamp = Date.now()), 1000);
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../styles/responsive.scss";
|
||||
|
||||
.clock {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
font-size: 0.35em;
|
||||
|
||||
@include smallScreen() {
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+42
-42
@@ -142,7 +142,7 @@ const ascSVG = require("@/assets/icon-arrow-asc.svg");
|
||||
const descSVG = require("@/assets/icon-arrow-desc.svg");
|
||||
|
||||
@Component({
|
||||
components: { StationCard }
|
||||
components: { StationCard },
|
||||
})
|
||||
export default class List extends styleMixin {
|
||||
focusedStationName: string = "";
|
||||
@@ -160,7 +160,7 @@ export default class List extends styleMixin {
|
||||
["Maszyniści"],
|
||||
["Informacje", "ogólne"],
|
||||
["Szlaki", "dwutorowe"],
|
||||
["Szlaki", "jednotorowe"]
|
||||
["Szlaki", "jednotorowe"],
|
||||
];
|
||||
|
||||
changeSorter(index: number) {
|
||||
@@ -184,7 +184,7 @@ export default class List extends styleMixin {
|
||||
|
||||
get focusedStationInfo() {
|
||||
return this.stations.find(
|
||||
station => station.stationName === this.focusedStationName
|
||||
(station) => station.stationName === this.focusedStationName
|
||||
);
|
||||
}
|
||||
|
||||
@@ -300,10 +300,10 @@ export default class List extends styleMixin {
|
||||
white-space: nowrap;
|
||||
border-collapse: collapse;
|
||||
|
||||
font-size: calc(0.5rem + 0.3vw);
|
||||
font-size: calc(0.6rem + 0.3vw);
|
||||
|
||||
@include smallScreen() {
|
||||
font-size: 0.65rem;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
&-head th {
|
||||
@@ -354,49 +354,49 @@ export default class List extends styleMixin {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
&-station-level,
|
||||
&-dispatcher-exp {
|
||||
span {
|
||||
display: block;
|
||||
.item {
|
||||
&-station-level,
|
||||
&-dispatcher-exp {
|
||||
span {
|
||||
display: block;
|
||||
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-station-level {
|
||||
span {
|
||||
background-color: #888;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
&-info,
|
||||
&-tracks {
|
||||
img {
|
||||
width: 2.2em;
|
||||
margin: 0 0.2em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&-tracks {
|
||||
.no-catenary {
|
||||
background-color: #939393;
|
||||
}
|
||||
|
||||
&-station-level {
|
||||
span {
|
||||
background-color: #888;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.catenary {
|
||||
background-color: #009dce;
|
||||
}
|
||||
|
||||
&-info,
|
||||
&-tracks {
|
||||
img {
|
||||
width: 2.2em;
|
||||
margin: 0 0.2em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&-tracks {
|
||||
.no-catenary {
|
||||
background-color: #939393;
|
||||
}
|
||||
|
||||
.catenary {
|
||||
background-color: #009dce;
|
||||
}
|
||||
|
||||
.track {
|
||||
margin: 0 0.3rem;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.track {
|
||||
margin: 0 0.3rem;
|
||||
padding: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@click="() => toggleCardsState('filter')"
|
||||
>
|
||||
<img :src="require('@/assets/icon-filter2.svg')" alt="icon-filter" />
|
||||
<div>FILTRY</div>
|
||||
<p>FILTRY</p>
|
||||
</button>
|
||||
|
||||
<button
|
||||
@@ -16,7 +16,7 @@
|
||||
@click="() => toggleCardsState('legend')"
|
||||
>
|
||||
<img :src="require('@/assets/icon-legend.svg')" alt="icon legend" />
|
||||
<div>LEGENDA</div>
|
||||
<p>LEGENDA</p>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ import OptionCard from "@/components/ui/OptionCard.vue";
|
||||
import LegendCard from "@/components/ui/LegendCard.vue";
|
||||
|
||||
@Component({
|
||||
components: { OptionCard, LegendCard }
|
||||
components: { OptionCard, LegendCard },
|
||||
})
|
||||
export default class Options extends Vue {
|
||||
filterCardOpen: boolean = false;
|
||||
@@ -106,7 +106,7 @@ export default class Options extends Vue {
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
div {
|
||||
p {
|
||||
max-width: 0;
|
||||
font-size: 1em;
|
||||
overflow: hidden;
|
||||
@@ -114,8 +114,8 @@ export default class Options extends Vue {
|
||||
transition: max-width 0.35s ease-in-out;
|
||||
}
|
||||
|
||||
&:hover > div,
|
||||
&.open > div {
|
||||
&:hover > p,
|
||||
&.open > p {
|
||||
max-width: 500px;
|
||||
color: $accentCol;
|
||||
}
|
||||
@@ -132,4 +132,15 @@ export default class Options extends Vue {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@include smallScreen {
|
||||
.action-btn {
|
||||
margin-right: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
|
||||
p {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user