1
0
Fork 0

Colorize shr headings a bit more

This commit is contained in:
Tom Willemse 2020-04-30 18:31:30 -07:00
parent 84903e4425
commit 4fd3842af8

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2020.0328.023508 ;; Version: 2020.0430.183119
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -40,6 +40,14 @@
(shr-generic dom) (shr-generic dom)
(add-face-text-property start (point) '(:background "#222222" :box (:line-width 3 :color "#222222"))))) (add-face-text-property start (point) '(:background "#222222" :box (:line-width 3 :color "#222222")))))
(defun shr-tag-h1 (dom)
"Render a <h1> tag from DOM."
(shr-heading dom '(variable-pitch (:height 1.2 :weight bold :foreground "#65a854" :underline t))))
(defun shr-tag-h2 (dom)
"Render a <h2> tag from DOM."
(shr-heading dom '(variable-pitch (:height 1.1 :weight bold :foreground "#54a8a8"))))
(defun oni-shr--recolorize (orig-fun &rest args) (defun oni-shr--recolorize (orig-fun &rest args)
"Do some custom colorization. "Do some custom colorization.