Update look&feel, count, simplify
This commit is contained in:
parent
71c6f95ce5
commit
25010b68c1
5 changed files with 57 additions and 51 deletions
|
@ -57,7 +57,12 @@ for fic in $filelist; do
|
||||||
debug CSS: $csssize
|
debug CSS: $csssize
|
||||||
total=$(( htmlsize + imgsize + csssize ))
|
total=$(( htmlsize + imgsize + csssize ))
|
||||||
# the space is important before the toh total
|
# 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
|
print -- $sizeinfos
|
||||||
perl -pi -e 's#(<div class="?web-file-size"?>)[^<]*(</div>)#$1'"$sizeinfos"'$2#' $fic
|
perl -pi -e 's#(<div class="?web-file-size"?>)[^<]*(</div>)#$1'"$sizeinfos"'$2#' $fic
|
||||||
done
|
done
|
||||||
|
|
43
project.el
43
project.el
|
@ -65,6 +65,16 @@
|
||||||
"</svg>"
|
"</svg>"
|
||||||
"</div>"))
|
"</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)
|
(defun org-blog-preamble (info)
|
||||||
"Pre-amble for whole blog."
|
"Pre-amble for whole blog."
|
||||||
(concat
|
(concat
|
||||||
|
@ -85,13 +95,10 @@
|
||||||
(car date))))
|
(car date))))
|
||||||
" on "
|
" on "
|
||||||
(format " <a href=\"%s\">Yann Esposito's blog</a>" websiteorigin)
|
(format " <a href=\"%s\">Yann Esposito's blog</a>" websiteorigin)
|
||||||
(let ((permalink (format "%s%s"
|
(let ((permalink (gen-permalink (plist-get info :output-file))))
|
||||||
websiteorigin
|
|
||||||
(replace-regexp-in-string ".*/_site" ""
|
|
||||||
(plist-get info :output-file)))))
|
|
||||||
(concat
|
(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 href=\"%s\">source</a>" orgfile))
|
||||||
" - "
|
" - "
|
||||||
(format " <a class=\"permalink\" href=\"%s\">§permalink</a>" permalink)))
|
(format " <a class=\"permalink\" href=\"%s\">§permalink</a>" permalink)))
|
||||||
|
@ -112,7 +119,7 @@
|
||||||
(let ((keywords (split-string keywords ",\s*")))
|
(let ((keywords (split-string keywords ",\s*")))
|
||||||
(format " <span class=\"keywords\">%s</span>"
|
(format " <span class=\"keywords\">%s</span>"
|
||||||
(mapconcat (lambda (k)
|
(mapconcat (lambda (k)
|
||||||
(format "<span class=\"keyword\">#%s</span>" k))
|
(format "<code>#%s</code>" k))
|
||||||
(cl-sort keywords 'string-lessp :key 'downcase)
|
(cl-sort keywords 'string-lessp :key 'downcase)
|
||||||
" "))))
|
" "))))
|
||||||
|
|
||||||
|
@ -151,7 +158,7 @@
|
||||||
"RSS"
|
"RSS"
|
||||||
"</a>"
|
"</a>"
|
||||||
" (<a href=\"https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fher.esy.fun%2Frss.xml\">"
|
" (<a href=\"https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fher.esy.fun%2Frss.xml\">"
|
||||||
" validate</a>)"
|
"validate</a>)"
|
||||||
"</div>"))
|
"</div>"))
|
||||||
(generated-date
|
(generated-date
|
||||||
(format "<div class=\"date\">%s</div>"
|
(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://spacemacs.org\" target=\"_blank\" rel=\"noopener noreferrer\">Spacemacs %s</a>, "
|
||||||
"<a href=\"http://orgmode.org\" target=\"_blank\" rel=\"noopener noreferrer\">Org Mode %s</a>"
|
"<a href=\"http://orgmode.org\" target=\"_blank\" rel=\"noopener noreferrer\">Org Mode %s</a>"
|
||||||
"</div>")
|
"</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
|
(concat
|
||||||
"<table>"
|
"<table>"
|
||||||
(mapconcat (lambda (entry)
|
(mapconcat (lambda (entry)
|
||||||
(when (cdr entry)
|
(when (cdr entry)
|
||||||
(format "<tr><td>%s</td><td>%s</td></tr>"
|
(format "<tr><td>%s</td><td>%s</td></tr>"
|
||||||
(car entry) (cdr entry))))
|
(car entry) (cdr entry))))
|
||||||
`(("Author" . ,author)
|
`(("author" . ,author)
|
||||||
("Date" . ,date)
|
("date" . ,date)
|
||||||
("Keywords" . ,keywords)
|
("tags" . ,keywords)
|
||||||
("RSS" . ,rss)
|
("rss" . ,rss)
|
||||||
("Size" . ,size)
|
("size" . ,size)
|
||||||
("Generated" . ,generated-date)
|
("gen-date" . ,generated-date)
|
||||||
("Generated with" . ,generated-with))
|
("get-with" . ,generated-with)
|
||||||
|
("website-src" . ,website-code)
|
||||||
|
("org-file" . ,org-src-link))
|
||||||
" ")
|
" ")
|
||||||
"</table>"))
|
"</table>"))
|
||||||
"</footer>"
|
"</footer>"
|
||||||
|
|
BIN
project.el.sig
BIN
project.el.sig
Binary file not shown.
|
@ -3,15 +3,19 @@
|
||||||
*/
|
*/
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
:root {
|
:root {
|
||||||
--lh: 22px;
|
--lh: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
line-height: var(--lh);
|
line-height: var(--lh);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
footer {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
code {
|
code {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
@ -214,21 +218,6 @@ figure, .figure {
|
||||||
.underline {
|
.underline {
|
||||||
text-decoration: 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 */
|
/* COLORS */
|
||||||
:root {
|
:root {
|
||||||
|
@ -240,21 +229,21 @@ label + pre {
|
||||||
--b1: #b0bac7;
|
--b1: #b0bac7;
|
||||||
--b2: #ECEFF4;
|
--b2: #ECEFF4;
|
||||||
--b3: #fff;
|
--b3: #fff;
|
||||||
--y: #a98d50;
|
--y: #c18600;
|
||||||
--o: #aa6550;
|
--o: #d84100;
|
||||||
--r: #b85a64;
|
--r: #e62729;
|
||||||
--m: #af53b0;
|
--m: #ec0085;
|
||||||
--v: #846f93;
|
--v: #6c71c4;
|
||||||
--b: #5679a4;
|
--b: #0095ff;
|
||||||
--c: #4c8493;
|
--c: #00b0a3;
|
||||||
--g: #728b5c;
|
--g: #879a00;
|
||||||
|
|
||||||
--bg: var(--b3);
|
--bg: var(--b3);
|
||||||
--rbg: var(--b2);
|
--rbg: var(--b2);
|
||||||
--fg0: var(--b0);
|
--fg0: var(--b0);
|
||||||
--fg: var(--b02);
|
--fg: var(--b02);
|
||||||
--rfg: #000;
|
--rfg: #000;
|
||||||
--hl: var(--c);
|
--hl: var(--b);
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -272,7 +261,6 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
a {
|
a {
|
||||||
color: var(--hl);
|
color: var(--hl);
|
||||||
}
|
}
|
||||||
|
|
||||||
b, strong, i, em {
|
b, strong, i, em {
|
||||||
color: var(--rfg);
|
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 {
|
.metas, .metas a, .metas a:visited {
|
||||||
color: var(--fg0);
|
color: var(--fg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a, nav a:visited {
|
nav a, nav a:visited {
|
||||||
color: var(--fg);
|
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);
|
color: var(--fg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,5 @@ priority:
|
||||||
javascript, no web-font, not too much CSS magic, not much images or really
|
javascript, no web-font, not too much CSS magic, not much images or really
|
||||||
compressed one.
|
compressed one.
|
||||||
|
|
||||||
I talk about more details [[file:./posts/new-blog.org][here]].
|
If you are interested about technical details behind this website, take a
|
||||||
|
look [[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
|
|
||||||
|
|
Loading…
Reference in a new issue