You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
EmacsLisp
33 lines
1.3 KiB
EmacsLisp
(defun red ()
|
|
"Set exported HTML file to 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 ()
|
|
"Set exported HTML file to 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 ()
|
|
"Set exported HTML file to 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)))
|