aboutsummaryrefslogtreecommitdiffstats
path: root/oni-shr.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-04-30 18:31:30 -0700
committerGravatar Tom Willemse2020-04-30 18:31:30 -0700
commit4fd3842af895bc872af2f74b38836b75c8602197 (patch)
treece3ae7126d76baf6ade66a877755a2be941c4af6 /oni-shr.el
parent84903e44254996836a57cd16dec42d84cc3b92dd (diff)
downloademacs-config-4fd3842af895bc872af2f74b38836b75c8602197.tar.gz
emacs-config-4fd3842af895bc872af2f74b38836b75c8602197.zip
Colorize shr headings a bit more
Diffstat (limited to 'oni-shr.el')
-rw-r--r--oni-shr.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/oni-shr.el b/oni-shr.el
index 9bc2dfd..56f006a 100644
--- a/oni-shr.el
+++ b/oni-shr.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2020.0328.023508
+;; Version: 2020.0430.183119
;; 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
@@ -40,6 +40,14 @@
(shr-generic dom)
(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)
"Do some custom colorization.