chore: 为线路图展示补充 CC-BY 4.0 署名

This commit is contained in:
2026-07-18 23:51:32 +08:00
parent ec31c12130
commit 6195ebb6be
4 changed files with 30 additions and 12 deletions
+1 -2
View File
@@ -207,7 +207,7 @@
const img = document.createElement('img'); const img = document.createElement('img');
img.alt = '线路图'; img.alt = '线路图';
img.src = `/assets/${encodeURIComponent(m.routeMap)}?v=${encodeURIComponent(mv)}`; img.src = `/assets/${encodeURIComponent(m.routeMap)}?v=${encodeURIComponent(mv)}`;
routeMapBox.innerHTML = '<div class="jr-asset-frame"></div>'; routeMapBox.innerHTML = '<div class="jr-asset-frame"></div><div class="jr-asset-credit">线路图署名:CC-BY 4.0</div>';
routeMapBox.firstElementChild.appendChild(img); routeMapBox.firstElementChild.appendChild(img);
} else { } else {
routeMapBox.innerHTML = '<div class="text-muted">暂无线路图</div>'; routeMapBox.innerHTML = '<div class="text-muted">暂无线路图</div>';
@@ -246,4 +246,3 @@
+5 -3
View File
@@ -826,9 +826,11 @@
</div> </div>
</div> </div>
<div style="border: 1px solid var(--border); background: #0f172a; min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: auto;"> <div style="border: 1px solid var(--border); background: #0f172a; min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 16px; box-sizing: border-box;">
<div style="width: 100%;">
<template v-if="assetsRouteMapUrl"> <template v-if="assetsRouteMapUrl">
<img :src="assetsRouteMapUrl" alt="线路图预览" style="display: block; max-width: 100%; height: auto; background: #ffffff;"> <img :src="assetsRouteMapUrl" alt="线路图预览" style="display: block; max-width: 100%; height: auto; background: #ffffff; margin: 0 auto;">
<div class="jr-asset-credit" style="color: #cbd5e1;">线路图署名:CC-BY 4.0</div>
</template> </template>
<div v-else class="text-muted" style="padding: 24px; text-align: center;"> <div v-else class="text-muted" style="padding: 24px; text-align: center;">
暂无线路图,请先上传一张线路图。 暂无线路图,请先上传一张线路图。
@@ -837,6 +839,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 设置 --> <!-- 设置 -->
<div v-if="currentView === 'settings'"> <div v-if="currentView === 'settings'">
@@ -964,4 +967,3 @@
</html> </html>
+16
View File
@@ -2744,6 +2744,22 @@ body.jr-public-page {
height: auto; height: auto;
} }
.jr-asset-credit {
margin-top: 8px;
font-size: 0.82rem;
line-height: 1.5;
color: #6a786d;
}
.jr-asset-credit a {
color: #0b6b3a;
text-decoration: none;
}
.jr-asset-credit a:hover {
text-decoration: underline;
}
.jr-search-form { .jr-search-form {
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr) auto;
+4 -3
View File
@@ -183,7 +183,7 @@
const li = lineStops[activeLineIdx]; const li = lineStops[activeLineIdx];
if (!li) { if (!li) {
if (routeMapUrl) { if (routeMapUrl) {
container.innerHTML = `<div class="tvm-overview tvm-animate"><img src="${routeMapUrl}" alt="线路图总览"></div>`; container.innerHTML = `<div class="tvm-overview tvm-animate"><div class="tvm-overview-frame"><img src="${routeMapUrl}" alt="线路图总览"><div class="jr-asset-credit">线路图署名:CC-BY 4.0</div></div></div>`;
} else { } else {
container.innerHTML = '<div class="tvm-overview-empty">暂未选择线路,且暂无已上传线路图。</div>'; container.innerHTML = '<div class="tvm-overview-empty">暂未选择线路,且暂无已上传线路图。</div>';
} }
@@ -399,8 +399,9 @@
.tvm-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; margin-bottom: 2px; } .tvm-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; margin-bottom: 2px; }
.tvm-line-btn { flex: 0 0 auto; white-space: nowrap; } .tvm-line-btn { flex: 0 0 auto; white-space: nowrap; }
.tvm-single-line, .tvm-route { overflow-x: auto; padding: 10px 0; min-height: 120px; display: flex; align-items: center; justify-content: flex-start; } .tvm-single-line, .tvm-route { overflow-x: auto; padding: 10px 0; min-height: 120px; display: flex; align-items: center; justify-content: flex-start; }
.tvm-overview { width: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; background: #f8fbf8; border: 1px solid #d7e0d3; } .tvm-overview { width: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; background: #f8fbf8; border: 1px solid #d7e0d3; padding: 10px; box-sizing: border-box; }
.tvm-overview img { display: block; max-width: 100%; height: auto; background: #ffffff; } .tvm-overview-frame { width: 100%; }
.tvm-overview img { display: block; max-width: 100%; height: auto; background: #ffffff; margin: 0 auto; }
.tvm-overview-empty { width: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; color: #64748b; background: #f8fbf8; border: 1px solid #d7e0d3; padding: 16px; text-align: center; } .tvm-overview-empty { width: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; color: #64748b; background: #f8fbf8; border: 1px solid #d7e0d3; padding: 16px; text-align: center; }
.tvm-route-title { font-weight: bold; margin-bottom: -15px; color: #475569; display: none; font-size: 14px; } .tvm-route-title { font-weight: bold; margin-bottom: -15px; color: #475569; display: none; font-size: 14px; }
.tvm-route { margin-top: -4px; } .tvm-route { margin-top: -4px; }