mirror of
https://github.com/charmbracelet/glow
synced 2024-12-14 06:02:27 +00:00
Add light style and style gallery
This commit is contained in:
parent
810cdf1a2b
commit
915cd7ae9d
7 changed files with 61 additions and 2 deletions
|
@ -38,6 +38,8 @@ You can supply a JSON stylesheet with the `-s` flag:
|
|||
|
||||
![Gold Dark Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/gold_dark.png)
|
||||
|
||||
Check out the [Gold Style Gallery](https://github.com/charmbracelet/gold/blob/master/cmd/gold/styles/README.md)!
|
||||
|
||||
## Colors
|
||||
|
||||
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
for style in ./styles/*.json; do
|
||||
echo "Generating screenshot for ${style}"
|
||||
filename="gold_`basename -s .json ${style}`.png"
|
||||
termshot -o ./styles/ -f "$filename" ./gold -s ${style}
|
||||
|
||||
light=""
|
||||
if [[ $style == *"light"* ]]; then
|
||||
light="-l"
|
||||
fi
|
||||
|
||||
./termshot ${light} -o ./styles/ -f "$filename" ./gold -s ${style}
|
||||
pngcrush -ow "./styles/$filename"
|
||||
done
|
||||
|
|
|
@ -7,6 +7,6 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
data := "PK\x03\x04\x14\x00\x08\x00\x08\x00\xa3\x0b|O\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x00dark.jsonUT\x05\x00\x01\xe3\"\xdf]|\x90[JC1\x10\x86\xdf\xb3\x8aa\x9e\x14\x8eP\xdb\x17\xc9\x0e\\\x83HI\x93i\xcf\xd0\\JN\x0e\x14\xa5\xe0Z\\\x9a+\x91h\xea\xd8\xdby\x0b\xc3\xf7_\xf2\xbf+\x00\xf4\x1c\xb7\xa8\xa1\xbe\x01\xd0&\x9f2j\xc0\xc7\xf9\x02\xbb\xdf\xdb\x18\x1de\xcf\x91PC\xc9#\xb5\xf3.\xd3\x9a\xf7\x95\xbd;\x92\xc3\xb8n\xa7{T\x00\x87\xee\x18\xb0,\xb4/\xd3)\xab\xe4]\x0b\xf8\x93r0\x1b\x9a\x96I\x8b\x97\xe7Jk\xb8,\xf3\x8a\xa7\x8e\xb7\xda< \xd7\x93q\x1c7\x02\xfd\xab\xd7\x9d\xc9\x16\"\xb3\xc9]\xeb;\x9f\xcdN\x99\xe5\xca'{m\xf6J6\xff\xd2S\xa8f8$o2\xbf\x91{p&o\xc5\x88\xc2\xae\x17\x0b.\xc6\xb3=_p(9\xdd\xf8\x86lR(\x08!\x83~}|\xc2O\x9a:\xa8\xef\x00\x00\x00\xff\xffPK\x07\x08[\xf7\xa4\xb8\xd8\x00\x00\x00+\x02\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\xa3\x0b|O[\xf7\xa4\xb8\xd8\x00\x00\x00+\x02\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x00dark.jsonUT\x05\x00\x01\xe3\"\xdf]PK\x05\x06\x00\x00\x00\x00\x01\x00\x01\x00@\x00\x00\x00\x18\x01\x00\x00\x00\x00"
|
||||
data := "PK\x03\x04\x14\x00\x08\x00\x08\x00\xfa\x0b|O\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00 \x00dark.jsonUT\x05\x00\x01\x89#\xdf]|\x90[JC1\x10\x86\xdf\xb3\x8aa\x9e\x14\x8eP\xdb\x17\xc9\x0e\\\x83HI\x93i\xcf\xd0\\JN\x0e\x14\xa5\xe0Z\\\x9a+\x91h\xea\xd8\xdby\x0b\xc3\xf7_\xf2\xbf+\x00\xf4\x1c\xb7\xa8\xa1\xbe\x01\xd0&\x9f2j\xc0\xc7\xf9\x02\xbb\xdf\xdb\x18\x1de\xcf\x91PC\xc9#\xb5\xf3.\xd3\x9a\xf7\x95\xbd;\x92\xc3\xb8n\xa7{T\x00\x87\xee\x18\xb0,\xb4/\xd3)\xab\xe4]\x0b\xf8\x93r0\x1b\x9a\x96I\x8b\x97\xe7Jk\xb8,\xf3\x8a\xa7\x8e\xb7\xda< \xd7\x93q\x1c7\x02\xfd\xab\xd7\x9d\xc9\x16\"\xb3\xc9]\xeb;\x9f\xcdN\x99\xe5\xca'{m\xf6J6\xff\xd2S\xa8f8$o2\xbf\x91{p&o\xc5\x88\xc2\xae\x17\x0b.\xc6\xb3=_p(9\xdd\xf8\x86lR(\x08!\x83~}|\xc2O\x9a:\xa8\xef\x00\x00\x00\xff\xffPK\x07\x08[\xf7\xa4\xb8\xd8\x00\x00\x00+\x02\x00\x00PK\x03\x04\x14\x00\x08\x00\x08\x00\xee;|O\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00 \x00light.jsonUT\x05\x00\x01\xd0w\xdf]\x84\x91MN\xc40\x0c\x85\xf7s\n\xcb+\x90\xca\x82\xbfMo\xc0\x19\x10\x1au\x1aOc\xe1$\xa3\xd4\x95F $\xce\xc2\xd18 \n\x14\x920-,\xba\xa8\xf3\xfc\xbeg\xfby\x03\x00\x80\xc2\xfe\x11[\xf8\xfa\x03\xc0>H\x88\xd8\x02^\xdd\xdcb\xf3]\x9d\xbc\xa1(\xec [\xd08\xd1\xcf\xc3!\xd2\x9e\x8fI\x7f\x96\xd5\xe3\xb4\x9f\x8b\xe7\xf8Y{i2l\xabt\xd4e\xe2uA\xdc\x0513\xac\xb2`\xd7\x0d\xf4\x7f\xe0\x9c\xeb\xfe.u\xb4\xb0\x14\xef\x01O\xbd\xff\xceW\xe9-u\x86\xfdP\x8a\x8b\xd8\xcd\x89\xc1e\xdd\xde\x07\xb32\xc9oPRnw\x12\xfa\x95S\x95\x8bSK.\xd9\xe2\x18\xa4\x8b\xfcD\xe6Bx\xb0Z;\x92;\xd8\xd2\x8b\xb5\x13\xee\x97\x16>j\x0c\xab3\xd6\xebSr\xa5.\xdf\xe0\xfd\xf5\x0df\xfe&}\x1f\x01\x00\x00\xff\xffPK\x07\x08\xac\xc6\xad\xf0\xdf\x00\x00\x00|\x02\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\xfa\x0b|O[\xf7\xa4\xb8\xd8\x00\x00\x00+\x02\x00\x00 \x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x00dark.jsonUT\x05\x00\x01\x89#\xdf]PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\xee;|O\xac\xc6\xad\xf0\xdf\x00\x00\x00|\x02\x00\x00\n\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x18\x01\x00\x00light.jsonUT\x05\x00\x01\xd0w\xdf]PK\x05\x06\x00\x00\x00\x00\x02\x00\x02\x00\x81\x00\x00\x008\x02\x00\x00\x00\x00"
|
||||
fs.Register(data)
|
||||
}
|
||||
|
|
11
styles/README.md
Normal file
11
styles/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Gold Styles
|
||||
|
||||
## Gallery
|
||||
|
||||
#### Dark
|
||||
|
||||
![Gold Dark Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/gold_dark.png)
|
||||
|
||||
#### Light
|
||||
|
||||
![Gold Light Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/gold_light.png)
|
Binary file not shown.
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
BIN
styles/gold_light.png
Normal file
BIN
styles/gold_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
40
styles/light.json
Normal file
40
styles/light.json
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"link": {
|
||||
"color": "245",
|
||||
"underline": true,
|
||||
"prefix": "(",
|
||||
"suffix": ")"
|
||||
},
|
||||
"link_text": {
|
||||
"color": "235",
|
||||
"bold": true
|
||||
},
|
||||
"image": {
|
||||
"color": "245",
|
||||
"prefix": "[Image: ",
|
||||
"suffix": "]"
|
||||
},
|
||||
"image_text": {
|
||||
"color": "235"
|
||||
},
|
||||
"heading": {
|
||||
"bold": true,
|
||||
"color": "1"
|
||||
},
|
||||
"code": {
|
||||
"color": "235"
|
||||
},
|
||||
"code_block": {
|
||||
"color": "235",
|
||||
"theme": "solarized-light"
|
||||
},
|
||||
"emph": {
|
||||
"italic": true
|
||||
},
|
||||
"strong": {
|
||||
"bold": true
|
||||
},
|
||||
"item": {
|
||||
"prefix": "• "
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue