From a6fa6e3fcb032e2867b744fb6e9fee362cc8cd3a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Jan 2017 21:52:42 -0500 Subject: external link icon --- TODO.org | 1 - bin/index.md.erb | 2 +- src/External.svg | 5 +++++ src/main.scss | 7 +++++++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/External.svg 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.title %><% a.tags.each do |t| %><%= t.html %><% end %><% end %> + * 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.tags.each do |t| %><%= t.html %><% end %><% 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 @@ + + + + \ 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; + } } } -- cgit v1.2.3