Funkcjonalności listy; ogólny wygląd aplikacji i responsywność
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<header>
|
<header>
|
||||||
<h1 class="header-top">POJAZDOWNIK</h1>
|
<h1 class="header-top">POJAZDOWNIK</h1>
|
||||||
<p class="header-bottom">EDYTOR SKŁADÓW ONLINE</p>
|
<p class="header-bottom"><span>EDYTOR SKŁADÓW ONLINE</span></p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
@@ -34,6 +34,10 @@
|
|||||||
{{ loco.type }}
|
{{ loco.type }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<button @click="addVehicle">
|
||||||
|
<img :src="icons.add" alt="add vehicle" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,16 +52,14 @@
|
|||||||
<div class="input_container">
|
<div class="input_container">
|
||||||
<h2 class="input_header">RODZAJ WAGONU</h2>
|
<h2 class="input_header">RODZAJ WAGONU</h2>
|
||||||
<div class="input_radio">
|
<div class="input_radio">
|
||||||
<label
|
<label v-for="label in carLabels" :for="label.id" :key="label.id">
|
||||||
v-for="(label, i) in carLabels"
|
|
||||||
:for="label.id"
|
|
||||||
:key="label.id"
|
|
||||||
>
|
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="car"
|
name="car"
|
||||||
:id="label.id"
|
:id="label.id"
|
||||||
:checked="i == 0"
|
:checked="chosenCarUseType == label.id"
|
||||||
|
:value="label.id"
|
||||||
|
v-model="chosenCarUseType"
|
||||||
@change="onCarUseTypeChange(label.id)"
|
@change="onCarUseTypeChange(label.id)"
|
||||||
/>
|
/>
|
||||||
<span>{{ label.title }}</span>
|
<span>{{ label.title }}</span>
|
||||||
@@ -103,6 +105,10 @@
|
|||||||
<section class="images">
|
<section class="images">
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<div class="image-content">
|
<div class="image-content">
|
||||||
|
<div class="no-img" v-if="!chosenCar && !chosenLoco">
|
||||||
|
POGLĄD WYBRANEGO POJAZDU
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="empty-message" v-if="imageLoading">
|
<div class="empty-message" v-if="imageLoading">
|
||||||
ŁADOWANIE OBRAZU...
|
ŁADOWANIE OBRAZU...
|
||||||
</div>
|
</div>
|
||||||
@@ -124,35 +130,26 @@
|
|||||||
|
|
||||||
<button class="btn-rect" @click="addVehicle">+</button>
|
<button class="btn-rect" @click="addVehicle">+</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="image">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="image-content">
|
|
||||||
<img
|
|
||||||
v-if="chosenCar"
|
|
||||||
:src="chosenCar.imageSrc"
|
|
||||||
:alt="chosenCar.type"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="btn" @click="addVehicle(chosenCar)">+</button>
|
|
||||||
</div> -->
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="stock-list">
|
<section class="stock-list">
|
||||||
<div class="stock-list_buttons">
|
<div class="stock-list_buttons">
|
||||||
<button class="btn btn--copy">KOPIUJ SKŁAD DO SCHOWKA</button>
|
<button class="btn btn--copy" @click="downloadStock">
|
||||||
<button class="btn btn--show-text">POKAŻ TEKST</button>
|
POBIERZ SKŁAD
|
||||||
|
</button>
|
||||||
|
<!-- <button class="btn btn--show-text">WCZYTAJ SKŁAD</button> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stock-list_specs">
|
<div class="stock-list_specs">
|
||||||
Masa: {{ totalMass }} | Długość: {{ totalLength }} | Vmax:
|
Masa: <span class="text--accent">{{ totalMass }}</span> t | Długość:
|
||||||
{{ maxSpeed }}
|
<span class="text--accent">{{ totalLength }}</span>
|
||||||
|
m | Vmax: <span class="text--accent">{{ maxSpeed }} </span> km/h
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li v-if="stockList.length == 0">Lista pojazdów jest pusta!</li>
|
<li v-if="stockList.length == 0" class="list-empty">
|
||||||
|
Lista pojazdów jest pusta!
|
||||||
|
</li>
|
||||||
|
|
||||||
<li
|
<li
|
||||||
v-for="(stock, i) in stockList"
|
v-for="(stock, i) in stockList"
|
||||||
@@ -160,23 +157,51 @@
|
|||||||
:class="{ loco: stock.isLoco }"
|
:class="{ loco: stock.isLoco }"
|
||||||
:data-id="i"
|
:data-id="i"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@dragstart="onDragStart(i)"
|
|
||||||
@drop="onDragEnd"
|
|
||||||
@dragover="allowDrop"
|
|
||||||
@focus="onListItemFocus(i)"
|
@focus="onListItemFocus(i)"
|
||||||
draggable="true"
|
:ref="`item-${i}`"
|
||||||
>
|
>
|
||||||
<span>{{ stock.type }}</span>
|
<div
|
||||||
|
class="item-content"
|
||||||
<span>
|
@dragstart="onDragStart(i)"
|
||||||
|
@drop="onDrop($event, i)"
|
||||||
|
@dragover="allowDrop"
|
||||||
|
draggable="true"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
{{ stock.isLoco ? stock.type : getCarSpecFromType(stock.type) }}
|
||||||
|
</span>
|
||||||
|
<span v-if="stock.cargo"> ({{ stock.cargo?.id }}) </span>
|
||||||
|
|
||||||
{{ stock.cargo?.id }}
|
<span> {{ stock.length }}m</span>
|
||||||
</span>
|
|
||||||
<span>{{ stock.length }}m</span>
|
<span>{{ stock.cargo ? stock.cargo.totalMass : stock.mass }}t</span>
|
||||||
|
</div>
|
||||||
<span>{{ stock.cargo ? stock.cargo.totalMass : stock.mass }}t</span>
|
|
||||||
|
<div class="item-actions">
|
||||||
<span> {{ stock.count }}</span>
|
<div class="count">
|
||||||
|
<button class="action-btn" @click="subStock(i)">
|
||||||
|
<img :src="icons.sub" alt="subtract vehicle count" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<span>{{ stock.count }} </span>
|
||||||
|
|
||||||
|
<button class="action-btn" @click="addStock(i)">
|
||||||
|
<img :src="icons.add" alt="add vehicle count" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="action-btn" @click="moveUpStock(i)">
|
||||||
|
<img :src="icons.higher" alt="move up vehicle" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="action-btn" @click="moveDownStock(i)">
|
||||||
|
<img :src="icons.lower" alt="move down vehicle" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="action-btn" @click="removeStock(i)">
|
||||||
|
<img :src="icons.remove" alt="remove vehicle" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<!-- <span class="type"></span>
|
<!-- <span class="type"></span>
|
||||||
<span class="cargo"></span>
|
<span class="cargo"></span>
|
||||||
<span class="cargo"></span>
|
<span class="cargo"></span>
|
||||||
@@ -191,7 +216,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer></footer>
|
<footer>
|
||||||
|
<span class="text--grayed">
|
||||||
|
Ta strona ma charakter informacyjny. Autor nie ponosi odpowiedzialności za
|
||||||
|
tworzenie składów niezgodnych z regulaminem symulatora Train Driver 2!
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
© Spythere 2021
|
||||||
|
</footer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -239,6 +271,7 @@ function isLocomotive(vehicle: Locomotive | CarWagon): vehicle is Locomotive {
|
|||||||
export default class App extends Vue {
|
export default class App extends Vue {
|
||||||
icons = {
|
icons = {
|
||||||
add: require("./assets/add-icon.svg"),
|
add: require("./assets/add-icon.svg"),
|
||||||
|
sub: require("./assets/sub-icon.svg"),
|
||||||
remove: require("./assets/remove-icon.svg"),
|
remove: require("./assets/remove-icon.svg"),
|
||||||
lower: require("./assets/lower-icon.svg"),
|
lower: require("./assets/lower-icon.svg"),
|
||||||
higher: require("./assets/higher-icon.svg"),
|
higher: require("./assets/higher-icon.svg"),
|
||||||
@@ -278,12 +311,12 @@ export default class App extends Vue {
|
|||||||
];
|
];
|
||||||
|
|
||||||
chosenLocoPower = "loco-e";
|
chosenLocoPower = "loco-e";
|
||||||
|
chosenCarUseType = "car-passenger";
|
||||||
|
|
||||||
chosenCar: CarWagon | null = null;
|
chosenCar: CarWagon | null = null;
|
||||||
chosenLoco: Locomotive | null = null;
|
chosenLoco: Locomotive | null = null;
|
||||||
chosenCargo: { id: string; totalMass: number } | null = null;
|
chosenCargo: { id: string; totalMass: number } | null = null;
|
||||||
|
|
||||||
carOptions: CarWagon[] = [];
|
|
||||||
cargoOptions: any[][] = [];
|
cargoOptions: any[][] = [];
|
||||||
|
|
||||||
stockList: {
|
stockList: {
|
||||||
@@ -300,17 +333,12 @@ export default class App extends Vue {
|
|||||||
|
|
||||||
onLocoPowerChange(inputId: string) {
|
onLocoPowerChange(inputId: string) {
|
||||||
this.chosenLoco = null;
|
this.chosenLoco = null;
|
||||||
|
|
||||||
this.imageLoading = false;
|
this.imageLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
onCarUseTypeChange(inputId: string) {
|
onCarUseTypeChange(inputId: string) {
|
||||||
this.chosenCar = null;
|
this.chosenCar = null;
|
||||||
|
|
||||||
this.carOptions = this.carDataList
|
|
||||||
.filter((car) => car.useType == inputId)
|
|
||||||
.sort((a, b) => (a.type > b.type ? 1 : -1));
|
|
||||||
|
|
||||||
if (inputId == "car-passenger") this.chosenCargo = null;
|
if (inputId == "car-passenger") this.chosenCargo = null;
|
||||||
|
|
||||||
this.imageLoading = false;
|
this.imageLoading = false;
|
||||||
@@ -330,21 +358,32 @@ export default class App extends Vue {
|
|||||||
this.imageLoading = true;
|
this.imageLoading = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onDragStart(vehicleID: number) {
|
get locoOptions() {
|
||||||
this.draggedVehicleID = vehicleID;
|
return this.locoDataList
|
||||||
|
.filter((loco) => loco.power == this.chosenLocoPower)
|
||||||
|
.sort((a, b) => (a.type > b.type ? -1 : 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
onDragEnd(e: any) {
|
get carOptions() {
|
||||||
|
return this.carDataList
|
||||||
|
.filter((car) => car.useType == this.chosenCarUseType)
|
||||||
|
.sort((a, b) => (a.type > b.type ? 1 : -1));
|
||||||
|
}
|
||||||
|
|
||||||
|
onDragStart(vehicleIndex: number) {
|
||||||
|
this.draggedVehicleID = vehicleIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
onDrop(e: DragEvent, vehicleIndex: number) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const targetVehicleEl: Element = e.path.find((el: Element) =>
|
let targetEl: Element | null = this.$refs[
|
||||||
el.attributes.getNamedItem("data-id")
|
`item-${vehicleIndex}`
|
||||||
);
|
] as Element;
|
||||||
|
|
||||||
if (!targetVehicleEl) return;
|
if (!targetEl) return;
|
||||||
|
|
||||||
const dataID =
|
const dataID = targetEl.attributes.getNamedItem("data-id")?.textContent;
|
||||||
targetVehicleEl.attributes.getNamedItem("data-id")?.textContent;
|
|
||||||
|
|
||||||
if (!dataID) return;
|
if (!dataID) return;
|
||||||
|
|
||||||
@@ -352,10 +391,6 @@ export default class App extends Vue {
|
|||||||
|
|
||||||
this.stockList[Number(dataID)] = this.stockList[this.draggedVehicleID];
|
this.stockList[Number(dataID)] = this.stockList[this.draggedVehicleID];
|
||||||
this.stockList[this.draggedVehicleID] = tempVehicle;
|
this.stockList[this.draggedVehicleID] = tempVehicle;
|
||||||
|
|
||||||
// if (!targetVehicleEl) return;
|
|
||||||
|
|
||||||
// console.log(targetVehicleEl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allowDrop(e: DragEvent) {
|
allowDrop(e: DragEvent) {
|
||||||
@@ -375,12 +410,15 @@ export default class App extends Vue {
|
|||||||
this.chosenLoco =
|
this.chosenLoco =
|
||||||
this.locoDataList.find((v) => v.type == vehicle.type) || null;
|
this.locoDataList.find((v) => v.type == vehicle.type) || null;
|
||||||
|
|
||||||
this.onLocoTypeChange();
|
this.chosenCar = null;
|
||||||
|
this.chosenCargo = null;
|
||||||
|
|
||||||
// this.onLocoPowerChange(vehicle.useType);
|
// this.onLocoPowerChange(vehicle.useType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.chosenCarUseType = vehicle.useType;
|
||||||
|
|
||||||
this.chosenLoco = null;
|
this.chosenLoco = null;
|
||||||
this.chosenCar =
|
this.chosenCar =
|
||||||
this.carDataList.find((v) => v.type == vehicle.type) || null;
|
this.carDataList.find((v) => v.type == vehicle.type) || null;
|
||||||
@@ -389,10 +427,81 @@ export default class App extends Vue {
|
|||||||
// this.chose = vehicle.useType;
|
// this.chose = vehicle.useType;
|
||||||
}
|
}
|
||||||
|
|
||||||
get locoOptions() {
|
getCarSpecFromType(typeStr: string) {
|
||||||
return this.locoDataList
|
const specArray = typeStr.split("_");
|
||||||
.filter((loco) => loco.power == this.chosenLocoPower)
|
|
||||||
.sort((a, b) => (a.type > b.type ? -1 : 1));
|
if (specArray.length == 0) return null;
|
||||||
|
|
||||||
|
const shortVersion = specArray.length == 3;
|
||||||
|
|
||||||
|
/* 111a_Grafitti_1 */
|
||||||
|
if (specArray.length == 3)
|
||||||
|
return `${specArray[0]} ${specArray[1]}-${specArray[2]}`;
|
||||||
|
|
||||||
|
/* 111a_PKP_Bnouz_01 */
|
||||||
|
return `${specArray[0]} ${specArray[2]}-${specArray[3]} (${specArray[1]})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
addStock(index: number) {
|
||||||
|
this.stockList[index].count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
subStock(index: number) {
|
||||||
|
if (this.stockList[index].count < 2) return;
|
||||||
|
|
||||||
|
this.stockList[index].count--;
|
||||||
|
}
|
||||||
|
|
||||||
|
removeStock(index: number) {
|
||||||
|
this.stockList = this.stockList.filter((stock, i) => i != index);
|
||||||
|
}
|
||||||
|
|
||||||
|
moveUpStock(index: number) {
|
||||||
|
if (index < 1) return;
|
||||||
|
|
||||||
|
const tempStock = this.stockList[index];
|
||||||
|
|
||||||
|
this.stockList[index] = this.stockList[index - 1];
|
||||||
|
this.stockList[index - 1] = tempStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
moveDownStock(index: number) {
|
||||||
|
if (index > this.stockList.length - 2) return;
|
||||||
|
|
||||||
|
const tempStock = this.stockList[index];
|
||||||
|
|
||||||
|
this.stockList[index] = this.stockList[index + 1];
|
||||||
|
this.stockList[index + 1] = tempStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadStock() {
|
||||||
|
const stockString = this.stockList
|
||||||
|
.map((stock) => {
|
||||||
|
let s =
|
||||||
|
stock.isLoco || !stock.cargo
|
||||||
|
? stock.type
|
||||||
|
: `${stock.type}:${stock.cargo.id}`;
|
||||||
|
|
||||||
|
for (let i = 0; i < stock.count - 1; i++) s += ";" + s;
|
||||||
|
|
||||||
|
return s;
|
||||||
|
})
|
||||||
|
.join(";");
|
||||||
|
|
||||||
|
const fileName = prompt("Nazwij plik:", "sklad");
|
||||||
|
|
||||||
|
const blob = new Blob([stockString]);
|
||||||
|
const file = fileName + ".con";
|
||||||
|
|
||||||
|
var e = document.createEvent("MouseEvents"),
|
||||||
|
a = document.createElement("a");
|
||||||
|
a.download = file;
|
||||||
|
a.href = window.URL.createObjectURL(blob);
|
||||||
|
a.dataset.downloadurl = ["", a.download, a.href].join(":");
|
||||||
|
e.initEvent("click", true, false);
|
||||||
|
a.dispatchEvent(e);
|
||||||
|
|
||||||
|
console.log(stockString);
|
||||||
}
|
}
|
||||||
|
|
||||||
get locoDataList() {
|
get locoDataList() {
|
||||||
@@ -453,7 +562,7 @@ export default class App extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SZT
|
// SZT
|
||||||
if (vehicleTypeKey.startsWith("loco-ezt")) {
|
if (vehicleTypeKey.startsWith("loco-szt")) {
|
||||||
length = 14;
|
length = 14;
|
||||||
mass = 23;
|
mass = 23;
|
||||||
}
|
}
|
||||||
@@ -544,7 +653,7 @@ export default class App extends Vue {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stockList.push({
|
const stockObj = {
|
||||||
type: vehicle.type,
|
type: vehicle.type,
|
||||||
length: vehicle.length,
|
length: vehicle.length,
|
||||||
mass: vehicle.mass,
|
mass: vehicle.mass,
|
||||||
@@ -557,7 +666,15 @@ export default class App extends Vue {
|
|||||||
count: 1,
|
count: 1,
|
||||||
imgSrc: vehicle.imageSrc,
|
imgSrc: vehicle.imageSrc,
|
||||||
useType: isLocomotive(vehicle) ? vehicle.power : vehicle.useType,
|
useType: isLocomotive(vehicle) ? vehicle.power : vehicle.useType,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (
|
||||||
|
isLocomotive(vehicle) &&
|
||||||
|
this.stockList.length > 0 &&
|
||||||
|
!this.stockList[0].isLoco
|
||||||
|
)
|
||||||
|
this.stockList.unshift(stockObj);
|
||||||
|
else this.stockList.push(stockObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
get totalMass() {
|
get totalMass() {
|
||||||
@@ -599,11 +716,16 @@ export default class App extends Vue {
|
|||||||
color: $textColor;
|
color: $textColor;
|
||||||
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
max-width: 1200px;
|
|
||||||
|
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
grid-template-columns: minmax(200px, 1200px);
|
||||||
|
grid-template-rows: 5em 1fr auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HEADER SECTION */
|
/* HEADER SECTION */
|
||||||
@@ -613,10 +735,13 @@ header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-top {
|
.header-top {
|
||||||
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 3.65em;
|
font-size: 3.65em;
|
||||||
color: $accentColor;
|
color: $accentColor;
|
||||||
|
|
||||||
|
padding: 0.25em 0.5em;
|
||||||
|
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -632,7 +757,11 @@ h2 {
|
|||||||
.header-bottom {
|
.header-bottom {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
line-height: 0.95em;
|
line-height: 0.55em;
|
||||||
|
|
||||||
|
/* span {
|
||||||
|
padding: 0.25em 0.65em;
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MAIN SECTION */
|
/* MAIN SECTION */
|
||||||
@@ -641,13 +770,18 @@ main {
|
|||||||
display: grid;
|
display: grid;
|
||||||
|
|
||||||
grid-template-areas: "loco car" "image list";
|
grid-template-areas: "loco car" "image list";
|
||||||
gap: 2em;
|
gap: 4em 2em;
|
||||||
|
|
||||||
margin-top: 3em;
|
align-content: flex-start;
|
||||||
|
|
||||||
|
margin-top: 6em;
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
grid-template-areas: "loco" "car" "image" "list";
|
grid-template-areas: "loco" "car" "image" "list";
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
margin-top: 2.5em;
|
||||||
|
gap: 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -728,15 +862,22 @@ main {
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
grid-area: "image";
|
grid-area: "image";
|
||||||
|
max-width: 380px;
|
||||||
.image-content {
|
width: 22em;
|
||||||
max-width: 380px;
|
height: 13em;
|
||||||
width: 22em;
|
|
||||||
height: 13em;
|
|
||||||
}
|
|
||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
|
|
||||||
.empty-message {
|
&-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-message,
|
||||||
|
.no-img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -748,7 +889,9 @@ main {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0.3em 0;
|
padding: 0.3em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-message {
|
||||||
background: rgba(#000, 0.75);
|
background: rgba(#000, 0.75);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -771,12 +914,10 @@ main {
|
|||||||
grid-area: "list";
|
grid-area: "list";
|
||||||
|
|
||||||
&_buttons {
|
&_buttons {
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
margin: 0 0.5em 0.5em 0;
|
font-size: 0.9em;
|
||||||
padding: 0.35em 0.45em;
|
padding: 0.2em 0.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,19 +926,57 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ul li {
|
ul li {
|
||||||
background: whitesmoke;
|
|
||||||
color: black;
|
|
||||||
|
|
||||||
outline: none;
|
outline: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:focus {
|
&:focus .item-content {
|
||||||
background: $accentColor;
|
color: $accentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
padding: 0.5em;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
margin: 1em 0;
|
.item-content {
|
||||||
|
/* background: whitesmoke; */
|
||||||
|
color: white;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1em 0;
|
||||||
|
|
||||||
|
margin-right: 0.5em;
|
||||||
|
|
||||||
|
/* max-width: 200px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.count {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
margin-right: 0.5em;
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin: 0 0.5em;
|
||||||
|
/* font-size: 1.25em; */
|
||||||
|
|
||||||
|
color: $accentColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
width: 1.3em;
|
||||||
|
height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin: 0 0.25em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -813,7 +992,7 @@ main {
|
|||||||
.images {
|
.images {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
> .image > div {
|
> .image {
|
||||||
width: 25em;
|
width: 25em;
|
||||||
height: 15em;
|
height: 15em;
|
||||||
}
|
}
|
||||||
@@ -840,6 +1019,11 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 1.5em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 650px) {
|
@media screen and (max-width: 650px) {
|
||||||
header {
|
header {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M0.746704 11.1568L21.2535 11.1568" stroke="white" stroke-width="1.8188"/>
|
<path d="M0.0653076 6.00002L11.9347 6.00001" stroke="white" stroke-width="2"/>
|
||||||
<path d="M10.8936 21.4096L11.1066 0.903843" stroke="white" stroke-width="1.8188"/>
|
<path d="M5.93835 12L6.06169 1.62558e-05" stroke="white" stroke-width="2"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 258 B |
@@ -1,3 +1,3 @@
|
|||||||
<svg width="22" height="12" viewBox="0 0 22 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="15" height="12" viewBox="0 0 15 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M0.614624 10.4007L10.8146 1.30664L21.0146 10.4007" stroke="white" stroke-width="1.8188"/>
|
<path d="M1 11L7.5 2L14 11" stroke="white" stroke-width="2"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 165 B |
@@ -1,3 +1,3 @@
|
|||||||
<svg width="23" height="12" viewBox="0 0 23 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="15" height="12" viewBox="0 0 15 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M1.02197 1.30664L11.222 10.4007L21.422 1.30664" stroke="white" stroke-width="1.8188"/>
|
<path d="M14 1L7.5 10L1 0.999999" stroke="white" stroke-width="2"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 171 B |
@@ -1,4 +1,4 @@
|
|||||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M8.19495 22.4446L22.6199 7.86898" stroke="white" stroke-width="1.8188"/>
|
<path d="M1.00012 13L13.0001 1" stroke="white" stroke-width="2"/>
|
||||||
<path d="M22.6199 22.4446L8.19489 7.86898" stroke="white" stroke-width="1.8188"/>
|
<path d="M13 13L1.00007 1.00002" stroke="white" stroke-width="2"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 236 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1 1L13 1" stroke="white" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 155 B |
@@ -48,6 +48,7 @@ button.btn {
|
|||||||
background: none;
|
background: none;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
|
font-size: 1em;
|
||||||
|
|
||||||
transition: all 250ms;
|
transition: all 250ms;
|
||||||
|
|
||||||
@@ -102,3 +103,13 @@ ul {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
&--accent {
|
||||||
|
color: $accentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--grayed {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||