box-drawing
cpsdqs 7 years ago
commit 9c047eec82
  1. 5
      js/term/themes.js

@ -1,3 +1,4 @@
const $ = require('../lib/chibi')
const themes = exports.themes = [ const themes = exports.themes = [
[ // 0 - Tango - terminator [ // 0 - Tango - terminator
@ -99,12 +100,12 @@ exports.SELECTION_FG = '#333'
exports.SELECTION_BG = '#b2d7fe' exports.SELECTION_BG = '#b2d7fe'
exports.themePreview = function (themeN) { exports.themePreview = function (themeN) {
document.querySelectorAll('[data-fg]').forEach((elem) => { $('[data-fg]').forEach((elem) => {
let shade = elem.dataset.fg let shade = elem.dataset.fg
if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN) if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN)
elem.style.color = shade elem.style.color = shade
}) })
document.querySelectorAll('[data-bg]').forEach((elem) => { $('[data-bg]').forEach((elem) => {
let shade = elem.dataset.bg let shade = elem.dataset.bg
if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN) if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN)
elem.style.backgroundColor = shade elem.style.backgroundColor = shade

Loading…
Cancel
Save