Mouse Clock 1.2.0: container option; editor preview stays inside the play area
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f9ac3e1de
commit
7bf38ae86a
3 files changed
+55
-23
No files matched your search
+7
-5
@@ -59,7 +59,7 @@
|
||||
main { min-width: 0; }
|
||||
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
|
||||
.card h2 { margin: 0 0 8px; font-size: 1.15rem; }
|
||||
.play { min-height: 260px; display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); padding: 20px; }
|
||||
.play { min-height: 320px; position: relative; touch-action: pan-y; display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); padding: 20px; }
|
||||
.play strong { color: var(--text); font-size: 1.1rem; display: block; }
|
||||
.bgswitch { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: .9rem; }
|
||||
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
|
||||
@@ -73,7 +73,7 @@
|
||||
@media (max-width: 760px) {
|
||||
.layout { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
|
||||
.panel { position: static; max-height: none; }
|
||||
.play { min-height: 220px; }
|
||||
.play { min-height: 380px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -142,10 +142,11 @@
|
||||
<main>
|
||||
<section class="card" aria-labelledby="playTitle">
|
||||
<h2 id="playTitle">試玩區</h2>
|
||||
<div class="play">
|
||||
<div class="play" id="play">
|
||||
<div>
|
||||
<strong>移動滑鼠,或用手指在畫面上滑動</strong>
|
||||
時鐘會跟著你。電腦在游標右下方,手機在手指上方。
|
||||
時鐘會跟著你。電腦在游標右下方,手機在手指上方。<br>
|
||||
這裡的時鐘只在框內預覽;放到你的網站上會跟著整個頁面移動。
|
||||
</div>
|
||||
</div>
|
||||
<div class="bgswitch" role="radiogroup" aria-label="預覽底色">
|
||||
@@ -193,7 +194,7 @@
|
||||
<a href="https://code.tsdylab.com/tangsongdayo/mouse-clock">原始碼與授權</a> ・ <span id="ver"></span>
|
||||
</footer>
|
||||
|
||||
<script src="mouse-clock.js?v=1.1.0" data-manual></script>
|
||||
<script src="mouse-clock.js?v=1.2.0" data-manual></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -317,6 +318,7 @@
|
||||
function restart() {
|
||||
var o = clone(state);
|
||||
o.reducedMotion = 'show'; // 編輯器一律顯示預覽
|
||||
o.container = $('play'); // 只在試玩區內預覽(輸出的程式碼不含這項)
|
||||
MC.start(o);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user