Skip to content

Instantly share code, notes, and snippets.

@sheldonth
Created December 22, 2015 00:05
Show Gist options
  • Save sheldonth/5ba1fcd52d25a8ba4a80 to your computer and use it in GitHub Desktop.
Save sheldonth/5ba1fcd52d25a8ba4a80 to your computer and use it in GitHub Desktop.
pjson = require '../../package.json'
blessed = require 'blessed'
moment = require 'moment'
contrib = require 'blessed-contrib'
{Logger} = require '../logger'
logger = new Logger()
path = require 'path'
font_path = path.join process.cwd(), 'fonts/gohufont-11.json'
bold_font_path = path.join process.cwd(), 'fonts/gohufont-11b.json'
logger.info 'Using font: ' + font_path
# @searchBar = new blessed.bigtext
# top: '0%'
# left: '0%'
# width: '90%'
# height: '200%'
# padding: 0
# content: 'ABC'
# valign: 'top'
# style:
# fg: 'red'
# bg: 'blue'
# font: font_path
# @append @searchBar
class header extends blessed.box
constructor: () ->
params =
top: '0%'
left: '0%'
width: '100%'
height: '12%'
label: 'Quazito v.' + pjson.version
border:
type: 'line'
color: '#000000'
style:
fg: 'white'
bg: 'white'
border:
fg: '#000000'
super params
@searchForm = new blessed.form
parent:@
keys:true
top:0
left:0
width:20
height:2
bg:'black'
# console.log @searchForm
@searchBox = new blessed.input
@searchForm.append @searchBox
@append @searchForm
# @append @sampleLine
draw: () =>
module.exports = {header}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment