Compare commits

..

5 commits

Author SHA1 Message Date
d3b5bdcc46 Exclude posting posts, they go to tekuti 2023-12-07 23:41:23 -08:00
9156f202f3 Add post 2023-12-07 23:39:59 -08:00
0739882bfa Use both padding and margin for source code blocks
Share the amount of space used between the source code blocks and other
elements. This way (in Firefox) the horizontal scroll bar isnt' pushed all the
way over to the next element, but stays in between. This still reduces overlap
while also not making the scroll bar crowd the next element.

This also fixes a little style bug that the padding was given all around, this
is only meant to apply to the top and bottom of the element.
2023-12-07 22:14:21 -08:00
2a68a3850c Replace source block's margin with padding
This should help reduce the amount of overlap there is between the source code
and the scroll bar that the browser shows if a source block isn't wide enough.
2023-12-07 21:44:13 -08:00
334b8b6a05 Add margin only to the top of a <p> following a <p>
This way if something other than a paragraph follows the paragraph it won't
automatically and unnecessarily be pushed down.
2023-12-07 21:40:37 -08:00
4 changed files with 50 additions and 2 deletions

View file

@ -77,7 +77,8 @@ The =deploy= target first makes sure that =build= has been executed at least onc
deploy: ## Deploy the site to live
@[[ -e public/index.html ]] || (echo "Run 'make build' before deploy" && exit 1)
rsync --verbose --checksum --recursive --delete \
--exclude '*~' --exclude '.emacs-local' --delete-excluded \
--exclude '*~' --exclude '.emacs-local' --exclude 'posts/' \
--delete-excluded \
public/ ryuslash.org:ryuslash-next/
#+end_src

View file

@ -0,0 +1,45 @@
#+title: TIL: I can use elfeed-search-face-alist to highlight certain headlines in Elfeed
#+tags: emacs, elfeed, til
#+comments: on
#+status: publish
#+DATE: Thu, 07 Dec 2023 22:45:51 GMT
#+UPDATE_URL: /admin/modify-post/2023%252f12%252f07%252ftil-i-can-use-elfeed-search-face-alist-to-highlight-certain-headlines-in-elfeed
I rediscovered that I can use =elfeed-search-face-alist= to customize how headlines are displayed in Elfeed. I had read it before [[https://nullprogram.com/blog/2015/12/03/#custom-entry-colors][on Chris Wellons' blog]], but I didn't have a use for it then.
With =elfeed-search-face-alist= I can define a face to be used for an article with a specific tag. I added the [[https://blabbermouth.net/][Blabbermouth]] RSS feed to my feeds.
#+begin_src emacs-lisp
(setq elfeed-feeds '(("https://blabbermouth.net/feed" music)))
#+end_src
And created 2 taggers. One tags reviews, because those always have =/reviews/= in the url. The other has a list of bands that I'm especially interested in.
#+begin_src emacs-lisp
(defvar oni-elfeed-blabbermouth-review-tagger
(elfeed-make-tagger :feed-url (rx "blabbermouth.net")
:entry-link (rx "/reviews/")
:add 'review)
"Tagger that marks any reviews from Blabbermouth.")
(defvar oni-elfeed-blabbermouth-favourite-tagger
(elfeed-make-tagger :feed-url (rx "blabbermouth.net")
:entry-title (rx (or "SLIPKNOT"
(seq "DREAM" whitespace "THEATER")
;; And so on...
))
:add 'favourite)
"Tagger that highlights specific bands from Blabbermouth.")
(add-hook 'elfeed-new-entry-hook oni-elfeed-blabbermouth-favourite-tagger)
(add-hook 'elfeed-new-entry-hook oni-elfeed-blabbermouth-review-tagger)
#+end_src
And then I can just set up the feeds:
#+begin_src emacs-lisp
(add-to-list 'elfeed-search-face-alist '(review :slant italic) t)
(add-to-list 'elfeed-search-face-alist '(favourite :foreground "#f17272") t)
#+end_src
As long as the face definitions don't conflict a headline's face would be the combination of all that apply. For example, by default unread headlines are bold, so unread favourite messages would be bold and somewhat reddish.

View file

@ -109,7 +109,7 @@ pre {
p { margin: 0; }
p + p { margin: 1rem 0; }
p + p { margin: 1rem 0 0 0; }
.footdef {
display: grid;

View file

@ -2,6 +2,8 @@
pre.src {
overflow: auto;
margin: 0.5rem 0;
padding: 0.5rem 0;
}
.content-wrapper {