[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: CSS style on sacha's wikiblog
From: |
Sacha Chua |
Subject: |
[emacs-wiki-discuss] Re: CSS style on sacha's wikiblog |
Date: |
Wed, 06 Jul 2005 03:34:13 +0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
address@hidden (J. David Boyd) writes:
> I'm wondering how to make my completed tasks get struck over, as they do on
> Sacha's wikiblog.
Steal my http://sacha.free.net.ph/notebook/wiki/style.css . =)
The relevant line is
.taskX { text-decoration: line-through; color: gray }
I've hacked my publishing to do tables instead of lists and boxes for
the notes. From http://sacha.free.net.ph/notebook/emacs/planner-config.el:
(defun sacha/planner-markup-tasks ()
"Mark up tasks as a table."
(while (re-search-forward planner-task-regexp nil t)
(goto-char (line-beginning-position))
(insert "<table class=\"tasks\">\n")
(while (looking-at "^#\\([A-C]\\)\\([0-9]*\\)\\s-+\\(.\\)\\s-+\\(.+\\)")
(let* ((info (planner-current-task-info))
(priority (planner-task-priority info))
(number (planner-task-number info))
(status (planner-task-status info))
(text (planner-task-description info))
(link (planner-task-link-text info))
(status-style (cond
((string= status "_") "task_")
((string= status "o") "tasko")
((string= status ">") "taskd")
((string= status "P") "taskp")
((string= status "X") "taskX")
((string= status "C") "task_cancelled")
(t "task"))))
(delete-region (line-beginning-position)
(min (point-max) (1+ (line-end-position))))
(insert (format ;"<li class=\"%s\"><span class=\"%s\">%s</span>
%s</li>\n"
"<tr><td class=\"%s\">%s</td><td>%s</td><td
class=\"%s\">%s %s</td></tr>"
(cond
((string= priority "A") "taskA")
((string= priority "B") "taskB")
((string= priority "C") "taskC")
(t "task"))
(concat priority number)
status
status-style
text
(if link (format "<span style=\"font-size:
x-small\">(%s)</span>" link) "")))))
(insert "</table>\n")))
Then you need to add that to planner-publishing-markup instead of the usual #A
rule.
I have this in my planner-config because I also do custom notes markup...
(setq planner-publishing-markup
'([emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags]
sacha/planner-markup-tasks
sacha/planner-markup-notes))
You can do pretty much anything you want, actually. =)
--
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, CS ed
sachac on irc.freenode.net#emacs . YM: sachachua83