{"id":513088,"student_id":2589,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n \u003ctitle\u003e天氣指令與時間指令 | 麥塊教育版指令分享工具\u003c/title\u003e\\n \u003clink href=\\\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css\\\" rel=\\\"stylesheet\\\" integrity=\\\"sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU\\\" crossorigin=\\\"anonymous\\\"\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003cdiv class=\\\"container\\\"\u003e\u003c/div\u003e\\n \u003cscript src=\\\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js\\\" integrity=\\\"sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ\\\" crossorigin=\\\"anonymous\\\"\u003e\u003c/script\u003e\\n \u003cscript src=\\\"https://cdn.jsdelivr.net/npm/clipboard@2.0.10/dist/clipboard.min.js\\\"\u003e\u003c/script\u003e\\n \u003cscript\u003e\\n const data = [\\n {\\n 'title': '天氣指令',\\n 'commands': [\\n {\\n 'description': '設為晴天',\\n 'command': '/weather clear'\\n },\\n {\\n 'description': '設為雨天',\\n 'command': '/weather rain'\\n },\\n {\\n 'description': '設為雷雨',\\n 'command': '/weather thunder'\\n }\\n ]\\n },\\n {\\n 'title': '時間指令',\\n 'commands': [\\n {\\n 'description': '設為日出',\\n 'command': '/time set sunrise'\\n },\\n {\\n 'description': '設為白天',\\n 'command': '/time set day'\\n },\\n {\\n 'description': '設為中午',\\n 'command': '/time set noon'\\n },\\n {\\n 'description': '設為日落',\\n 'command': '/time set sunset'\\n },\\n {\\n 'description': '設為夜晚',\\n 'command': '/time set night'\\n },\\n {\\n 'description': '設為午夜',\\n 'command': '/time set midnight'\\n },\\n {\\n 'description': '暫停日夜循環',\\n 'command': '/gamerule dodaylightcycle false'\\n }\\n ]\\n },\\n {\\n 'title': '生長指令',\\n 'commands': [\\n {\\n 'description': '生長加速',\\n 'command': '/gamerule randomtickspeed 300'\\n }\\n ]\\n },\\n];\\n\\n\\n\\nlet html = `\\n\u003cdiv class=\\\"row\\\"\u003e\\n \u003cdiv class=\\\"col-12\\\"\u003e\\n \u003cdiv class=\\\"card\\\"\u003e\\n \u003cdiv class=\\\"card-body\\\"\u003e\\n \u003ch5 class=\\\"card-title\\\"\u003e天氣指令\u003c/h5\u003e\\n \u003chr /\u003e\\n \u003cdiv class=\\\"col-12\\\"\u003e\\n \u003cdiv class=\\\"input-group mb-3 d-flex align-items-center\\\"\u003e\\n \u003cp class=\\\"m-0 me-1\\\"\u003e\\n 設為晴天:\\n \u003c/p\u003e\\n \u003cinput id=\\\"foo1\\\" value=\\\"/weather clear\\\" readonly type=\\\"text\\\" class=\\\"form-control\\\" placeholder=\\\"\\\" aria-label=\\\"Example text with button addon\\\" aria-describedby=\\\"button-addon1\\\"\u003e\\n \u003cbutton class=\\\"btn btn-primary\\\" type=\\\"button\\\" id=\\\"button-addon1\\\" data-clipboard-target=\\\"#foo1\\\"\u003e複製指令\u003c/button\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\u003c/div\u003e\\n`;\\n\\n\\n\\n\\nlet rowElementHtmls = '';\\n\\nconst rowElements = data.forEach((rowElement, idx1)=\u003e {\\n console.log(rowElement.title);\\n\\n let commandElementHtmls = '';\\n rowElement.commands.forEach((commandElement, idx2) =\u003e {\\n let commandElementHtml = `\\n\u003cdiv class=\\\"col-12\\\"\u003e\\n \u003cdiv class=\\\"input-group mb-3 d-flex align-items-center\\\"\u003e\\n \u003cp class=\\\"m-0 me-1\\\"\u003e\\n ${commandElement.description}:\\n \u003c/p\u003e\\n \u003cinput id=\\\"commandElement-${idx1}-${idx2}\\\" value=\\\"${commandElement.command}\\\" readonly type=\\\"text\\\" class=\\\"form-control\\\" placeholder=\\\"\\\"\u003e\\n \u003cbutton class=\\\"btn btn-primary\\\" type=\\\"button\\\" id=\\\"button-addon-${idx1}-${idx2}\\\" data-clipboard-target=\\\"#commandElement-${idx1}-${idx2}\\\"\u003e複製指令\u003c/button\u003e\\n \u003c/div\u003e\\n\u003c/div\u003e\\n`;\\n commandElementHtmls += commandElementHtml\\n })\\n \\n let rowElementHtml = `\\n\u003cdiv class=\\\"row mb-3\\\"\u003e\\n \u003cdiv class=\\\"col-12\\\"\u003e\\n \u003cdiv class=\\\"card\\\"\u003e\\n \u003cdiv class=\\\"card-body\\\"\u003e\\n \u003ch5 class=\\\"card-title\\\"\u003e${rowElement.title}\u003c/h5\u003e\\n \u003chr /\u003e\\n ${commandElementHtmls}\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\u003c/div\u003e\\n`;\\n rowElementHtmls += rowElementHtml\\n})\\n\\ndocument.querySelector(\\\".container\\\").innerHTML = rowElementHtmls\\n \u003c/script\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"/* 設定整個頁面內容水平置中、內寬為 30 像素:*/\\nbody {\\n padding: 30px;\\n}\\n\",\"js\":\"new ClipboardJS('.btn');\"}","created_at":"2023-04-06T14:34:29.772+08:00","updated_at":"2023-12-12T15:30:15.287+08:00","name":"麥塊教育版指令分享工具 - 天氣指令與時間指令","language":"web","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/513088/ff426ce8d100e375f85554c272885b01.jpg"},"parent_id":3,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":68,"hashid":"yeysqk2mw","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":11676279,"file_name":"koding.png","project_id":513088,"asset_id":617510,"created_at":"2023-04-06T14:34:39.303+08:00","updated_at":"2023-04-06T14:34:39.303+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦