This commit is contained in:
2026-07-11 17:11:02 +02:00
parent 61d950910d
commit 55d140a867
2 changed files with 19 additions and 0 deletions
Executable
+10
View File
@@ -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
+9
View File
@@ -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; }