summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.org1
-rw-r--r--bin/index.md.erb2
-rw-r--r--src/External.svg5
-rw-r--r--src/main.scss7
4 files changed, 13 insertions, 2 deletions
diff --git a/TODO.org b/TODO.org
index 349dcad..6d38b78 100644
--- a/TODO.org
+++ b/TODO.org
@@ -4,7 +4,6 @@
- categories (writing/programming/dnd)
* style
- org tables
-- external link (and wiki-style icon!)
- move breadcrumbs
* wish
- case insenstive URLs
diff --git a/bin/index.md.erb b/bin/index.md.erb
index 34f8677..05ec43f 100644
--- a/bin/index.md.erb
+++ b/bin/index.md.erb
@@ -4,4 +4,4 @@ class: "index"
---
<% @pages.sort_by{|a|a.published}.reverse.each do |a| %>
- * <a href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %></a><span><% a.tags.each do |t| %><%= t.html %><% end %></span><% end %>
+ * <span><a <% if a.is_a?(ExternPage) %>class="external" <% end %>href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %></a></span><span><% a.tags.each do |t| %><%= t.html %><% end %></span><% end %>
diff --git a/src/External.svg b/src/External.svg
new file mode 100644
index 0000000..49076d4
--- /dev/null
+++ b/src/External.svg
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
+<path fill="#FFF" stroke="#06D" stroke-width="10"
+d="m43,35H5v60h60V57M45,5v10l10,10-30,30 20,20 30-30 10,10h10V5z"/>
+</svg> \ No newline at end of file
diff --git a/src/main.scss b/src/main.scss
index b4f8681..4eb6fb7 100644
--- a/src/main.scss
+++ b/src/main.scss
@@ -128,6 +128,13 @@ body.index {
}
}
}
+ a.external {
+ background-position: center right;
+ background-repeat: no-repeat;
+ background-image: url(External.svg);
+ background-size: 12px 12px;
+ padding-right: 13px;
+ }
}
}