diff --git a/preview b/preview new file mode 100755 index 0000000..eff50f0 --- /dev/null +++ b/preview @@ -0,0 +1,10 @@ +#!/bin/sh +input=$(cat -) +input="${input#v run src/}" +style="" +start="TypoML Preview$style" +end="" +output="$start$input$end" +echo "$output" > /tmp/preview.html +xdg-open /tmp/preview.html + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..2e8f280 --- /dev/null +++ b/styles.css @@ -0,0 +1,9 @@ +body { font-family: Georgia, 'Times New Roman', Times, serif; color: #333; background: #fdfdfd; margin: 2em auto; max-width: 750px; padding: 1em 2em; line-height: 1.8; font-size: 18px; } +h1, h2, h3 { color: #111; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; font-weight: normal; } +pre { background: #f4f4f4; border: 1px solid #ddd; padding: 1em; overflow: auto; } +code { font-family: 'Courier New', Courier, monospace; background: #f4f4f4; padding: 0.1em 0.3em; } +blockquote { border-left: 4px solid #ff1493; padding-left: 1em; margin-left: 0; color: #666; font-style: italic; } +a { color: #ff1493; } +table { border-collapse: collapse; width: 100%; margin-bottom: 1em; } +th, td { border: 1px solid #ddd; padding: 0.5em; text-align: left; } +th { background: #f4f4f4; }