0 仮コードDATAテキスト版 みんなに公開
data:text/html;charset=utf-8,<!DOCTYPE html><html lang="ja"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>電卓</title><style>:root{--bg-color:#1c1c1e;--calc-bg:#000000;--btn-bg:#333333;--btn-text:#ffffff;--op-bg:#ff9f0a;--op-text:#ffffff;--top-bg:#a5a5a5;--top-text:#000000;--disp-text:#ffffff;}body{margin:0;padding:0;background-color:var(--bg-color);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;display:flex;justify-content:center;align-items:center;min-height:100vh;color:#fff;user-select:none;}#app{width:100%;max-width:360px;height:640px;background-color:var(--calc-bg);border-radius:24px;box-shadow:0 10px 30px rgba(0,0,0,0.5);display:flex;flex-direction:column;overflow:hidden;position:relative;}.app-header{display:none;justify-content:space-between;align-items:center;padding:12px 16px;background-color:#111;border-bottom:1px solid #222;}.panic-btn{background:#ff3b30;color:white;border:none;padding:6px 12px;border-radius:12px;font-weight:bold;cursor:pointer;}#calc-screen{display:flex;flex-direction:column;height:100%;justify-content:flex-end;padding:16px;box-sizing:border-box;}.display{font-size:48px;color:var(--disp-text);text-align:right;margin-bottom:16px;padding:0 8px;word-wrap:break-word;word-break:break-all;}.buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}button.calc-btn{aspect-ratio:1;border-radius:50%;border:none;font-size:24px;font-weight:500;cursor:pointer;background-color:var(--btn-bg);color:var(--btn-text);}button.calc-btn:active{opacity:0.7;}button.btn-top{background-color:var(--top-bg);color:var(--top-text);}button.btn-op{background-color:var(--op-bg);color:var(--op-text);}button.btn-zero{grid-column:span 2;border-radius:40px;text-align:left;padding-left:28px;aspect-ratio:auto;}#guide-screen{display:none;flex-direction:column;height:100%;padding:20px;box-sizing:border-box;}</style></head><body><div id="app"><div class="app-header" id="app-header"><span style="font-size:14px;font-weight:bold;">ガイド</span><button class="panic-btn" onclick="showCalc()">🚨 電卓</button></div><div id="calc-screen"><div class="display" id="display">0</div><div class="buttons"><button class="calc-btn btn-top" onclick="clearDisplay()">AC</button><button class="calc-btn btn-top" onclick="toggleSign()">+/-</button><button class="calc-btn btn-top" onclick="appendInput('%')">%</button><button class="calc-btn btn-op" onclick="appendInput('÷')">÷</button><button class="calc-btn" onclick="appendInput('7')">7</button><button class="calc-btn" onclick="appendInput('8')">8</button><button class="calc-btn" onclick="appendInput('9')">9</button><button class="calc-btn btn-op" onclick="appendInput('×')">×</button><button class="calc-btn" onclick="appendInput('4')">4</button><button class="calc-btn" onclick="appendInput('5')">5</button><button class="calc-btn" onclick="appendInput('6')">6</button><button class="calc-btn btn-op" onclick="appendInput('-')">-</button><button class="calc-btn" onclick="appendInput('1')">1</button><button class="calc-btn" onclick="appendInput('2')">2</button><button class="calc-btn" onclick="appendInput('3')">3</button><button class="calc-btn btn-op" onclick="appendInput('+')">+</button><button class="calc-btn btn-zero" onclick="appendInput('0')">0</button><button class="calc-btn" onclick="appendInput('.')">.</button><button class="calc-btn btn-op" onclick="calculate()">=</button></div></div><div id="guide-screen"><h3 style="color:#ff9f0a;margin-top:0;">📖 使い方ガイド</h3><p style="font-size:13px;line-height:1.6;color:#ccc;">このアプリはシンプルな電卓機能を提供するWebアプリケーションです。</p><h4 style="margin-bottom:6px;">【隠しコマンド】</h4><div style="background:#222;padding:10px;border-radius:8px;font-family:monospace;font-size:14px;color:#0f0;">1205 =</div><p style="font-size:12px;color:#aaa;margin-top:6px;">電卓画面で「1205」と入力して「=」を押すと、このガイド画面が表示されます。</p><h4 style="margin-bottom:6px;">【復帰方法】</h4><p style="font-size:12px;color:#aaa;">右上の「🚨 電卓」ボタンを押すと、すぐに通常の電卓画面に戻ります。</p></div></div><script>let currentInput='0';const SECRET_CODE='1205';const displayEl=document.getElementById('display');const calcScreen=document.getElementById('calc-screen');const guideScreen=document.getElementById('guide-screen');const appHeader=document.getElementById('app-header');function updateDisplay(){displayEl.textContent=currentInput;}function appendInput(val){if(currentInput==='0'&&val!=='.'){currentInput=val;}else{currentInput+=val;}updateDisplay();}function clearDisplay(){currentInput='0';updateDisplay();}function toggleSign(){if(currentInput!=='0'){currentInput=currentInput.startsWith('-')?currentInput.slice(1):'-'+currentInput;updateDisplay();}}function calculate(){if(currentInput===SECRET_CODE){showGuide();clearDisplay();return;}try{let expr=currentInput.replace(/×/g,'*').replace(/÷/g,'/');currentInput=String(eval(expr));}catch(e){currentInput='Error';}updateDisplay();}function showCalc(){calcScreen.style.display='flex';guideScreen.style.display='none';appHeader.style.display='none';}function showGuide(){calcScreen.style.display='none';guideScreen.style.display='flex';appHeader.style.display='flex';}</script></body></html>
メモを更新するにはあいことばの入力が必要です
コメント(0)