ここに評価モジュール
[[html]]
<style type="text/css">
/* CSS duplicated from Wikidot proper -_- */
body {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 12.8px; /* 16px * 0.8 */
color: #333;
line-height: 141%;
}
.classified-info {
display: none;
}
blockquote {
border: 1px dashed #999;
padding: 0 12.8px;
background-color: #f4f4f4;
}
a {
color: #b01;
cursor: pointer;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.collapsed {
display: none;
}
h4 {
font-size: 130%;
font-weight: bold;
margin-bottom: 0;
}
/* Keypad specific */
.keypad {
background: linear-gradient(to bottom, #D0D0D0 0%, #FFFFFF 80%, #CCCCCC 100%), #D4D4D4;
padding: 6.4px;
border-radius: 19.2px;
margin: 25.6px;
margin-left: auto;
margin-right: auto;
border: 2px solid #1F0D12;
box-shadow: 0 3px 5px black, 0 3px 9px rgba(0, 0, 0, 0.5);
border-spacing: 6px;
line-height: normal;
}
.keypad-readout {
background: linear-gradient(to top, #1A211E 1%, #000000 100%), black;
color: #E22933;
font-size: 27px;
font-family: Consolas, monospace, sans-serif;
font-weight: bold;
border-radius: 3.84px;
border-top-left-radius: 6.4px;
border-top-right-radius: 6.4px;
border: 2px solid #32443A;
text-align: center;
padding: 7px;
text-shadow: 0 0 6px red;
}
.regular-button {
background: #714144;
color: white;
font-family: monospace,sans-serif;
font-weight: bold;
text-align: center;
width: 47.36px;
height: 47.36px;
border-radius: 5.12px;
font-size: 23px;
transition: background 0.1s ease-out;
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.6);
}
.regular-button:hover {
background:#944449;
}
.regular-button:active {
background:#B9475B;
}
.clr-button {
border-bottom-left-radius: 12.8px;
background: #9E0E17;
}
.clr-button:hover {
background: #B90B15;
}
.clr-button:active {
background: #DE0814;
}
.go-button {
border-bottom-right-radius: 12.8px;
background: #43862E;
}
.go-button:hover {
background: #469A2B;
}
.go-button:active {
background: #4EC527;
}
.keypad-readout,
.regular-button {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select : none; /* Chrome/Safari/Opera */
-khtml-user-select : none; /* Konqueror */
-moz-user-select : none; /* Firefox */
-ms-user-select : none; /* IE/Edge */
user-select : none;
cursor: default;
}
</style>
<script type="text/javascript">
var magicNumber = [,].length;
var scpNumber = Math.pow(magicNumber, magicNumber);
var emptyReadout = "\u00A0"; // non-breaking space
var input = [];
var maxInputLength = magicNumber;
var busy = false;
function press(keyText) {
if(busy) {
return;
}
var readout = document.body.querySelector(".keypad-readout");
if(keyText === "GO") {
busy = true;
if(
input.map(function(digit) {
return parseInt(digit, 10);
}).reduce(function(a, b) {
return a * b;
}, 1) === scpNumber
) {
setTimeout(function() {
readout.textContent = '承認';
}, 0);
setTimeout(function() {
document.querySelector(".classified-info").style.display = "block";
}, 1000);
setTimeout(function() {
readout.textContent = emptyReadout;
// Leave busy, disabling keypad
}, 2000);
} else {
setTimeout(function() {
readout.textContent = '拒否';
}, 0);
setTimeout(function() {
readout.textContent = '\u0C7F';
}, 1900);
setTimeout(function() {
input = [];
readout.textContent = emptyReadout;
busy = false;
}, 2000);
}
}
else if(keyText === "CLR") {
input = [];
}
else {
if(input.length >= maxInputLength) {
return;
}
input.push(keyText);
}
readout.textContent = input.length === 0 ? emptyReadout : input.map(function() {
return '-';
}).join("");
}
// Section visibility toggles
var toggle = function(cls) {
var collapsed = document.querySelectorAll("." + cls + ".collapsed");
var expanded = document.querySelectorAll("." + cls + ":not(.collapsed)");
var i;
for(i = 0; i < collapsed.length; i++) {
collapsed[i].classList.remove("collapsed");
}
for(i = 0; i < expanded.length; i++) {
expanded[i].classList.add("collapsed");
}
};
</script>
<div class="public-info">
ここに文章
<p>​</p>
<table class="keypad">
<tbody>
<tr>
<td colspan="3" class="keypad-readout"> </th>
</tr>
<tr>
<td class="regular-button" onclick="press('7');">7</td>
<td class="regular-button" onclick="press('8');">8</td>
<td class="regular-button" onclick="press('9');">9</td>
</tr>
<tr>
<td class="regular-button" onclick="press('4');">4</td>
<td class="regular-button" onclick="press('5');">5</td>
<td class="regular-button" onclick="press('6');">6</td>
</tr>
<tr>
<td class="regular-button" onclick="press('1');">1</td>
<td class="regular-button" onclick="press('2');">2</td>
<td class="regular-button" onclick="press('3');">3</td>
</tr>
<tr>
<td class="regular-button clr-button" onclick="press('CLR');">CLR</td>
<td class="regular-button" onclick="press('0');">0</td>
<td class="regular-button go-button" onclick="press('GO');">GO</td>
</tr>
</tbody>
</table>
</div>
<div class="classified-info">
<p>​</p>
ここに内容
</div>
[[/html]]
こちらがSCP-3125で使われているwiki構文のコピペです。一応サンドボックスⅢで動作確認を行っています。(構文にあまり詳しく無いので間違いがあるかもしれません)
赤文字であるvar magicNumber = [,].length;の[]の中の , の数が桁数及び答えの数になるようです(例として[,,,]なら333が答えになります)
123のような複雑な数字のやり方はわかりませんでした。(すみません)
重要: この構文は特殊で[[html]]から[[/html]]で囲まれている間は通常のwiki構文は作動しません。別の方がこの構文の対応表を作っていらしたのでその方の表を貼っておきます。
対応表
次の構文をする際は<A>入れたい文</B>のように入れてください。
|
A |
B |
太文字 |
b |
b |
斜め文字 |
em |
em |
下線引く |
span style="text-decoration: underline;" |
span |
折りたたみ |
collapsible show = "+ 開ける"hide="- 閉じる" |
collapsible |
引用箱 |
blockquote |
blockquote |
文章真ん中寄せ |
div style="text-align: center;" |
div |
対応表外
改行をする際は<br>を改行したいところへ入れてください。
ふとがな
<ruby>
<rb>亜米利加</rb>
<rt>アメリカ</rt>
</ruby>
<ul>
<li>リストです。 </li>
<li>リストです。 </li>
<li>リストです。 </li>
</ul>
番号無しのリストです。番号有りは<ul>ではなく、<ol>にしてください。
追記: SCP-3125に記載されているものとは違いますがこちらに記載されているもののほうが簡単です。
コメント投稿フォームへ
批評コメントTopへ