summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-03 21:52:42 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-03 21:52:42 -0500
commita6fa6e3fcb032e2867b744fb6e9fee362cc8cd3a (patch)
tree86a9c38e20da27de3c795b563e7fae8889ee386e
parentfeaa1e6eb92c0e1d3db819cfd3c151d9fa15ca26 (diff)
external link icon
-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;
+ }
}
}