aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/locale/HELP1.en.txt1
-rw-r--r--src/locale/USAGE.en.txt2
-rw-r--r--src/style.css76
-rwxr-xr-xsrc/td.in13
4 files changed, 89 insertions, 3 deletions
diff --git a/src/locale/HELP1.en.txt b/src/locale/HELP1.en.txt
index 6de6a0b..62173dd 100644
--- a/src/locale/HELP1.en.txt
+++ b/src/locale/HELP1.en.txt
@@ -9,6 +9,7 @@ Options:
-l list the supported values for $TD_USE_BUILTIN_HOOKS
-L lint the issues file
-H pre-process issues file before generating HTML
+ -S dump suggested CSS
-h, --help show this help message
-V, --version print the version number
diff --git a/src/locale/USAGE.en.txt b/src/locale/USAGE.en.txt
index f2e9a03..377741a 100644
--- a/src/locale/USAGE.en.txt
+++ b/src/locale/USAGE.en.txt
@@ -1,4 +1,4 @@
Usage:
td [-c] [-m MESSAGE] [-t TYPE] [-s STATE] [-F RC_FILE]
- td [-HlL]
+ td [-HSlL]
td [-hV]
diff --git a/src/style.css b/src/style.css
new file mode 100644
index 0000000..031aec8
--- /dev/null
+++ b/src/style.css
@@ -0,0 +1,76 @@
+body {
+ max-width: 800px;
+ margin: 0 auto 0 auto;
+}
+
+hr {
+ background-color: #ccc;
+}
+
+.header-anchor {
+ opacity: 0.5;
+ display: inline-block;
+}
+
+.tag {
+ font-family: monospace;
+ font-size: 70%;
+ background-color: lightgray;
+ color: black;
+ padding: 3px;
+ border-radius: 5px;
+}
+
+.TODO {
+ color: brown;
+}
+
+.DOING {
+ color: yellowgreen;
+}
+
+.WAITING, .MEETING {
+ color: orange;
+}
+
+.INACTIVE {
+ color: gray;
+}
+
+.NEXT {
+ color: red;
+}
+
+.CANCELLED, .DONE, .WONTFIX {
+ color: green;
+}
+
+pre, code {
+ background-color: #ddd;
+ border-radius: 5px;
+ padding: 5px;
+}
+
+pre > code {
+ overflow: auto;
+ white-space: pre;
+}
+
+@media(prefers-color-scheme: dark) {
+ :root {
+ color: white;
+ background-color: black;
+ }
+
+ a {
+ color: hsl(211, 100%, 60%);
+ }
+
+ a:visited {
+ color: hsl(242, 100%, 80%);
+ }
+
+ pre, code {
+ background-color: #222;
+ }
+}
diff --git a/src/td.in b/src/td.in
index c6a7e9f..c1ce0ff 100755
--- a/src/td.in
+++ b/src/td.in
@@ -10,7 +10,7 @@ add_msg() {
MSG_USAGE="$(cat <<-'EOF'
Usage:
@NAME@ [-c] [-m MESSAGE] [-t TYPE] [-s STATE] [-F RC_FILE]
- @NAME@ [-HlL]
+ @NAME@ [-HSlL]
@NAME@ [-hV]
EOF
)"
@@ -28,6 +28,7 @@ MSG_HELP1="$(cat <<-'EOF'
-l list the supported values for $TD_USE_BUILTIN_HOOKS
-L lint the issues file
-H pre-process issues file before generating HTML
+ -S dump suggested CSS
-h, --help show this help message
-V, --version print the version number
@@ -360,6 +361,10 @@ html_pre_process() {
html_process_ids
}
+dump_suggested_css() {
+ cat '@DATADIR@/style.css'
+}
+
#
@@ -482,7 +487,7 @@ for flag in "$@"; do
esac
done
-OPTIONS='cm:t:s:F:lLHhV'
+OPTIONS='cm:t:s:F:lLHShV'
RC_FILE="$PWD/.tdrc"
while getopts ":$OPTIONS" flag; do
@@ -548,6 +553,10 @@ while getopts "$OPTIONS" flag; do
html_pre_process < "$TD_FILE"
exit
;;
+ S)
+ dump_suggested_css
+ exit
+ ;;
h)
usage
help