浏览代码

org-html.el and org-e-html.el: Add CSS classes to list tags.

* org-html.el (org-html-export-list-line): Add CSS classes to
these list HTML tags: <ul> <dl> and <ol>.

* contrib/lisp/org-e-html.el (org-e-html-begin-plain-list): Add
CSS classes to these list HTML tags: <ul> <dl> and <ol>.
Bastien Guerry 12 年之前
父节点
当前提交
0db5f28dd4
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 3 3
      contrib/lisp/org-e-html.el
  2. 2 2
      lisp/org-html.el

+ 3 - 3
contrib/lisp/org-e-html.el

@@ -2292,11 +2292,11 @@ the plist used as a communication channel."
 (defun org-e-html-begin-plain-list (type &optional arg1)
   (case type
     (ordered
-     (format "<ol%s>" (if arg1		; FIXME
+     (format "<ol class=\"org-ol\"%s>" (if arg1		; FIXME
 			  (format " start=\"%d\"" arg1)
 			"")))
-    (unordered "<ul>")
-    (descriptive "<dl>")))
+    (unordered "<ul class=\"org-ul\">")
+    (descriptive "<dl class=\"org-dl\">")))
 
 (defun org-e-html-end-plain-list (type)
   (case type

+ 2 - 2
lisp/org-html.el

@@ -2724,12 +2724,12 @@ the alist of previous items."
 			  count-tmp)))))
 	(when firstp
 	  (org-close-par-maybe)
-	  (insert (format "<%sl>\n" type)))
+	  (insert (format "<%sl class=\"org-%sl\">\n" type type)))
 	(insert (cond
 		 ((equal type "d")
 		  (format "<dt>%s</dt><dd>" desc-tag))
 		 ((and (equal type "o") counter)
-		  (format "<li value=\"%s\">" counter))
+		  (format "<li class=\"org-li-counter\" value=\"%s\">" counter))
 		 (t "<li>")))
 	;; If line had a checkbox, some additional modification is required.
 	(when checkbox