diff --git a/README.md b/README.md index b6286b4..c30a83f 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/gallery.sh b/gallery.sh index a57d3cb..0fe0a8d 100755 --- a/gallery.sh +++ b/gallery.sh @@ -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 diff --git a/statik/statik.go b/statik/statik.go index f4a877d..b3cfbb0 100644 --- a/statik/statik.go +++ b/statik/statik.go @@ -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) } diff --git a/styles/README.md b/styles/README.md new file mode 100644 index 0000000..835adb6 --- /dev/null +++ b/styles/README.md @@ -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) diff --git a/styles/gold_dark.png b/styles/gold_dark.png index 237fd25..86cd4e2 100644 Binary files a/styles/gold_dark.png and b/styles/gold_dark.png differ diff --git a/styles/gold_light.png b/styles/gold_light.png new file mode 100644 index 0000000..ec83a7d Binary files /dev/null and b/styles/gold_light.png differ diff --git a/styles/light.json b/styles/light.json new file mode 100644 index 0000000..6b9d53d --- /dev/null +++ b/styles/light.json @@ -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": "• " + } + }