settings
code:style.css
/* 本文文字サイズ */
.line {
font-size:18px;
}
/* タイトル行文字サイズ */
.line-title {
font-size:36px !important;
}
/* テーブルのセルをわかりやすくする */
.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 }
.table-block table tr td:first-child { padding: 0; background-color: transparent; border-width: 0 }
.editor, .stream, li.page-list-item {font-family: unset !important;}
/* 行間調整 */
.line .section-0{
line-height: 1.2em !important;
}
/* 背景などの色を変える */
.navbar-default {
background-color: #333333;
}
.line .meta.unread {
border-color: #ff6faf;
}
.navbar {
background-color: #333399;
}
.row-flex {
background-color: #fff;
}
/* 強調記法である [[文字]]もしくは[*** 文字]だけを着色する場合 */
.line strong {
color: #333399;
}
/* カーソルを点滅させる */
.cursor {
animation: blink 1s infinite;
}
@keyframes blink {
0% { opacity: 0; }
50% { opacity: 0; }
51% { opacity: 1; }
100% { opacity: 1;}
}
/* カーソルを点滅させる */
.cursor {
animation: blink 1s infinite;
}
@keyframes blink {
0% { opacity: 0; }
50% { opacity: 0; }
51% { opacity: 1; }
100% { opacity: 1;}
}
/* 家マークを消す */
.icon-home { display: none !important; }
.project-home { font-size: 2em !important;
color: #333333 !important; }
文字数カウンター
code:page.js
scrapbox.PageMenu.addItem({
title: () => {
if (!scrapbox.Page.lines) return
const chars = scrapbox.Page.lines.map(line => line.text.length).reduce((a,b) => a + b)
const words = scrapbox.Page.lines.map(line => line.text.split(/\s+/).length).reduce((a,b) => a + b)
return ${chars}文字 ${words}単語 ${scrapbox.Page.lines.length}行
},
onClick: () => null
})
code:style.css
/* はりつくメニューバー */
@media screen and (min-height: 600px) and (min-width: 768px) {
body:not(.presentation) { padding-top: 90px; padding-right: 0 !important }
body: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 } }
code:style.css
/* #で始まるタグをラベル風にする */
atype="hashTag"{
display: inline-block;
padding: 2px 8px;
margin: 0 8px 10px 0;
background: #fff;
color: #c13207;
font-size: 0.8em;
border: 1px solid #c13207;
border-radius: 3px;
transition: .3s;
-webkit-transform: scale(1);
transform: scale(1);
}
atype="hashTag":hover{
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
tableの見た目をカスタマイズ:/customize/テーブルの見た目をカスタマイズを拝借して編集
code:style.css
/* セル間に線を入れる */
.table-block .cell {
/* 全てのセルの右と下 */
border-right: solid 1px #ffffff;
border-bottom: solid 1px #dddddd;
}
.table-block .cell:first-child {
/* 1列目のセルの左 */
border-left: solid 1px #ffffff;
}
.section-title + .line .table-block .cell {
/* 1行目のセルの上 */
border-top: solid 1px #ffffff;
}
/* 1行目を太字、中央揃え */
.section-title + .line .table-block .cell {
font-weight: bolder;
text-align: center;
}
選択範囲 tweet popup
code:script.js
scrapbox.PopupMenu.addButton({
title: 'Tweet',
onClick: text => {
const lines = text
.split(/\r\n/)
.map(line => line.replace(/[\\]/g, '').replace(/^\s+/, ''))
lines.push(location.href)
const url = https://twitter.com/intent/tweet?&text=${encodeURIComponent(lines.join('\n'))}
const width = 550
const height = 420
const option = width=${width},height=${height},left=${(window.innerWidth - width) / 2},top=${(window.innerHeight - height) / 2},scrollbars=yes,resizable=yes,toolbar=no,location=yes
window.open(url, '_blank', option)
}
})
https://gyazo.com/f4e4fc536d4cdd348b331012b0bc40b5