Add function for adding colour to exported HTML
parent
2f29030adb
commit
501e8a7004
@ -0,0 +1,29 @@
|
|||||||
|
(defun red ()
|
||||||
|
(interactive)
|
||||||
|
(setq oldname (concat (file-name-base) ".org"))
|
||||||
|
(setq newname (concat (file-name-base) ".html"))
|
||||||
|
(find-file-noselect newname)
|
||||||
|
(with-current-buffer newname
|
||||||
|
(goto-char (point-min))
|
||||||
|
(replace-regexp-in-region "<div id=\"content\" class=\"content\".*>" "<div id=\"content\" class=\"content\" style=\"--colourone: #a70000;--colourtwo: #f5c1c1;\">")
|
||||||
|
(write-file newname)))
|
||||||
|
|
||||||
|
(defun blue ()
|
||||||
|
(interactive)
|
||||||
|
(setq oldname (concat (file-name-base) ".org"))
|
||||||
|
(setq newname (concat (file-name-base) ".html"))
|
||||||
|
(find-file-noselect newname)
|
||||||
|
(with-current-buffer newname
|
||||||
|
(goto-char (point-min))
|
||||||
|
(replace-regexp-in-region "<div id=\"content\" class=\"content\".*>" "<div id=\"content\" class=\"content\" style=\"--colourone: #002fa7;--colourtwo: #c1d0f5;\">")
|
||||||
|
(write-file newname)))
|
||||||
|
|
||||||
|
(defun green ()
|
||||||
|
(interactive)
|
||||||
|
(setq oldname (concat (file-name-base) ".org"))
|
||||||
|
(setq newname (concat (file-name-base) ".html"))
|
||||||
|
(find-file-noselect newname)
|
||||||
|
(with-current-buffer newname
|
||||||
|
(goto-char (point-min))
|
||||||
|
(replace-regexp-in-region "<div id=\"content\" class=\"content\".*>" "<div id=\"content\" class=\"content\" style=\"--colourone: #00a700;--colourtwo: #c1f5c1;\">")
|
||||||
|
(write-file newname)))
|
Loading…
Reference in New Issue