Update look&feel, count, simplify

This commit is contained in:
Yann Esposito (Yogsototh) 2020-05-01 19:26:07 +02:00
parent 71c6f95ce5
commit 25010b68c1
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
5 changed files with 57 additions and 51 deletions

View file

@ -57,7 +57,12 @@ for fic in $filelist; do
debug CSS: $csssize
total=$(( htmlsize + imgsize + csssize ))
# the space is important before the toh total
sizeinfos=$(print -- " $(toh $total) (HTML: $(toh $htmlsize), CSS: $(toh $csssize), IMG: $(toh $imgsize))")
sizeinfos=$(print -- " $(toh $total) (html $(toh $htmlsize), css $(toh $csssize)")
if ((imgsize>0)); then
sizeinfos="$sizeinfos, img $(toh $imgsize))"
else
sizeinfos="$sizeinfos)"
fi
print -- $sizeinfos
perl -pi -e 's#(<div class="?web-file-size"?>)[^<]*(</div>)#$1'"$sizeinfos"'$2#' $fic
done

View file

@ -65,6 +65,16 @@
"</svg>"
"</div>"))
(defun gen-permalink (output-file)
"Given the output-file generate a permalink"
(format "%s%s"
websiteorigin
(replace-regexp-in-string ".*/_site" "" output-file)))
(defun gen-org-src (permalink)
"Given a permalink generate the path to the asssociated .org source file"
(replace-regexp-in-string "\.html$" ".org" permalink))
(defun org-blog-preamble (info)
"Pre-amble for whole blog."
(concat
@ -85,13 +95,10 @@
(car date))))
" on "
(format " <a href=\"%s\">Yann Esposito's blog</a>" websiteorigin)
(let ((permalink (format "%s%s"
websiteorigin
(replace-regexp-in-string ".*/_site" ""
(plist-get info :output-file)))))
(let ((permalink (gen-permalink (plist-get info :output-file))))
(concat
" - "
(let ((orgfile (replace-regexp-in-string "\.html$" ".org" permalink)))
(let ((orgfile (gen-org-src permalink)))
(format " <a href=\"%s\">source</a>" orgfile))
" - "
(format " <a class=\"permalink\" href=\"%s\">§permalink</a>" permalink)))
@ -112,7 +119,7 @@
(let ((keywords (split-string keywords ",\s*")))
(format " <span class=\"keywords\">%s</span>"
(mapconcat (lambda (k)
(format "<span class=\"keyword\">#%s</span>" k))
(format "<code>#%s</code>" k))
(cl-sort keywords 'string-lessp :key 'downcase)
" "))))
@ -151,7 +158,7 @@
"RSS"
"</a>"
" (<a href=\"https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fher.esy.fun%2Frss.xml\">"
" validate</a>)"
"validate</a>)"
"</div>"))
(generated-date
(format "<div class=\"date\">%s</div>"
@ -164,20 +171,26 @@
"<a href=\"http://spacemacs.org\" target=\"_blank\" rel=\"noopener noreferrer\">Spacemacs %s</a>, "
"<a href=\"http://orgmode.org\" target=\"_blank\" rel=\"noopener noreferrer\">Org Mode %s</a>"
"</div>")
emacs-version spacemacs-version org-version)))
emacs-version spacemacs-version org-version))
(website-code
"<a href=\"https://gitea.esy.fun/yogsototh/her.esy.fun\" target=\"_blank\" rel=\"noopener noreferrer\">Website source code</a>")
(org-src (gen-org-src (gen-permalink (plist-get info :output-file))))
(org-src-link (format "<a href=\"%s\">%s</a>" org-src org-src)))
(concat
"<table>"
(mapconcat (lambda (entry)
(when (cdr entry)
(format "<tr><td>%s</td><td>%s</td></tr>"
(car entry) (cdr entry))))
`(("Author" . ,author)
("Date" . ,date)
("Keywords" . ,keywords)
("RSS" . ,rss)
("Size" . ,size)
("Generated" . ,generated-date)
("Generated with" . ,generated-with))
`(("author" . ,author)
("date" . ,date)
("tags" . ,keywords)
("rss" . ,rss)
("size" . ,size)
("gen-date" . ,generated-date)
("get-with" . ,generated-with)
("website-src" . ,website-code)
("org-file" . ,org-src-link))
" ")
"</table>"))
"</footer>"

Binary file not shown.

View file

@ -3,15 +3,19 @@
*/
/* Fonts */
:root {
--lh: 22px;
--lh: 20px;
}
body {
font-size: 18px;
font-size: 16px;
font-family: sans-serif;
line-height: var(--lh);
min-height: 100vh;
}
footer {
font-size: 14px;
font-family: monospace;
}
code {
font-size: 15px;
}
@ -214,21 +218,6 @@ figure, .figure {
.underline {
text-decoration: underline;
}
#h {
float: left;
}
#labels {
width: 100%;
text-align: right;
}
#labels label {
text-decoration: underline;
cursor: pointer;
font-style: italic;
}
label + pre {
margin-top: 0;
}
/* COLORS */
:root {
@ -240,21 +229,21 @@ label + pre {
--b1: #b0bac7;
--b2: #ECEFF4;
--b3: #fff;
--y: #a98d50;
--o: #aa6550;
--r: #b85a64;
--m: #af53b0;
--v: #846f93;
--b: #5679a4;
--c: #4c8493;
--g: #728b5c;
--y: #c18600;
--o: #d84100;
--r: #e62729;
--m: #ec0085;
--v: #6c71c4;
--b: #0095ff;
--c: #00b0a3;
--g: #879a00;
--bg: var(--b3);
--rbg: var(--b2);
--fg0: var(--b0);
--fg: var(--b02);
--rfg: #000;
--hl: var(--c);
--hl: var(--b);
}
img {
@ -272,7 +261,6 @@ h1, h2, h3, h4, h5, h6 {
a {
color: var(--hl);
}
b, strong, i, em {
color: var(--rfg);
}
@ -288,11 +276,15 @@ h1:before, h2:before, h3:before, h4:before, h5:before, h6:before {
.metas, .metas a, .metas a:visited {
color: var(--fg0);
}
nav a, nav a:visited {
color: var(--fg);
}
ol > li:before, pre::after,pre::before,hr:after, label, label a, label a:visited {
a:hover, .metas a:hover, nav a:hover
{
color: #fff;
background: var(--hl);
}
ol > li:before, pre::after,pre::before,hr:after {
color: var(--fg0);
}

View file

@ -62,9 +62,5 @@ priority:
javascript, no web-font, not too much CSS magic, not much images or really
compressed one.
I talk about more details [[file:./posts/new-blog.org][here]].
#+begin_export html
<a href="https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fher.esy.fun%2Frss.xml">[Valid RSS]</a>
#+end_export
If you are interested about technical details behind this website, take a
look [[file:./posts/new-blog.org][here]].