mirror of
https://github.com/apankrat/nullboard.git
synced 2025-08-12 08:04:07 +02:00
first revision of font-size/line-height customization
This commit is contained in:
112
nullboard.html
112
nullboard.html
@@ -215,7 +215,8 @@
|
|||||||
background: #f8f9fb;
|
background: #f8f9fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dragging {
|
body.dragging,
|
||||||
|
.no-user-select {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
@@ -784,9 +785,6 @@
|
|||||||
|
|
||||||
.config .bulk .boards a.load-board {
|
.config .bulk .boards a.load-board {
|
||||||
display: block;
|
display: block;
|
||||||
margin-right: 10px;
|
|
||||||
padding: 0 5px;
|
|
||||||
margin-left: -5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.config .bulk .boards a.load-board.active {
|
.config .bulk .boards a.load-board.active {
|
||||||
@@ -847,8 +845,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.config .bulk .break {
|
.config .bulk .break {
|
||||||
padding-top: 6px;
|
padding: 6px 2px 0;
|
||||||
margin-top: 6px;
|
margin: 6px -2px 0;
|
||||||
border-top: 1px solid #00000028;
|
border-top: 1px solid #00000028;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -871,6 +869,45 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 250ms;
|
transition: opacity 250ms;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
padding-right: 8px;
|
||||||
|
margin-right: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs td.name {
|
||||||
|
width: 100%;
|
||||||
|
white-space: pre;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs td.val {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 2px;
|
||||||
|
transition: padding 250ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs a.less:hover {
|
||||||
|
padding: 0 4px 0 0;
|
||||||
|
transition: padding 250ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config .bulk .ui-prefs .ui-prefs-bulk div .f-prefs a.more:hover {
|
||||||
|
padding: 0 0 0 4px;
|
||||||
|
transition: padding 250ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
.config .bulk .ui-prefs:hover .ui-prefs-more {
|
.config .bulk .ui-prefs:hover .ui-prefs-more {
|
||||||
@@ -1266,6 +1303,13 @@
|
|||||||
<a href="#" class="switch-font" font="segoe-ui">Use Segoe UI</a>
|
<a href="#" class="switch-font" font="segoe-ui">Use Segoe UI</a>
|
||||||
<a href="#" class="switch-font" font="maven-pro">Use Maven Pro</a>
|
<a href="#" class="switch-font" font="maven-pro">Use Maven Pro</a>
|
||||||
|
|
||||||
|
<div class=break>
|
||||||
|
<table class='f-prefs no-user-select'>
|
||||||
|
<tr class='ui-fs'><td class=name>Font size:</td> <td><a href=# class=less><</a></td><td class=val>13</td><td><a href=# class=more>></a></td></tr>
|
||||||
|
<tr class='ui-lh'><td class=name>Line height:</td><td><a href=# class=less><</a></td><td class=val>1.2</td><td><a href=# class=more>></a></td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a href="#" class="switch-theme break">Use <i>light</i><b>dark</b> theme</a>
|
<a href="#" class="switch-theme break">Use <i>light</i><b>dark</b> theme</a>
|
||||||
<a href="#" class="switch-fsize ">Use <i>smaller</i><b>larger</b> font</a>
|
<a href="#" class="switch-fsize ">Use <i>smaller</i><b>larger</b> font</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -3468,6 +3512,55 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.config').on('click', '.f-prefs .ui-fs .less', function(){
|
||||||
|
var $html = $('html');
|
||||||
|
var fs = parseInt( 2*$html.css('--fs') );
|
||||||
|
if (--fs <= 2*6)
|
||||||
|
return;
|
||||||
|
fs /= 2.;
|
||||||
|
$html.css('--fs', fs +'');
|
||||||
|
$(this).closest('tr').find('.val').html( fs.toFixed(1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.config').on('click', '.f-prefs .ui-fs .more', function(){
|
||||||
|
var $html = $('html');
|
||||||
|
var fs = parseInt( 2*$html.css('--fs') );
|
||||||
|
var lh = parseInt( 2*$html.css('--lh') );
|
||||||
|
if (++fs >= 2*24)
|
||||||
|
return;
|
||||||
|
fs /= 2.;
|
||||||
|
if (fs > lh/2.)
|
||||||
|
{
|
||||||
|
$html.css('--lh', fs +'');
|
||||||
|
$('.config .f-prefs .ui-lh .val').html( fs.toFixed(1) );
|
||||||
|
}
|
||||||
|
$html.css('--fs', fs +'');
|
||||||
|
$(this).closest('tr').find('.val').html( fs.toFixed(1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.config').on('click', '.f-prefs .ui-lh .less', function(){
|
||||||
|
var $html = $('html');
|
||||||
|
var fs = parseInt( 2*$html.css('--fs') );
|
||||||
|
var lh = parseInt( 2*$html.css('--lh') );
|
||||||
|
if (--lh < fs)
|
||||||
|
return;
|
||||||
|
lh /= 2.;
|
||||||
|
$html.css('--lh', lh +'');
|
||||||
|
$(this).closest('tr').find('.val').html( lh.toFixed(1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.config').on('click', '.f-prefs .ui-lh .more', function(){
|
||||||
|
var $html = $('html');
|
||||||
|
var fs = parseInt( 2*$html.css('--fs') );
|
||||||
|
var lh = parseInt( 2*$html.css('--lh') );
|
||||||
|
if (++lh > 3*fs)
|
||||||
|
return;
|
||||||
|
lh /= 2.;
|
||||||
|
$html.css('--lh', lh +'');
|
||||||
|
$(this).closest('tr').find('.val').html(lh.toFixed(1) );
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
$('.overlay').click(function(ev){
|
$('.overlay').click(function(ev){
|
||||||
if (ev.originalEvent.target != this)
|
if (ev.originalEvent.target != this)
|
||||||
@@ -3558,6 +3651,13 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
var fs = parseInt(2 * $('html').css('--fs')) / 2.;
|
||||||
|
var lh = parseInt(2 * $('html').css('--lh')) / 2.;
|
||||||
|
|
||||||
|
$('.config .f-prefs .ui-fs .val').html( fs.toFixed(1) );
|
||||||
|
$('.config .f-prefs .ui-lh .val').html( lh.toFixed(1) );
|
||||||
|
|
||||||
//
|
//
|
||||||
if (conf.theme)
|
if (conf.theme)
|
||||||
$('html').addClass('theme-' + conf.theme);
|
$('html').addClass('theme-' + conf.theme);
|
||||||
|
Reference in New Issue
Block a user