many minor fixes

This commit is contained in:
Yann Esposito (Yogsototh) 2019-08-15 23:20:09 +02:00
parent e100ec7075
commit 44760e03e7
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
5 changed files with 155 additions and 39 deletions

Binary file not shown.

View file

@ -465,29 +465,38 @@ blockquote:after, .main blockquote:after {
}
/* -------- */
/* org colors */
.underline {
text-decoration: underline;
}
.todo, .done, .main .todo, .main .done {
color: var(--todo-txt);
background-color: var(--reveal-background);
border: solid 1px;
height: 10px;
display: inline-block;
line-height: 12px;
font-weight: bold;
font-size: 10px;
}
.TODO, .main .TODO {
background-color: var(--red);
color: var(--red);
}
.IN_PROGRESS, .main .IN_PROGRESS {
background-color: var(--yellow);
color: var(--yellow);
}
.IN_REVIEW, .main .IN_REVIEW {
background-color: var(--cyan);
color: var(--cyan);
}
.HOLD, .main .HOLD {
background-color: var(--violet);
color: var(--violet);
}
.WAITING, .main .WAITING {
background-color: var(--violet);
color: var(--violet);
}
.DONE, .main .DONE {
background-color: var(--green);
color: var(--green);
}
.CANCELED, .main .CANCELED {
background-color: var(--magenta);
color: var(--magenta);
}
.notes, .main .notes {
background-color: var(--reveal-background);

View file

@ -26,6 +26,95 @@ paragraph.
But if I use a double space
There should be a forced newline.
* Lorem Ipsum
:PROPERTIES:
:CUSTOM_ID: lorem-ipsum
:END:
#+begin_src http :pretty
GET https://jaspervdj.be/lorem-markdownum/markdown.txt
#+end_src
** Deos illo sacrum perque victorem eurytus paterque
:PROPERTIES:
:CUSTOM_ID: deos-illo-sacrum-perque-victorem-eurytus-paterque
:END:
*** Haec tela discedentem femina
:PROPERTIES:
:CUSTOM_ID: haec-tela-discedentem-femina
:END:
Lorem markdownum invidiosa iactor! Fidem utque indeploratum pariter.
#+BEGIN_SRC javascript
var port = tooltipPimThreading;
if (pinterest_net_koffice) {
format -= installer;
buffer = 4;
office_device(2, ssh + model);
} else {
website_controller_linux.gigabyte = clone;
}
fileProtocol = driverOcr;
#+END_SRC
*** Duorum habuisse horrentia de noceat
:PROPERTIES:
:CUSTOM_ID: duorum-habuisse-horrentia-de-noceat
:END:
Patriam vocalibus peraget robore recursus diruta ut ergo signa factis,
nigrum, attonitas, in Solis. Mugit [[http://news.ycombinator.com][non
carpe sed]] ceperunt dextra ausum; sanguine durior. Soror Cinyras illos
remugis; super quia somno nunc retemptat oracula cumque. Id Helicen
primum, proles turis nemus claudit molior naturalique deciperetur qua
sulcat et, ad volui.
1. Tubas gener
2. Ad pacta
3. Vetantis ferrum pugnabant quoque
4. Diomede pallida boum membra
Saepe /mihi/? Tum comae iurasse statione morsus vigilans, ergo. Ipse dum
sunt Hymettia: fecit cum et coactis, potae carmine lynca fertur
descenderat.
*** Subitis de luce et poenas cum
:PROPERTIES:
:CUSTOM_ID: subitis-de-luce-et-poenas-cum
:END:
Cladem adit ergo es tecto sit visa dryades vota quos, prima ligno ficta.
Ibat supplex, /est/ costis oblita, elisi regis captum Phoebi tandem
conchaeque! Aera et Aello genetrix.
Et caelo adspexit, cornua et Iuppiter inmensae /abies/. Micabant Paeonas
meliora constitit, ut expers *artisque* adspicit fretum, vulnere
oppidaque, tenuit arma, haec velamine unda. Retinentia iudice, *quos
moras* comitata aliquid prospiciens cepit cum iustius sua cur truncis
ausus unde partibus marisque et grave. Fui opertis liquor laudatae di
erat, repellit conspectos manibus.
Auresque longius res Fando es /nil nec ora/ vixque et tot pendens maius
in et meliora! Flentibus verba nostro agmenque: dedit est regis virque
post Talia telumque, sol *et lanient* perierunt timido. Fitque variare
truncas Phoebus agros, salictis tam pumice facti! Post et neque et
vidit, Lycaeo incautus, latratus terrae thalamique ulta.
* Math
:PROPERTIES:
:CUSTOM_ID: math
:END:
\(x^y / \log(x)\)
\[ \prod_{i=0}^n \sum_{x_i\in E} \frac{1}{x_i} \]
* Level 1
:PROPERTIES:
:CUSTOM_ID: level-1
:END:
** Level 2
:PROPERTIES:
:CUSTOM_ID: level-2-85fc

View file

@ -16,16 +16,17 @@ So programming, functional programming in particular.
That website was created with the following constraints in mind by order of
priority:
1. /Respect Privacy/; no tracker of any sort (no ads, no google analytics, no
1. *Respect Privacy*; no tracker of any sort (no ads, no google analytics, no
referrer for all external links, etc...)
2. /javascript free/; no js at all, yes even the theme changer
3. /disability friendly/; should be easy to read on a text browser so people
2. *javascript free*; no js at all, yes even the theme changer
3. *disability friendly*; should be easy to read on a text browser so people
with disabilities could easily consume it
4. /nerdy/; should feel mostly like markdown text in a terminal and source code
4. *nerdy*; should feel mostly like markdown text in a terminal and source code
should be syntax higlighted.
5. /org-mode friendly/; I should write my post in [[https://orgmode.org][org mode]]
6. /user friendly/; support your preferred light/dark theme by default but you
5. *org-mode friendly*; I should write my post in [[https://orgmode.org][org mode]]
6. *user friendly*; support your preferred light/dark theme by default but you
can change it if you want.
7. /frugal/; try to minize the resources needed to visit my website; no
7. *rss*; you should be able to get informed when I add a new blog post.
8. *frugal*; try to minize the resources needed to visit my website; no
javascript, no webfont, not too much CSS magic, not much images or really
compressed one.

View file

@ -4,7 +4,12 @@
#+EMAIL: yann@esposito.host
#+DATE: [2019-07-27]
#+KEYWORDS: programming, blog, org-mode, meta
#+OPTIONS: auto-id:t
#+OPTIONS: auto-id:t toc:t
* Introduction
:PROPERTIES:
:CUSTOM_ID: introduction
:END:
#+begin_quote
/tl;dr/: [[#full-solution][Go to the full solution]] for the impatients.
@ -81,6 +86,17 @@ See [[file:project-el/index.org][my other post about it]].
:END:
#+begin_src elisp
(setq domainname "https://her.esy.fun")
(setq base-dir (concat (projectile-project-root) "src"))
(setq publish-dir (concat (projectile-project-root) "_site"))
(setq assets-dir (concat base-dir "/"))
(setq publish-assets-dir (concat publish-dir "/"))
(setq rss-dir base-dir)
(setq rss-title "Subscribe to articles")
(setq publish-rss-dir publish-dir)
(setq css-path "/css/minimalist.css")
(setq author-name "Yann Esposito")
(setq author-email "yann@esposito.host")
(require 'org)
(require 'ox-publish)
@ -89,16 +105,8 @@ See [[file:project-el/index.org][my other post about it]].
(require 'ox-rss)
(setq org-link-file-path-type 'relative)
(defun org-blog-prepare (project-plist)
"With help from `https://github.com/howardabrams/dot-files'.
Touch `index.org' to rebuilt it.
Argument `PROJECT-PLIST' contains information about the current project."
(let* ((base-directory (plist-get project-plist :base-directory))
(buffer (find-file-noselect (expand-file-name "index.org" base-directory) t)))
(with-current-buffer buffer
(set-buffer-modified-p t)
(save-buffer 0))))
(setq org-publish-timestamp-directory
(concat (projectile-project-root) "_cache/"))
(defvar org-blog-head
(concat
@ -136,6 +144,11 @@ Argument `PROJECT-PLIST' contains information about the current project."
(str-time-to-year-float blog-creation-date))))
(format "∆t=%.2f" y)))
(defun get-from-info (info k)
(let ((i (car (plist-get info k))))
(when (and i (stringp i))
i)))
(defun org-blog-preamble (info)
"Pre-amble for whole blog."
(concat
@ -144,17 +157,15 @@ Argument `PROJECT-PLIST' contains information about the current project."
"<h1>"
(format "%s" (car (plist-get info :title)))
"</h1>"
(when-let ((date (get-from-info info :date)))
(format "<span class=\"article-date\">%s</span>" date))
(when-let ((date (plist-get info :date)))
(format "<span class=\"article-date\">%s</span>"
(format-time-string "%Y-%m-%d"
(org-timestamp-to-time
(car date)))))
(when-let ((subtitle (car (plist-get info :subtitle))))
(format "<h2>%s</h2>" subtitle))
"</div>"))
(defun get-from-info (info k)
(let ((i (car (plist-get info k))))
(when (and i (stringp i))
i)))
(defun rand-obfs (c)
(let ((r (% (random) 20)))
(cond ;; ((eq 0 r) (format "%c" c))
@ -206,9 +217,11 @@ Argument `PROJECT-PLIST' contains information about the current project."
(defun org-blog-sitemap-format-entry (entry _style project)
"Return string for each ENTRY in PROJECT."
(when (s-starts-with-p "posts/" entry)
(format "@@html:<span class=\"archive-item\"><span class=\"archive-date\">@@ %s: @@html:</span>@@ [[file:%s][%s]] @@html:</span>@@"
(format-time-string "%Y-%m-%d"
(org-publish-find-date entry project))
(format (concat "@@html:<span class=\"archive-item\">"
"<span class=\"archive-date\">@@ %s: @@html:</span>@@"
" [[file:%s][%s]]"
" @@html:</span>@@")
(format-time-string "%Y-%m-%d" (org-publish-find-date entry project))
entry
(org-publish-find-title entry project))))
@ -233,11 +246,16 @@ Argument `PROJECT-PLIST' contains information about the current project."
(insert (mapconcat 'identity
'("<input type=\"radio\" id=\"light\" name=\"theme\"/>"
"<input type=\"radio\" id=\"dark\" name=\"theme\"/>"
"<input type=\"radio\" id=\"raw\" name=\"theme\"/>"
"<input type=\"radio\" id=\"darkraw\" name=\"theme\"/>"
"<div id=\"labels\">"
"<div class=\"content\">"
"<label for=\"light\">Light Theme</label>"
"Change theme: "
"<label for=\"light\">Light</label>"
"(<label for=\"raw\">raw</label>)"
" / "
"<label for=\"dark\">Dark Theme</label>"
"<label for=\"dark\">Dark</label>"
"(<label for=\"darkraw\">raw</label>)"
"</div>"
"</div>"
"<div class=\"main\">")
@ -257,7 +275,6 @@ Argument `PROJECT-PLIST' contains information about the current project."
:publishing-directory ,publish-dir
:recursive t
:preparation-function org-blog-prepare
:publishing-function org-blog-publish-to-html
:with-toc nil