settings
Scrapboxのプロジェクト全体設定。
CSSの設定を下記に記載する。
https://gyazo.com/b17264b8c6d91f458dfcf68f96752612
※設定のアイコンはこちらからのいただきもの。感謝!
※来訪者が設定画面を開いてカスタマイズの内容を確認したいこともあるだろうから、一覧からアイコンで設定ページがすぐわかるようにしておくとよい。
こちらのページのCSS拡張は下記のページを参考に(ほとんどそのまま)してこちらのページに適用した。感謝!
Scrapboxとあそぶ
https://scrapbox.io/scrasobox/
では実際に設定例をみていこう。
ユーザーのページにおいても良さそうなCSS
/scrasobox/箇条書きを控えめにする
code:style.css
/* 箇条書きを控えめにする */
.app .line .indent-mark .dot {
height: .2em; width: .4em; border-radius: 25%;
background-color: rgba(173,173,173,.55) }
.app:not(.presentation) .line .indent-mark .dot { top: auto; bottom: 0 }
/scrasobox/ピンしたページのスタイル
code:style.css
.grid li.page-list-item a .pin { background-color: transparent; background-image: none }
.grid li.page-list-item a .pin::after {
content: '\f08d'; font-family: 'FontAwesome'; font-size: 20px; color: #A45AFF; bottom: 0;
diplay: inline-block; transform: rotate(35deg) }
/scrasobox/テーブルのセルをわかりやすくする
code:style.css
/* テーブルのセルをわかりやすくする */
.table-block table { background-color: transparent; border-collapse: separate; border-spacing: 2px }
.table-block table tr td { padding: .1em; background-color: rgba(0,0,0,0.04) }
.table-block table tr:nth-child(even) td { background-color: rgba(0,0,0,0.06) } /* 偶数行を濃くする */
.table-block table tr:first-child td { font-weight: bolder; text-align: center } /* 1行目だけ太字&中央揃え */
.table-block table tr td:first-child { padding: 0; background-color: transparent; border-width: 0 }
/scrasobox/ヘッダーメニューを固定する
code:style.css
/* はりつくメニューバー */
@media screen and (min-height: 600px) and (min-width: 768px) {
.app:not(.presentation) { padding-top: 90px; padding-right: 0 !important }
.app:not(.presentation) .page-menu { position: fixed; top: 90px }
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 990; overflow: unset }
.dropdown.open .dropdown-menu {
position: absolute; left: auto; top: auto;
max-height: calc(100vh - 100px); overflow-y: auto }
.dropdown.open .dropdown-menu.global-menu { left: 0; top: 54px }
.page-menu .dropdown.open .dropdown-menu { position: absolute; top: 0 } }
他の人とも共用したいのでsettingsに置きたいCSS
/scrasobox/Bullet Journal をやってみる
code:style.css
/* タグアイコンの共通スタイル (1) */
.line:not(.cursor-line) ahref='./!':not(.icon) span,
.line:not(.cursor-line) ahref='./%3F':not(.icon) span,
.line:not(.cursor-line) ahref='./*':not(.icon) span,
.line:not(.cursor-line) ahref='./_':not(.icon) span,
.line:not(.cursor-line) ahref='./x':not(.icon) span,
.line:not(.cursor-line) ahref='./%3E':not(.icon) span,
.line:not(.cursor-line) ahref='./%3C':not(.icon) span,
.line:not(.cursor-line) ahref='./e':not(.icon) span {
display: inline-block; width: 0; text-indent: -9999px }
/* タグアイコンの共通スタイル (2) */
.line:not(.cursor-line) ahref='./!':not(.icon)::after,
.line:not(.cursor-line) ahref='./%3F':not(.icon)::after,
.line:not(.cursor-line) ahref='./*':not(.icon)::after,
.line:not(.cursor-line) ahref='./_':not(.icon)::after,
.line:not(.cursor-line) ahref='./x':not(.icon)::after,
.line:not(.cursor-line) ahref='./%3E':not(.icon)::after,
.line:not(.cursor-line) ahref='./%3C':not(.icon)::after,
.line:not(.cursor-line) ahref='./e':not(.icon)::after {
display: inline-block; min-width: 1.15em; padding-left: 1px;
font: normal 110%/normal FontAwesome; text-align: center }
/* ここから各アイコンの設定 */
.line:not(.cursor-line) ahref='./!':not(.icon)::after { content: '\f06a'; color: #F6AE2D }
.line:not(.cursor-line) ahref='./%3F':not(.icon)::after { content: '\f059'; color: #758E4F }
.line:not(.cursor-line) ahref='./*':not(.icon)::after { content: '\f069'; color: #F26419 }
.line:not(.cursor-line) ahref='./_':not(.icon)::after { content: '\f096'; color: #08BDBD }
.line:not(.cursor-line) ahref='./x':not(.icon)::after { content: '\f046'; color: #2489C5 }
.line:not(.cursor-line) ahref='./%3E':not(.icon)::after { content: '\f045'; color: lightgrey }
.line:not(.cursor-line) ahref='./%3C':not(.icon)::after { content: '\f274'; color: lightgrey }
.line:not(.cursor-line) ahref='./e':not(.icon)::after { content: '\f10c'; color: #F26419 }
/scrasobox/フキダシになるタグ
code:style.css
/* { で始まるタグを吹き出しにする ※アイコン記法は除く */
.line ahref^="./%7B":not(.icon) {
display: inline-block; position: relative; vertical-align: text-top;
line-height: 1; font-size: 91%; color: #FFF !important; background-color: #b2bcba;
padding: 3px 4px 1px 5px; margin-left: 10px;
border-radius: 4px; border-bottom-left-radius: 0 }
.line ahref^="./%7B":not(.icon):after {
display: block; /* reduce the damage in FF3.0 */
position: absolute; bottom: 0; left: -7px;
width: 0; content: "";
border-width: 0 0 7px 7px; border-style: solid; border-color: #b2bcba transparent }
.line ahref^="./%7B":not(.icon) span:first-child { display: none }
.line.cursor-line ahref^="./%7B":not(.icon) span:first-child { display: inline }
code:tag_style.css
/* フキダシ記法版 */
.line:not(.cursor-line) .deco-\{ {
display: inline-block; position: relative; max-width: calc(100% - 4em);
line-height: 1; color: #FFF !important; background-color: rgba(107, 177, 148, 0.85);
padding: 3px 4px 2px 5px; margin-left: .6em;
border-radius: .4em; border-bottom-left-radius: 0 }
.line:not(.cursor-line) .deco-\{::after {
display: block; /* reduce the damage in FF3.0 */
position: absolute; bottom: 0; left: -0.45em;
width: 0; content: '';
border-width: 0 0 .5em .5em; border-style: solid; border-color: rgba(107, 177, 148, 0.85) transparent }
ページ一覧(グリッドリスト)のカードをマウスカーソル当たっているときに目立つようにする
/li9ri9/settings#5999b170433fb90000fa84b3
code:style.css
.grid li.page-list-item a {
border-radius: 6px;
box-shadow: 0 1px 0 rgba(0,0,0,0.13);
}
.grid li.page-list-item a .title {
font-weight: bold;
color: #174432;
}
.navbar-default {
background: linear-gradient(90deg, #31b39b, #74ce85);
}
body {
background-color: #e8e8e8;
}
.page {
background-color: #fefefe;
box-shadow: 0 4px 0 rgba(0,0,0,0.16);
border-radius: 6px;
border: 1px solid #d6d6d6;
}
element.style {
border-width: 0px 0px 0px 8px;
}
.line .meta {
border-color: #DDD;
}
.line .meta.unread {
border-color: #5cbd80;
}
.grid li.page-list-item:hover
{
box-shadow: 0 0 0 3px #a6dc37;
border-radius: 5px;
transition: box-shadow .1s;
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.grid li.page-list-item:active {
box-shadow: 0 0 0 0px #a6dc37;
transition: box-shadow .3s;
transition-delay: .3s;
}
.grid li.page-list-item a .hover {
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
background-color: rgba(116, 206, 133, 0.31);
transition: background-color .5s;
}
.grid li.page-list-item a:active .hover{
background-color: rgba(242, 126, 72,0);}
hos.icon{ここまで