From 2cb0e4f59540fd09a24ccbab7a41e340d552204e Mon Sep 17 00:00:00 2001 From: Spythere Date: Thu, 5 Nov 2020 12:53:40 +0100 Subject: [PATCH] =?UTF-8?q?Poprawki=20tooltip=C3=B3w=20i=20plakietek=20sta?= =?UTF-8?q?tusu=20poci=C4=85g=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TrainsView/TrainTable.vue | 61 +++++++++++++++++++----- src/styles/global.scss | 45 ++++++++++------- src/styles/user_badge.scss | 5 ++ 3 files changed, 80 insertions(+), 31 deletions(-) diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index ee47a2e..a7b75a7 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -43,7 +43,7 @@ - + asc-arrow + + SRJP + + + Wyświetl rozkład jazdy pociągu {{ train.trainNo }} + @@ -70,14 +76,20 @@
- {{ train.stopLabel }} + + {{ train.stopLabel }} + Sceneria offline - Pociąg offline + + Pociąg offline + +
@@ -279,18 +291,41 @@ export default class TrainTable extends Vue { } &-route { - width: 100%; - font-size: 1.2em; + display: flex; + align-items: center; + + font-size: 1.25em; + margin-bottom: 10px; + + &-schedule { + margin-left: 10px; + padding: 0.15em 0.5em; + + font-size: 0.75em; + + background: #1085b3; + border-radius: 1em; - &-arrow img { - border: 2px solid white; vertical-align: middle; + + img { + vertical-align: middle; + width: 1.2em; + } + + .tooltip-text { + font-size: 0.9em; + background-color: #1085b3; + + &::after { + border-color: #1085b3 transparent transparent transparent; + } + } } } &-stops { - margin-top: 0.35em; - margin-bottom: 1rem; + margin-bottom: 10px; font-size: 0.75em; } diff --git a/src/styles/global.scss b/src/styles/global.scss index 0d5ad1d..c68a957 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -19,27 +19,30 @@ .tooltip { position: relative; - display: inline-block; - - z-index: 5; - & > .content { - visibility: hidden; - width: 120px; + & > &-text { + display: inline-block; + width: 150px; + + padding: .5rem .35rem; background-color: #830000; - color: #fff; + border-radius: .5rem; + + display: inline-block; + max-width: 150px; + + font-size: 1em; text-align: center; - padding: 5px 0; - border-radius: 6px; - - font-size: 1rem; - + color: #fff; + position: absolute; - bottom: 155%; - left: 50%; - margin-left: -60px; - + z-index: 1; + visibility: hidden; opacity: 0; + + left: 50%; + transform: translate(-50%, calc(-100% - 1rem)); + transition: opacity 0.3s; &::after { @@ -50,11 +53,15 @@ margin-left: -5px; border-width: 5px; border-style: solid; - border-color: #aa0000 transparent transparent transparent; + border-color: #830000 transparent transparent transparent; } } - &:hover > .content { + &:hover > &-text { + @include smallScreen() { + display: none; + } + visibility: visible; opacity: 1; } @@ -103,6 +110,8 @@ input { box-sizing: border-box; padding: 0; margin: 0; + + -webkit-tap-highlight-color: transparent; } .default-station { diff --git a/src/styles/user_badge.scss b/src/styles/user_badge.scss index ece519f..1583e4e 100644 --- a/src/styles/user_badge.scss +++ b/src/styles/user_badge.scss @@ -3,6 +3,7 @@ $departed: springgreen; $stopped: #ffa600; $online: gold; $terminated: red; +$disconnected: slategray; .user-badge { border: 1px solid white; @@ -45,4 +46,8 @@ $terminated: red; &.terminated { border: 1px solid $terminated; } + + &.disconnected { + border: 1px solid $disconnected; + } } \ No newline at end of file