mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 13:32:52 +00:00
HTML export: Allow special colors for each TODO keyword
Wanrong Lin writes: Right now in the HTML export the TODO keywords have either class="todo", or class="done". That loses all the face properties in the original TODO keywords. I think the TODO keywords faces are important visual aids to differentiate different types of TODO items, so I just wonder whether it is possible to keep the faces in the HTML. This makes sense. This commit adds, to each TODO keyword, an additional class named after the keyword. For example: <span class="todo WAITING">WAITING</span> So each todo keyword gets class "todo" or "done" depending on which general type it is. And in addition it gets itself as class. So go to your CSS file and configure like this: .todo { font-weight:bold; } .done { font-weight:bold; } .TODO { color:red; } .WAITING { color:orange; } .DONE { color:green; } Thanks to Sebastian Rose for the multiple-classes trick.
This commit is contained in:
parent
c32de18ae0
commit
d8780dbbee
|
@ -8109,8 +8109,9 @@ assigns the following special CSS classes to appropriate parts of the
|
|||
document - your style specifications may change these, in addition to any of
|
||||
the standard classes like for headlines, tables etc.
|
||||
@example
|
||||
.todo @r{TODO keywords}
|
||||
.done @r{the DONE keyword}
|
||||
.todo @r{TODO keywords, all not-done states}
|
||||
.done @r{the DONE keywords, all stated the count as done}
|
||||
WAITING @r{Each TODO keyword also uses a class named after itself}
|
||||
.timestamp @r{time stamp}
|
||||
.timestamp-kwd @r{keyword associated with a time stamp, like SCHEDULED}
|
||||
.tag @r{tag in a headline}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2009-02-12 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-exp.el (org-export-as-html): Add TODO keyword as extra
|
||||
class, so that each keyword can get special colors through CSS.
|
||||
|
||||
* org-clock.el (org-clock-out): Add another nil for the previous
|
||||
state into the call to `org-add-log-setup'.
|
||||
|
||||
|
|
|
@ -3743,7 +3743,8 @@ lang=\"%s\" xml:lang=\"%s\">
|
|||
(if (member (match-string 2 line)
|
||||
org-done-keywords)
|
||||
"done" "todo")
|
||||
"\">" (match-string 2 line)
|
||||
" " (match-string 2 line)
|
||||
"\"> " (match-string 2 line)
|
||||
"</span>" (substring line (match-end 2)))))
|
||||
|
||||
;; Does this contain a reference to a footnote?
|
||||
|
|
Loading…
Reference in a new issue