From d9af374eb735e6c5b84e2b18dd198c45ed8f2dfc Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Thu, 16 Nov 2023 16:15:24 -0600 Subject: [PATCH] external compiler script is not necessary --- public/compiler.sh | 28 ---------------- public/index.php | 79 ++++++++++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 59 deletions(-) delete mode 100644 public/compiler.sh diff --git a/public/compiler.sh b/public/compiler.sh deleted file mode 100644 index 88db49a..0000000 --- a/public/compiler.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -UID="$1" -FILE="tmp/$UID/document.ms" -OUT="tmp/$UID.pdf" - -# Configuration - -SOELIM="/usr/bin/soelim" # soelim PATH -REFER="/usr/bin/refer" # refer PATH -GROFF="/usr/bin/groff" # groff PATH -PRE="-ketpG" # Preprocessors - -BIB="bibliography" # Bibliography file -MAC="macros" # Macros dir - -sed " -s/Á/\\\['A\]/g; -s/É/\\\['E\]/g; -s/Í/\\\['I\]/g; -s/Ó/\\\['O\]/g; -s/Ú/\\\['U\]/g; -s/á/\\\['a\]/g; -s/é/\\\['e\]/g; -s/í/\\\['i\]/g; -s/ó/\\\['o\]/g; -s/ú/\\\['u\]/g; -" "$FILE" | - "$SOELIM" -I "$MAC" | "$REFER" -p "$BIB" | "$GROFF" -mspdf -T pdf -U "$PRE" > "$OUT" diff --git a/public/index.php b/public/index.php index d97aca6..be56b9d 100644 --- a/public/index.php +++ b/public/index.php @@ -17,6 +17,17 @@ --> + tmp/$uid.pdf"; + # In case you want to use an external + # script to compile with groff: + #$comp = "sh groff-compiler.sh"; +?> + Groff Web @@ -24,73 +35,79 @@ * { background-color: #121212; font-family: monospace; - margin: 0 0 10px; + text-align: center; + margin: 4px auto; color: #928374; } - h1 { - margin: 10px 0 0; + h1,h2,h3,h4,h5 { color: #fe8019; } - textarea { - background-color: #282828; - color: #83a598; + textarea,object,.columns { + border-radius: 10px; + border-width: 1px; + max-width: 1300px; + width: 100%; + columns: 2; } - body { - text-align: center; - margin: 0 auto; - width: 100%; + @media only screen and (max-width: 800px) { + .columns { + columns: 1; + width: 90%; + } + } + + /* codebox */ + textarea { + background-color: #282828; + text-align: left; + color: #83a598; + height: 734px; + } + + /* pdf */ + object { + height: 800px; } .button { - padding: 5px 10px 5px; + border-radius: 10px; + border-width: 1px; + padding: 5px 30px; margin: 10px; } - - .columns { - max-width: 1300px; - margin: 0 auto; - columns: 2; - width: 95%; - } - - textarea#codebox { - height: 730px; - width: 100%; - }

Groff Web

-

- +

-
+
+
- +

PDF cannot be displayed.