✨ 修改启动逻辑和插件加载逻辑
This commit is contained in:
3
liteyuki/resources/liteyuki_crt/lang/en.lang
Normal file
3
liteyuki/resources/liteyuki_crt/lang/en.lang
Normal file
@ -0,0 +1,3 @@
|
||||
crt.station=Station(s)
|
||||
crt.hour=Hour(s)
|
||||
crt.minute=Min(s)
|
3
liteyuki/resources/liteyuki_crt/lang/zh-CN.lang
Normal file
3
liteyuki/resources/liteyuki_crt/lang/zh-CN.lang
Normal file
@ -0,0 +1,3 @@
|
||||
crt.station=站
|
||||
crt.hour=小时
|
||||
crt.minute=分钟
|
@ -6,15 +6,154 @@
|
||||
<link rel="stylesheet" href="./css/card.css">
|
||||
<link rel="stylesheet" href="./css/fonts.css">
|
||||
</head>
|
||||
<style>
|
||||
|
||||
:root {
|
||||
--color-primary: #f00;
|
||||
--color-secondary: #fff;
|
||||
--sub-text-color: #aaa;
|
||||
}
|
||||
|
||||
.segment {
|
||||
display: flex;
|
||||
background-color: #0d1117;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.line-icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.vertical-bar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
border-radius: 50px;
|
||||
background-color: #f00;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.station-dot {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
aspect-ratio: 1/1;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* 第一个点在bar顶端,第二个在底部*/
|
||||
.station-dot:first-child {
|
||||
margin-top: 2px;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.station-dot:last-child {
|
||||
margin-top: auto;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.transfer-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.station-name {
|
||||
font-size: 16px;
|
||||
color: var(--color-secondary);
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.end-station {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.line-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.line-name {
|
||||
padding: 3px;
|
||||
border-radius: 50px;
|
||||
background-color: #f00;
|
||||
color: var(--color-secondary);
|
||||
font-size: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.line-direction {
|
||||
font-size: 12px;
|
||||
color: var(--sub-text-color);
|
||||
}
|
||||
|
||||
.station-info {
|
||||
align-items: center;
|
||||
font-size: 10px;
|
||||
color: var(--sub-text-color);
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.start-station {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.segment-index {
|
||||
font-size: 12px;
|
||||
color: var(--sub-text-color);
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="data-storage" id="data">{{ data | tojson }}</div>
|
||||
|
||||
<!---->
|
||||
<template id="route-template">
|
||||
<div class="info-box" id="route-info">
|
||||
|
||||
|
||||
<template id="segment-template">
|
||||
<div class="segment">
|
||||
<div class="line-icon">
|
||||
<!-- 竖条-->
|
||||
<div class="vertical-bar">
|
||||
<div class="station-dot"></div>
|
||||
<div class="station-dot"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="transfer-info">
|
||||
<div class="start-station">
|
||||
<div class="station-name start-station-name">
|
||||
下北泽站
|
||||
</div>
|
||||
<div class="segment-index">
|
||||
第1段
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-info">
|
||||
<div class="line-name">
|
||||
轨道交通环线外环
|
||||
</div>
|
||||
<div class="line-direction">
|
||||
沙坪坝方向
|
||||
</div>
|
||||
</div>
|
||||
<div class="station-info">
|
||||
5站(14分钟)
|
||||
</div>
|
||||
<div class="end-station">
|
||||
<div class="station-name end-station-name">
|
||||
新桥站
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template id="route-template">
|
||||
<div class="info-box route-info" id="route-info">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script src="./js/card.js"></script>
|
||||
<script src="./js/crt_route.js"></script>
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) 2024 SnowyKami Liteyuki Studio All Rights Reserved.
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @type {{
|
||||
* results: Array<{
|
||||
@ -25,7 +24,13 @@
|
||||
const data = JSON.parse(document.getElementById("data").innerText);
|
||||
const results = data["result"];
|
||||
|
||||
const solution_template = document.getElementById("route-template").innerText;
|
||||
const route_template = document.importNode(document.getElementById("route-template").content, true)
|
||||
|
||||
results.forEach(
|
||||
(item, index) => {
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user