mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +00:00
Poprawki tooltipów
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="select-box" v-if="stationInfo.checkpoints">
|
<!-- <div class="select-box" v-if="stationInfo.checkpoints">
|
||||||
<div class="option-container">
|
<div class="option-container">
|
||||||
<div class="option-selected" @click="toggleOptionList">
|
<div class="option-selected" @click="toggleOptionList">
|
||||||
<span>{{ selectedOption }}</span>
|
<span>{{ selectedOption }}</span>
|
||||||
@@ -35,7 +35,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
<!-- <select-box></select-box> -->
|
||||||
|
|
||||||
<span class="timetable-item loading" v-if="dataStatus == 0">{{
|
<span class="timetable-item loading" v-if="dataStatus == 0">{{
|
||||||
$t("app.loading")
|
$t("app.loading")
|
||||||
@@ -141,8 +143,9 @@ import { Component, Vue, Prop } from "vue-property-decorator";
|
|||||||
|
|
||||||
import Station from "@/scripts/interfaces/Station";
|
import Station from "@/scripts/interfaces/Station";
|
||||||
import ScheduledTrain from "@/scripts/interfaces/ScheduledTrain";
|
import ScheduledTrain from "@/scripts/interfaces/ScheduledTrain";
|
||||||
|
import SelectBox from "../Global/SelectBox.vue";
|
||||||
|
|
||||||
@Component
|
@Component({ components: { SelectBox } })
|
||||||
export default class SceneryTimetable extends Vue {
|
export default class SceneryTimetable extends Vue {
|
||||||
@Prop() readonly stationInfo!: Station;
|
@Prop() readonly stationInfo!: Station;
|
||||||
@Prop() readonly timetableOnly!: boolean;
|
@Prop() readonly timetableOnly!: boolean;
|
||||||
|
|||||||
@@ -20,9 +20,7 @@
|
|||||||
>
|
>
|
||||||
<div class="wrapper no-timetable" v-if="!train.timetableData">
|
<div class="wrapper no-timetable" v-if="!train.timetableData">
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<div class="info-main">
|
<div class="info-category">
|
||||||
<div class="info-top">
|
|
||||||
<div class="top-category">
|
|
||||||
<span>
|
<span>
|
||||||
{{ train.trainNo }} |
|
{{ train.trainNo }} |
|
||||||
<span style="color: gold">
|
<span style="color: gold">
|
||||||
@@ -30,8 +28,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="driver">
|
<span class="driver">
|
||||||
@@ -114,42 +110,40 @@
|
|||||||
>
|
>
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<div class="info-main">
|
<div class="info-main">
|
||||||
<div class="info-top">
|
<span class="info-general">
|
||||||
<div class="top-category">
|
|
||||||
<span class="warning twr" v-if="train.timetableData.TWR">
|
<span class="warning twr" v-if="train.timetableData.TWR">
|
||||||
TWR
|
TWR
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="warning skr" v-if="train.timetableData.SKR">
|
<span class="warning skr" v-if="train.timetableData.SKR">
|
||||||
SKR
|
SKR
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<strong>{{ train.timetableData.category }}</strong>
|
<strong>{{ train.timetableData.category }}</strong>
|
||||||
{{ train.trainNo }} |
|
{{ train.trainNo }} |
|
||||||
|
|
||||||
<span style="color: gold">
|
<span style="color: gold">
|
||||||
{{ train.timetableData.routeDistance }} km
|
{{ train.timetableData.routeDistance }} km
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
|
|
||||||
|
<span class="info-srjp g-tooltip">
|
||||||
|
<span class="activator">
|
||||||
|
SRJP
|
||||||
|
|
||||||
<div class="top-timetable-btn tooltip">
|
|
||||||
<img
|
<img
|
||||||
:src="
|
:src="
|
||||||
showedSchedule === train.timetableData.timetableId
|
showedSchedule == train.timetableData.timetableId
|
||||||
? ascSVG
|
? ascSVG
|
||||||
: descSVG
|
: descSVG
|
||||||
"
|
"
|
||||||
alt="asc-arrow"
|
alt="arrow-icon"
|
||||||
/>
|
/>
|
||||||
|
</span>
|
||||||
|
|
||||||
<span>SRJP</span>
|
<span class="content">
|
||||||
|
|
||||||
<span class="tooltip-text">
|
|
||||||
{{ $t("trains.detailed-timetable") }} {{ train.trainNo }}
|
{{ $t("trains.detailed-timetable") }} {{ train.trainNo }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-route">
|
<div class="info-route">
|
||||||
@@ -165,13 +159,10 @@
|
|||||||
{{ $t("trains.via-title") }}
|
{{ $t("trains.via-title") }}
|
||||||
|
|
||||||
<span
|
<span
|
||||||
v-html="
|
v-html="generateStopList(train.timetableData.followingStops)"
|
||||||
generateStopList(train.timetableData.followingStops)
|
|
||||||
"
|
|
||||||
></span>
|
></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="driver">
|
<span class="driver">
|
||||||
@@ -263,9 +254,9 @@
|
|||||||
import { Vue, Component, Prop } from "vue-property-decorator";
|
import { Vue, Component, Prop } from "vue-property-decorator";
|
||||||
|
|
||||||
import Train from "@/scripts/interfaces/Train";
|
import Train from "@/scripts/interfaces/Train";
|
||||||
|
import TrainStop from "@/scripts/interfaces/TrainStop";
|
||||||
|
|
||||||
import TrainSchedule from "@/components/TrainsView/TrainSchedule.vue";
|
import TrainSchedule from "@/components/TrainsView/TrainSchedule.vue";
|
||||||
import TrainStop from "@/scripts/interfaces/TrainStop";
|
|
||||||
import { DataStatus } from "@/scripts/enums/DataStatus";
|
import { DataStatus } from "@/scripts/enums/DataStatus";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -309,8 +300,6 @@ export default class TrainTable extends Vue {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const currentEl: HTMLElement = this.$refs[elementId][0];
|
const currentEl: HTMLElement = this.$refs[elementId][0];
|
||||||
|
|
||||||
console.log(currentEl);
|
|
||||||
|
|
||||||
currentEl.scrollIntoView({
|
currentEl.scrollIntoView({
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
block: "nearest",
|
block: "nearest",
|
||||||
@@ -370,7 +359,7 @@ export default class TrainTable extends Vue {
|
|||||||
&-list {
|
&-list {
|
||||||
@include smallScreen() {
|
@include smallScreen() {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
// overflow-x: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +375,7 @@ export default class TrainTable extends Vue {
|
|||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
|
||||||
grid-template-rows: 1fr;
|
grid-template-rows: 1fr;
|
||||||
|
|
||||||
@include smallScreen() {
|
@include smallScreen() {
|
||||||
@@ -395,17 +384,18 @@ export default class TrainTable extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
&-main {
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
&-top {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
div {
|
.info-srjp .activator {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
background-color: var(--clr-accent);
|
||||||
|
border-radius: 0.5em;
|
||||||
|
padding: 0.1em 0.35em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,10 +412,6 @@ export default class TrainTable extends Vue {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
|
|
||||||
@include smallScreen() {
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-bottom {
|
&-bottom {
|
||||||
@@ -454,10 +440,11 @@ export default class TrainTable extends Vue {
|
|||||||
|
|
||||||
&-info {
|
&-info {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
text-align: center;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-name {
|
&-name {
|
||||||
margin: 0 0.3em;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+29
-34
@@ -30,43 +30,29 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.tooltip {
|
.g-tooltip {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
background-color: var(--clr-accent);
|
z-index: 10;
|
||||||
padding: .1em .5em;
|
|
||||||
border-radius: 1em;
|
|
||||||
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
& > &-text {
|
|
||||||
display: inline-block;
|
|
||||||
width: 150px;
|
|
||||||
|
|
||||||
|
|
||||||
font-size: 0.9em;
|
|
||||||
|
|
||||||
background-color: var(--clr-accent);
|
|
||||||
|
|
||||||
padding: .15em .5em;
|
|
||||||
border-radius: 1em;
|
|
||||||
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 150px;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
|
.content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
left: 50%;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
|
transform: translate(-50%, -120%);
|
||||||
|
|
||||||
|
z-index: 10;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
left: 50%;
|
min-width: 150px;
|
||||||
transform: translate(-50%, calc(-100% - 1rem));
|
|
||||||
|
background-color: var(--clr-accent);
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
padding: 0.15em;
|
||||||
|
border-radius: .5em;
|
||||||
|
|
||||||
transition: opacity 0.3s;
|
transition: opacity 0.3s;
|
||||||
|
|
||||||
@@ -80,12 +66,21 @@ body {
|
|||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: var(--clr-accent) transparent transparent transparent;
|
border-color: var(--clr-accent) transparent transparent transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include smallScreen() {
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
left: 75%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > &-text {
|
&:hover > .content {
|
||||||
@include smallScreen() {
|
// @include smallScreen() {
|
||||||
display: none;
|
// display: none;
|
||||||
}
|
// }
|
||||||
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ $sceneryBgCol: #333;
|
|||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
font-size: 2em;
|
font-size: 1.5em;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user