hacker-news: Use white text in terminal. Use black foreground text on logo.

db4
Doug Coleman 2012-09-24 14:05:33 -07:00
parent 0bac24565e
commit 556c54e4f9
1 changed files with 9 additions and 4 deletions

View File

@ -1,9 +1,9 @@
! Copyright (C) 2012 Doug Coleman. ! Copyright (C) 2012 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs classes.tuple colors.constants USING: accessors assocs classes.tuple colors.constants
colors.hex combinators formatting fry http.client io io.styles colors.hex combinators formatting fry hashtables http.client io
json.reader kernel make math sequences splitting urls json io.streams.256color.private io.styles json json.reader kernel
math.parser hashtables ; make math math.parser namespaces sequences splitting urls ;
IN: hacker-news IN: hacker-news
TUPLE: post title postedBy points id url commentCount postedAgo ; TUPLE: post title postedBy points id url commentCount postedAgo ;
@ -31,7 +31,11 @@ TUPLE: post title postedBy points id url commentCount postedAgo ;
: write-title ( title url -- ) : write-title ( title url -- )
'[ '[
_ presented ,, _ presented ,,
COLOR: black foreground ,, output-stream get 256color? [
COLOR: white foreground ,,
] [
COLOR: black foreground ,,
] if
] H{ } make format ; ] H{ } make format ;
: write-link ( title url -- ) : write-link ( title url -- )
@ -80,6 +84,7 @@ PRIVATE>
{ font-size 20 } { font-size 20 }
{ font-style bold } { font-style bold }
{ background HEXCOLOR: ff6600 } { background HEXCOLOR: ff6600 }
{ foreground COLOR: black }
} assoc-union format nl ; } assoc-union format nl ;
: hacker-news. ( -- ) : hacker-news. ( -- )