aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author= <pux@pux.dom>2020-02-01 10:58:00 +0100
committer= <pux@pux.dom>2020-02-01 10:58:00 +0100
commit243a58f5f8403bafd9321cfe9630b6906c590f87 (patch)
treec241dcf548bb2399626f236db297164bdc619f99
downloadmo-cgit-mods-243a58f5f8403bafd9321cfe9630b6906c590f87.tar.gz
mo-cgit-mods-243a58f5f8403bafd9321cfe9630b6906c590f87.tar.bz2
mo-cgit-mods-243a58f5f8403bafd9321cfe9630b6906c590f87.zip
imported my diffs, add README
-rw-r--r--README.md19
-rw-r--r--md2html.diff10
-rw-r--r--ui-shared.c.diff27
3 files changed, 56 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..58216cf
--- /dev/null
+++ b/README.md
@@ -0,0 +1,19 @@
+# cgit mods
+
+Reference cgit is 5e49023b01e5dfaacfc89199159e53c0c6e41331 from Jan 13, 2020
+
+## ui-shared.c.diff - Date
+
+Instead of simply age (13 hours, 2 weeks, etc) i want to always display the date of the commit. Started with ISO8601 and stripped it down to YYYY-MM-DD HH:MM.
+
+## md2html.diff - Markdown Checkboxes
+
+```filters/html-converters/md2html``` is also using ```markdown.extensions.checklist```.
+
+You can get it here:
+
+[https://github.com/FND/markdown-checklist](https://github.com/FND/markdown-checklist)
+
+It's enough to copy ```markdown_checklist/extension.py``` to ```/usr/lib/python3.x/site-packages/markdown/extensions/checklist.py```, or you may do it in a better way.
+
+
diff --git a/md2html.diff b/md2html.diff
new file mode 100644
index 0000000..1115928
--- /dev/null
+++ b/md2html.diff
@@ -0,0 +1,10 @@
+--- md2html.dist 2020-01-19 12:23:17.906661191 +0100
++++ md2html 2020-01-19 12:52:50.033327856 +0100
+@@ -298,6 +298,7 @@
+ markdown.markdownFromFile(
+ output_format="html5",
+ extensions=[
++ "markdown.extensions.checklist",
+ "markdown.extensions.fenced_code",
+ "markdown.extensions.codehilite",
+ "markdown.extensions.tables",
diff --git a/ui-shared.c.diff b/ui-shared.c.diff
new file mode 100644
index 0000000..64f4b30
--- /dev/null
+++ b/ui-shared.c.diff
@@ -0,0 +1,27 @@
+--- ui-shared.c.orig 2020-01-29 06:52:02.419984224 +0100
++++ ui-shared.c 2020-02-01 10:28:14.133315592 +0100
+@@ -688,13 +688,21 @@
+ if (secs < 0)
+ secs = 0;
+
+- if (secs > max_relative && max_relative >= 0) {
++ // Always full date for me
++ if (secs > max_relative && max_relative >= 0 || 1) {
+ html("<span title='");
+ html_attr(show_date(t, tz, cgit_date_mode(DATE_ISO8601)));
+ html("'>");
+- html_txt(show_date(t, tz, cgit_date_mode(DATE_SHORT)));
++ // html_txt(show_date(t, tz, cgit_date_mode(DATE_ISO8601_STRICT)));
++ char * datetext = show_date(t, tz, cgit_date_mode(DATE_ISO8601_STRICT));
++ int datetext_len = strlen(datetext);
++ //datetext[datetext_len - 6] = 0;
++ datetext[datetext_len - 9] = 0;
++ datetext[10] = ' ';
++ html_txt(datetext);
+ html("</span>");
+- return;
++ html("&nbsp;&nbsp;");
++ //return;
+ }
+
+ if (secs < TM_HOUR * 2) {
in each repos: see "about"-tab (if existing) for more details / README.
mailto contact at omeckman dot net
all timestamps in UTC (German winter time: UTC+01:00, summer time: UTC+02:00)
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa