Better look and feel, more menus
This commit is contained in:
parent
0755dd4d04
commit
f92f5d1da7
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
body {
|
||||
font-family: menlo, monospace;
|
||||
font-size: 15px;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -16,14 +16,19 @@ body {
|
|||
#preamble {
|
||||
border-bottom: solid 1px;
|
||||
}
|
||||
#preamble h1 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#postamble {
|
||||
border-top: solid 1px;
|
||||
}
|
||||
#preamble,#postamble {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.menu {
|
||||
opacity: 0.5;
|
||||
}
|
||||
#preamble:focus,#postamble:focus, #preamble:hover,#postamble:hover {
|
||||
.menu:hover, .menu:focus {
|
||||
opacity:1;
|
||||
}
|
||||
#content,.content {
|
||||
|
@ -31,6 +36,9 @@ body {
|
|||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
}
|
||||
#content *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, pre, code, blockquote, ol, ul, ol ol, ul ul, ul ol, ol
|
||||
ul, li, p, section, header, footer {
|
||||
|
@ -276,8 +284,16 @@ body {
|
|||
background: var(--main-background);
|
||||
color: var(--main-foreground);
|
||||
}
|
||||
::selection {
|
||||
color: var(--todo-txt);
|
||||
background-color: var(--yellow);
|
||||
}
|
||||
::-moz-selection {
|
||||
color: var(--todo-txt);
|
||||
background-color: var(--yellow);
|
||||
}
|
||||
a, a:visited {
|
||||
color: var(--base1);
|
||||
color: var(--second-foreground);
|
||||
}
|
||||
a:hover, a:active, a:focus {
|
||||
color: var(--yellow);
|
||||
|
|
|
@ -53,14 +53,15 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
"<link rel=\"alternative\" type=\"application/rss+xml\" title=\"Subscribe to articles\" href=\"/archives.xml\" />"
|
||||
"<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\">"))
|
||||
|
||||
(defun menu ()
|
||||
(defun menu (lst)
|
||||
"Blog menu"
|
||||
(concat
|
||||
"<navigation id=\"menu\">"
|
||||
"<navigation class=\"menu\">"
|
||||
(mapconcat 'identity
|
||||
(append
|
||||
'("<a href=\"/index.html\">Home</a>"
|
||||
"<a href=\"/archive.html\">Posts</a>"
|
||||
"<a href=\"#preamble\">↑ Top ↑</a>")
|
||||
"<a href=\"/archive.html\">Posts</a>")
|
||||
lst)
|
||||
" | ")
|
||||
"</navigation>"))
|
||||
|
||||
|
@ -84,10 +85,12 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
"Pre-amble for whole blog."
|
||||
(concat
|
||||
"<div class=\"content\">"
|
||||
"<strong><a href=\"/index.html\">Her.esy.fun</a></strong>"
|
||||
(menu '("<a href=\"#postamble\">↓ bottom ↓</a>"))
|
||||
"<h1>"
|
||||
(format "%s" (plist-get info :title))
|
||||
(when-let ((date (get-from-info info :date)))
|
||||
(format " - <span class=\"article-date\">%s</span>" date))
|
||||
" - <a href=\"#menu\">↓ menu ↓</a>"
|
||||
"</h1>"
|
||||
"</div>"))
|
||||
|
||||
(defun get-from-info (info k)
|
||||
|
@ -100,6 +103,7 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
(cond ((eq 0 r) (format "%c" c))
|
||||
((< 0 r 10) (format "&#%d;" c))
|
||||
(t (format "&#x%X;" c)))))
|
||||
|
||||
(defun obfuscate-html (txt)
|
||||
(apply 'concat
|
||||
(mapcar 'rand-obfs txt)))
|
||||
|
@ -111,7 +115,8 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
"<footer>"
|
||||
(when-let ((author (get-from-info info :author)))
|
||||
(if-let ((email (plist-get info :email)))
|
||||
(format "<div class=\"author\">Author: <a href=\"mailto:%s\">%s</a></div>"
|
||||
(format "<div class=\"author\">Author: <a href=\"%s%s\">%s</a></div>"
|
||||
(obfuscate-html "mailto:")
|
||||
(obfuscate-html email)
|
||||
(obfuscate-html author))
|
||||
(format "<div class=\"author\">Author: %s</div>" author)))
|
||||
|
@ -128,7 +133,7 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
"</div>")
|
||||
emacs-version spacemacs-version org-version)
|
||||
"</footer>"
|
||||
(menu)
|
||||
(menu '("<a href=\"#preamble\">↑ Top ↑</a>"))
|
||||
"</div>"))
|
||||
|
||||
(defun org-blog-sitemap-format-entry (entry _style project)
|
||||
|
@ -172,7 +177,7 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
:publishing-function org-html-publish-to-html
|
||||
|
||||
:with-toc nil
|
||||
:with-title t
|
||||
:with-title nil
|
||||
:with-date t
|
||||
:section-numbers nil
|
||||
:html-doctype "html5"
|
||||
|
@ -230,8 +235,8 @@ I write all the content with [[http://orgmode.org][org-mode]].
|
|||
#+end_src
|
||||
|
||||
#+begin_src elisp :results verbatim
|
||||
(obfuscate-html "yann.esposito@gmail.com")
|
||||
(append nil '("foo"))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: "yann.esposito@gmail.com"
|
||||
: ("foo")
|
||||
|
|
Loading…
Reference in a new issue