pon
#info #member
https://www.gravatar.com/avatar/9741f270c2398f59d4c83bfedac653ba46126b8fd6976357719ca4aaa21f898f?size=512#.png
pon / Takahiro Ono
Technical Artist, CG animator, Visual artist
Links
/icons/twitter.icon Twitter
/icons/vimeo.icon Vimeo
/icons/youtube.icon YouTube
/icons/github.icon GitHub
/icons/wordpress.icon Gravatar
User scripts
Emoji Selector
/yutaro/emoji_selector
code:script.js
import '/api/code/yutaro/emoji_selector/script.js'
重要なところ(太字要素を全て抜き出し)
/scrasobox/しおり記法
code:script.js
const __bkmClass = 'strong' /* ここで記法のセレクタを設定してね。デフォルトはドットです */
const __bkmMenuTitle = 'Highlights'
scrapbox.PageMenu.addMenu({ title: __bkmMenuTitle, image: '/assets/img/logo_cut.svg',
onClick: function() {
const __fixedHeaderHeight = ($('.navbar').css('position') == 'fixed' ? $('.navbar').height() : 0) +
($('.navbar-pagemenu').height() || 0)
scrapbox.PageMenu(__bkmMenuTitle).removeAllItems()
$(__bkmClass).closest('.line').each(function(i, e){
scrapbox.PageMenu(__bkmMenuTitle).addItem({
title: $(e).find(__bkmClass).text(),
onClick: function() {
$('html,body').animate({
scrollTop: $(e).offset().top - $('body').offset().top - __fixedHeaderHeight
}, 150)
}
})
})
}
})
文字装飾ショートカット
code:script.js
let buttons = [
{ title: 'Stronger', onClick: text => { return '' + text + ''; } },
{ title: 'Mark', onClick: text => { return ' ' + text + ''; } },
{ title: 'Inline Code', onClick: text => { return '' + text + ''; } },
{ title: 'InlineQuote', onClick: text => { return '' + text + ''; } },
{ title: 'Tex', onClick: text => { return '$ ' + text + ''; } },
{ title: 'Subscript', onClick: text => { return '' + text + ''; } },
{ title: 'Red Text', onClick: text => { return '' + text + ''; } },
{ title: 'Orange Badge', onClick: text => { return '' + text + ''; } },
{ title: 'Blue Badge', onClick: text => { return '' + text + ''; } },
{ title: '付箋', onClick: text => { return '' + text + ''; } },
];
buttons.forEach(element => { scrapbox.PopupMenu.addButton(element); });
code:style.css.d
/*UserScriptで追加したボタン用*/
.button-container :nth-of-type(8) {
font-style: italic !important;
font-family: KaTeX_Math, KaTeX_Main, "Times New Roman", serif !important;
letter-spacing: 1px;
}
.button-container :nth-of-type(9) {
color: green !important;
}
.button-container :nth-of-type(10) {
color: red !important;
}
code:style.css
/* ポップアップメニューの修飾ボタンをアイコン化 */
.popup-menu .button-container .button {
&.link-button,
&.strong-button,
&.italic-button,
&.strike-button,
&.copy-plain-button
{
&::before {
font: 900 100%/normal 'Font Awesome 5 Free';
display: inline-block; min-width: 16px;
text-align: center;
}
}
}
.popup-menu .button-container .button {
&.link-button::before { content: '\f0c1' }
&.strong-button::before { content: '\f032' }
&.button.italic-button::before { content: '\f033' }
&.button.strike-button::before { content: '\f0cc' }
&.copy-plain-button::before { content: '\f0c5' }
}
Code Sandbox
code:style.css.d
/* @import "/api/code/helpfeel-template/settings/style.css"; */
@import "/api/code/helpfeel-template/gyazo-image-alert/index.css";
.project-home .title {
&:before, &:after {
content: '';
}
}
code:script.js.disable
import 'https://helpfeel-tweaks.helpfeel.com/js/index.js'
https://fontawesome.com/icons/wand-magic-sparkles?f=duotone&s=solid&sz=2xl&pc=%235f83b4&sc=%23ffba42&po=0.75&so=1
code:style.css.d
.app:not(.presentation) .line.section-title:not(.line-title) {
position: relative;
}
.app:not(.presentation) .line.section-title:not(.line-title) .text {
padding-top: 1em;
}
.app:not(.presentation) .line.section-title:not(.line-title):before {
content: "";
display: block;
width: relative;
position: relative;
/* border-top: 1px lightgray solid; */
/* border-right: 10px var(--theme) solid; */
}
Media
https://www.gravatar.com/avatar/9741f270c2398f59d4c83bfedac653ba46126b8fd6976357719ca4aaa21f898f?size=512#.png
https://i.gyazo.com/thumb/1000/69c8ac0d2b6aebe24399488c8ba19f75-png.png