preview
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
input=$(cat -)
|
||||
input="${input#v run src/}"
|
||||
style="<style>$(cat styles.css)</style>"
|
||||
start="<html><head><title>TypoML Preview</title>$style</head><body>"
|
||||
end="</body></html>"
|
||||
output="$start$input$end"
|
||||
echo "$output" > /tmp/preview.html
|
||||
xdg-open /tmp/preview.html
|
||||
|
||||
@@ -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; }
|
||||
Reference in New Issue
Block a user