check page: add share button (parity with Next) + shared share row styles
- ui/share.js: one handler for all pages (id=share-btn / id=share-status), short link = origin+path+hash, navigator.share + clipboard, LINE link, re-binds after router swaps the view (MutationObserver), skips buttons that a page already bound itself - checkSchedule.html: share row inside .mu-container (same position as Next) - _shared.css: .mu-share-* moved here from home.html, values copied from Next (ghost button, radius 8, 44px, tokens) so light/dark match - home.init.js marks its own binding so the shared handler does not double-bind - index.html + sw PRECACHE: share.js · VERSION 2026.09.27.124
This commit is contained in:
1 parent
1adc2a6cd0
commit
b6ccb66ce2
8 files changed
+189
-39
No files matched your search
@@ -172,6 +172,15 @@
|
||||
<!-- การ์ดจุดจอด + ชิปเวลา: สร้างจาก resource/data/schedules.json (checkSchedule.init.js) -->
|
||||
<ul class="mu-schedule-list" id="check-schedule-list"></ul>
|
||||
</div>
|
||||
|
||||
<!-- ปุ่มแชร์หน้านี้ (ใช้ ui/share.js ร่วมกับหน้าอื่น) -->
|
||||
<div class="mu-share-row">
|
||||
<button type="button" class="mu-share-btn" id="share-btn">
|
||||
<svg class="ic" aria-hidden="true"><use href="#ic-navigation"/></svg>
|
||||
<span data-i18n="share.label">แชร์หน้านี้</span>
|
||||
</button>
|
||||
<p class="mu-share-status" id="share-status" aria-live="polite"></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in new issue
Block a user