-
Notifications
You must be signed in to change notification settings - Fork 1
Add Cloudflare Pages placeholder index.html #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| <!doctype html> | ||
| <html lang="ja"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>SwitchBot Controller | Cloudflare Pages Preview</title> | ||
| <style> | ||
| :root { | ||
| color-scheme: light dark; | ||
| --bg: #0f172a; | ||
| --card: rgba(255, 255, 255, 0.05); | ||
| --text: #e2e8f0; | ||
| --accent: #38bdf8; | ||
| --muted: #94a3b8; | ||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| min-height: 100vh; | ||
| font-family: "Segoe UI", "Noto Sans JP", system-ui, -apple-system, | ||
| sans-serif; | ||
| background: radial-gradient(circle at 20% 20%, #1e293b, var(--bg)); | ||
| color: var(--text); | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: 32px; | ||
| } | ||
|
|
||
| main { | ||
| width: min(960px, 100%); | ||
| background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), var(--card)); | ||
| border: 1px solid rgba(255, 255, 255, 0.08); | ||
| border-radius: 16px; | ||
| padding: 32px; | ||
| box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4); | ||
| } | ||
|
|
||
| header { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| margin-bottom: 24px; | ||
| } | ||
|
|
||
| header .pill { | ||
| padding: 4px 10px; | ||
| border-radius: 999px; | ||
| border: 1px solid rgba(255, 255, 255, 0.15); | ||
| color: var(--accent); | ||
| background: rgba(56, 189, 248, 0.1); | ||
| font-size: 12px; | ||
| letter-spacing: 0.4px; | ||
| } | ||
|
|
||
| h1 { | ||
| margin: 0; | ||
| font-size: clamp(24px, 3vw, 32px); | ||
| } | ||
|
|
||
| p.lead { | ||
| margin: 8px 0 24px; | ||
| color: var(--muted); | ||
| line-height: 1.6; | ||
| } | ||
|
|
||
| section { | ||
| display: grid; | ||
| grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); | ||
| gap: 16px; | ||
| } | ||
|
|
||
| .card { | ||
| padding: 18px; | ||
| border-radius: 12px; | ||
| background: rgba(255, 255, 255, 0.05); | ||
| border: 1px solid rgba(255, 255, 255, 0.08); | ||
| } | ||
|
|
||
| .card h2 { | ||
| margin: 0 0 8px; | ||
| font-size: 16px; | ||
| color: var(--accent); | ||
| } | ||
|
|
||
| .card ul { | ||
| margin: 0; | ||
| padding-left: 20px; | ||
| color: var(--muted); | ||
| line-height: 1.6; | ||
| } | ||
|
|
||
| .card ul li + li { | ||
| margin-top: 6px; | ||
| } | ||
|
|
||
| footer { | ||
| margin-top: 24px; | ||
| font-size: 14px; | ||
| color: var(--muted); | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <main> | ||
| <header> | ||
| <div class="pill">Cloudflare Pages</div> | ||
| <h1>SwitchBot Controller プレビュー</h1> | ||
| </header> | ||
|
|
||
| <p class="lead"> | ||
| このページは Pull Request ごとに SwitchBot Controller の UI 挙動を Cloudflare Pages 上で確認するためのプレースホルダーです。Electron や SwitchBot API の実呼び出しは行われず、見た目やモック挙動の確認に専念できます。 | ||
| </p> | ||
|
|
||
| <section> | ||
| <div class="card"> | ||
| <h2>目的</h2> | ||
| <ul> | ||
| <li>PR の変更をブラウザで手軽に共有・レビュー</li> | ||
| <li>API キー不要で UI の差分を確認</li> | ||
| <li>Cloudflare Pages のデプロイ動作を事前検証</li> | ||
| </ul> | ||
| </div> | ||
| <div class="card"> | ||
| <h2>確認ポイント</h2> | ||
| <ul> | ||
| <li>スタイルやコンポーネントの見た目</li> | ||
| <li>ルーティングや状態管理のモック挙動</li> | ||
| <li>多言語対応やテーマ切り替えなどの UI</li> | ||
| </ul> | ||
| </div> | ||
| <div class="card"> | ||
| <h2>注意事項</h2> | ||
| <ul> | ||
| <li>SwitchBot Cloud API は呼び出しません(通信なし)</li> | ||
| <li>Electron 固有の機能はブラウザでは無効です</li> | ||
| <li>必要に応じてモックデータを利用して動作を再現してください</li> | ||
| </ul> | ||
| </div> | ||
| </section> | ||
|
|
||
| <footer>最新版は PR ごとの Cloudflare Pages プレビューでご確認ください。</footer> | ||
| </main> | ||
| </body> | ||
| </html> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
color-schemeproperty is set tolight dark, which signals that the page supports both light and dark modes. Since the CSS only provides a dark theme, this could lead to minor UI inconsistencies (e.g., for scrollbars) on systems with a light mode preference. To accurately reflect the page's styling, it's recommended to set this property todark.