差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
wiki:lesscss_test [2023/04/18 00:32] – [CodeMirror test 🤔] ともやん | wiki:lesscss_test [2025/02/24 11:52] (現在) – [顔文字] ともやん | ||
---|---|---|---|
行 3: | 行 3: | ||
===== Dark mode test ===== | ===== Dark mode test ===== | ||
< | < | ||
- | <style> | + | <input type=" |
- | # | + | <input type=" |
- | color: inherit; | + | |
- | } | + | |
- | # | + | |
- | color: var(--text-color); | + | |
- | fill: currentColor !important; | + | |
- | } | + | |
- | .table-striped>tbody> | + | |
- | / | + | |
- | background-color: | + | |
- | } | + | |
- | + | ||
- | body.default.dw-page-on-panel, | + | |
- | div.panel { | + | |
- | color: var(--text-color); | + | |
- | background: var(--background-color); | + | |
- | border-color: | + | |
- | } | + | |
- | hr, .panel-default { | + | |
- | border-color: | + | |
- | } | + | |
- | .light-mode { | + | |
- | --text-color: | + | |
- | --background-color: | + | |
- | --border-color: | + | |
- | } | + | |
- | .dark-mode{ | + | |
- | --text-color: | + | |
- | --background-color: | + | |
- | --border-color: | + | |
- | } | + | |
- | </style> | + | |
- | <input type=" | + | |
< | < | ||
jQuery(() =>{ | jQuery(() =>{ | ||
const chkDark = document.querySelector("# | const chkDark = document.querySelector("# | ||
+ | const chkVertical = document.querySelector("# | ||
const setDarkAndLightMode = () => { | const setDarkAndLightMode = () => { | ||
行 49: | 行 18: | ||
document.body.classList.remove(' | document.body.classList.remove(' | ||
document.body.classList.add(' | document.body.classList.add(' | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | const setVerticalMode = () => { | ||
+ | if (chkVertical.checked === true) { | ||
+ | document.body.classList.add(' | ||
+ | } | ||
+ | else { | ||
+ | document.body.classList.remove(' | ||
} | } | ||
}; | }; | ||
行 54: | 行 32: | ||
chkDark.addEventListener(" | chkDark.addEventListener(" | ||
setDarkAndLightMode(); | setDarkAndLightMode(); | ||
+ | }); | ||
+ | chkVertical.addEventListener(" | ||
+ | setVerticalMode(); | ||
}); | }); | ||
| | ||
行 65: | 行 46: | ||
==== ケース 1 (color_term, | ==== ケース 1 (color_term, | ||
< | < | ||
- | .wrap_column { | + | |
height: 290px; | height: 290px; | ||
+ | border: 1px solid red; | ||
+ | border-radius: | ||
} | } | ||
</ | </ | ||
- | <WRAP group> | + | <WRAP group grp_test> |
<WRAP column 45% mincode> | <WRAP column 45% mincode> | ||
^ テーマを Dark にする | ^ テーマを Dark にする | ||
行 100: | 行 83: | ||
} | } | ||
</ | </ | ||
+ | </ | ||
+ | |||
- | <WRAP column 45%> | ||
==== Notebook のセルの通し番号を振る ==== | ==== Notebook のセルの通し番号を振る ==== | ||
+ | <WRAP group> | ||
+ | |||
+ | <WRAP column 45%> | ||
**Advanced Settings Editor:** - [Notebook]\\ | **Advanced Settings Editor:** - [Notebook]\\ | ||
+ | |||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_mincode> | <WRAP color_mincode> | ||
行 121: | 行 109: | ||
</ | </ | ||
</ | </ | ||
+ | |||
</ | </ | ||
行 527: | 行 516: | ||
</ | </ | ||
+ | ==== ケース 6 (.wrap_tip, .wrap_info, .wrap_important, | ||
+ | <WRAP group> | ||
+ | <WRAP round tip column> | ||
+ | Python環境が見つかりません。バンドルされたインストーラーを使用してインストールするか、デフォルトの Python 環境を変更します | ||
+ | < | ||
+ | ⚠ Python environment not found. < | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP round info column half> | ||
+ | < | ||
+ | </ | ||
+ | <WRAP round important column half> | ||
+ | < | ||
+ | </ | ||
+ | <WRAP round alert column half> | ||
+ | < | ||
+ | </ | ||
+ | <WRAP round help column half> | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
==== GeSHi code test 🤔 ==== | ==== GeSHi code test 🤔 ==== | ||
<WRAP color_term> | <WRAP color_term> | ||
行 727: | 行 737: | ||
===== CodeMirror test 🤔 ===== | ===== CodeMirror test 🤔 ===== | ||
- | < | + | < |
- | <div class=" | + | <div class=" |
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | | ||
< | < | ||
- | | + | |
- | @import '/ | + | |
- | | + | |
- | */ | + | |
- | + | ||
- | .embed_codemirror .CodeMirror pre { | + | |
- | | + | |
} | } | ||
- | .embed_codemirror .CodeMirror * { | + | |
- | font-family: | + | height: |
- | font-size: 11px; | + | |
- | } | + | |
- | .embed_codemirror | + | |
- | height: | + | |
} | } | ||
/ | / | ||
</ | </ | ||
- | + | | |
- | <link rel=" | + | |
- | <link rel=" | + | |
<script src="/ | <script src="/ | ||
<!-- 言語に応じたjsファイルを読み込む --> | <!-- 言語に応じたjsファイルを読み込む --> | ||
<script src="/ | <script src="/ | ||
- | | ||
- | < | ||
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | ||
- | mode: " | ||
- | theme: " | ||
- | lineNumbers: | ||
- | indentUnit: 4 | ||
- | }); | ||
- | </ | ||
- | CodeMirror Version: <label id=" | ||
| | ||
< | < | ||
- | | + | 'use strict'; |
+ | window.CodeMirror5 = CodeMirror; // 5.65.12 を保持 | ||
+ | // DOMContentLoaded 時に実行 | ||
+ | document.addEventListener(' | ||
+ | var jsEditor = CodeMirror5.fromTextArea(document.getElementById(' | ||
+ | mode: " | ||
+ | theme: " | ||
+ | lineNumbers: | ||
+ | indentUnit: 4 | ||
+ | }).setSize(null, | ||
+ | document.getElementById(' | ||
+ | |||
+ | var input = document.getElementById(" | ||
+ | function selectTheme() { | ||
+ | var theme = input.options[input.selectedIndex].textContent; | ||
+ | editor.setOption(" | ||
+ | location.hash = "#" | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
mode: " | mode: " | ||
theme: " | theme: " | ||
行 771: | 行 786: | ||
indentUnit: 4 | indentUnit: 4 | ||
}).setSize(null, | }).setSize(null, | ||
- | | + | |
- | </script> | + | <div class=" |
+ | <!-- < | ||
+ | <p>CodeMirror | ||
+ | </div> | ||
</ | </ | ||
</ | </ | ||
+ | ==== theme: cobalt ==== | ||
< | < | ||
- | <div class=" | + | <div class=" |
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | | ||
< | < | ||
- | | + | |
- | @import '/ | + | font-family: |
- | + | ||
- | div.embed_CodeMirror div.CodeMirror * { | + | |
- | font-family: | + | |
font-size: 10px; | font-size: 10px; | ||
} | } | ||
- | | + | |
- | height: | + | height: |
} | } | ||
/ | / | ||
</ | </ | ||
- | | + | |
- | // | + | |
- | + | ||
- | const loadCSSFromURL = (cssId, url) => { | + | |
- | var head = document.getElementsByTagName(' | + | |
- | var link = document.createElement(' | + | |
- | link.id | + | |
- | link.rel | + | |
- | link.type = ' | + | |
- | link.href = url; | + | |
- | link.media = ' | + | |
- | head.appendChild(link); | + | |
- | }; | + | |
- | + | ||
- | // | + | |
- | // | + | |
- | </ | + | |
- | + | ||
- | <!-- <link rel=" | + | |
- | <link rel=" | + | |
<script src="/ | <script src="/ | ||
<!-- 言語に応じたjsファイルを読み込む --> | <!-- 言語に応じたjsファイルを読み込む --> | ||
<script src="/ | <script src="/ | ||
| | ||
- | < | + | |
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | + | 'use strict'; |
- | mode: "javascript", | + | window.CodeMirror5 = CodeMirror; // 5.65.12 を保持 |
- | theme: | + | // DOMContentLoaded 時に実行 |
+ | document.addEventListener(' | ||
+ | var jsEditor = CodeMirror5.fromTextArea(document.getElementById(' | ||
+ | mode: ' | ||
+ | theme: ' | ||
+ | lineNumbers: | ||
+ | indentUnit: 4 | ||
+ | }).setSize(null, | ||
+ | document.getElementById(' | ||
+ | |||
+ | var input = document.getElementById(' | ||
+ | function selectTheme() { | ||
+ | var theme = input.options[input.selectedIndex].textContent; | ||
+ | editor.setOption(" | ||
+ | location.hash = "#" | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | | ||
+ | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | ||
+ | mode: 'javascript', | ||
+ | theme: | ||
lineNumbers: | lineNumbers: | ||
indentUnit: 4 | indentUnit: 4 | ||
- | }).setSize(null, | + | }).setSize(null, |
</ | </ | ||
<div class=" | <div class=" | ||
行 827: | 行 849: | ||
< | < | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | document.querySelector(' | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== theme: monokai ==== | ||
+ | < | ||
+ | <div class=" | ||
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | | ||
+ | < | ||
+ | # | ||
+ | font-family: | ||
+ | font-size: 10px; | ||
+ | } | ||
+ | # | ||
+ | height: 200px; | ||
+ | } | ||
+ | / | ||
+ | </ | ||
+ | | ||
+ | <script src="/ | ||
+ | <!-- 言語に応じたjsファイルを読み込む --> | ||
+ | <script src="/ | ||
+ | | ||
< | < | ||
- | | + | 'use strict'; |
- | mode: "javascript", | + | window.CodeMirror5 = CodeMirror; // 5.65.12 を保持 |
- | theme: | + | // DOMContentLoaded 時に実行 |
+ | document.addEventListener(' | ||
+ | var jsEditor = CodeMirror5.fromTextArea(document.getElementById(' | ||
+ | mode: ' | ||
+ | theme: ' | ||
+ | lineNumbers: | ||
+ | indentUnit: 4 | ||
+ | }).setSize(null, | ||
+ | document.getElementById(' | ||
+ | |||
+ | var input = document.getElementById(' | ||
+ | function selectTheme() { | ||
+ | var theme = input.options[input.selectedIndex].textContent; | ||
+ | editor.setOption(" | ||
+ | location.hash = "#" | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
+ | mode: 'javascript', | ||
+ | theme: | ||
lineNumbers: | lineNumbers: | ||
indentUnit: 4 | indentUnit: 4 | ||
- | });//.setSize(null, | + | }).setSize(null, |
- | document.getElementById(' | + | |
- | + | | |
- | | + | < |
- | | + | |
- | var theme = input.options[input.selectedIndex].textContent; | + | </div> |
- | editor.setOption("theme", theme); | + | |
- | | + | |
- | } | + | |
- | </script> | + | |
</ | </ | ||
< | < | ||
- | document.querySelector(' | + | document.querySelector(' |
</ | </ | ||
</ | </ | ||
行 1030: | 行 1098: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ===== 顔文字 ===== | ||
+ | < | ||
+ | <span style=" | ||
+ | </ | ||
===== 参考文献 ===== | ===== 参考文献 ===== |