Permalink
Browse files

improved internal links

  • Loading branch information...
archimag committed Apr 2, 2011
1 parent bec0dd4 commit e9228f3572b0d69e09fae84f267af9daf5ac76ce
Showing with 10 additions and 4 deletions.
  1. +2 −1 src/markup.lisp
  2. +6 −1 static/css/style.css
  3. +2 −2 templates/markup.tmpl
View
@@ -47,6 +47,7 @@
(defmethod 3bmd:print-tagged-element ((tag (eql :article-link)) stream title)
(write-string (cliki2.view:article-link
(list :title title
+ :new (null (cliki2::article-with-downcase-title (string-downcase title)))
:href (restas:genurl 'cliki2:view-article :title title)))
stream))
@@ -110,7 +111,7 @@
(sanitize:define-sanitize-mode +simple+
:elements ("a")
- :attributes (("a" . ("href")))
+ :attributes (("a" . ("href" "class")))
:protocols (("a" . (("href" . (:ftp :http :https :mailto :relative))))))
(defun format-article-description (article)
View
@@ -156,10 +156,15 @@
margin: 15px 0;
}
-#content a {
+#content a.internal {
color: #0077bb;
}
+#content a.new {
+ color: #BA0000;
+}
+
+
#content a.hyperspec {
color: #4040f2;
}
View
@@ -3,7 +3,7 @@
{namespace cliki2.view}
{template article-link}
- <a href="{$href}">{$title}</a>
+ <a href="{$href}" class="{$new ? 'new' : 'internal'}">{$title}</a>
{/template}
{template person-link}
@@ -28,7 +28,7 @@
<ul>
{foreach $item in $items}
<li>
- <a href="{$item.href}">{$item.title}</a>
+ {call article-link data="$item" /}
-
{$item.head |noAutoescape}
</li>

0 comments on commit e9228f3

Please sign in to comment.