From 7edb003cd1c9b53ffdff11ef85532e39f08db16d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 6 Jan 2017 19:50:45 -0500 Subject: wip --- tmpl/index.atom.erb | 27 +++++++++++++++++++++++++++ tmpl/index.md.erb | 12 ++++++++++++ tmpl/page.html.erb | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 tmpl/index.atom.erb create mode 100644 tmpl/index.md.erb create mode 100644 tmpl/page.html.erb (limited to 'tmpl') diff --git a/tmpl/index.atom.erb b/tmpl/index.atom.erb new file mode 100644 index 0000000..cd70f7e --- /dev/null +++ b/tmpl/index.atom.erb @@ -0,0 +1,27 @@ + + + + AndrewDM.me <%= @title %> + + + + <%= @pages.map{|p|p.updated}.sort.last.rfc3339 %> + <%= Person.new("Andrew Murrell").atom %> + <%= $url %> + + <% @pages.sort_by{|p| p.updated}.reverse.each do |page| %> + + + <%= page.url %> + <%= page.updated.rfc3339 %> + <%= page.published.rfc3339 %> + <%= page.title %> + <%= page.author.atom %> +<% if page.content %> + <%= html_escape(page.content) %> +<% end %><% if page.rights %> + <%= html_escape(page.rights) %> +<% end %> + + <% end %> + diff --git a/tmpl/index.md.erb b/tmpl/index.md.erb new file mode 100644 index 0000000..a3ec547 --- /dev/null +++ b/tmpl/index.md.erb @@ -0,0 +1,12 @@ +--- +title: "<%= @title %>" +class: "index" +--- + +<% @sections.keys.sort.each do |path| %> +<% unless path.empty? %>## [<%= @sections[path]['head'] %>](<%= path %>)<% end %> + +<% @sections[path]['body'].sort_by{|a|a.published}.reverse.each do |a| %> + * 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 %> + +<% end %> diff --git a/tmpl/page.html.erb b/tmpl/page.html.erb new file mode 100644 index 0000000..e2dc9fe --- /dev/null +++ b/tmpl/page.html.erb @@ -0,0 +1,37 @@ + + + + + <%= @page.title %><% unless @page.title.empty? %> — <% end %>AndrewDM + + + <%= @page.head %> + + class="<%= @page.class %>"<% end %>> +
+

AndrewDM

+ + +
+
+ <% if @page.tags.count > 0 %>

Tags: <% @page.tags.each do |t| %><%= t.html %><% end %>

<% end %> + <% if @page.showtitle %>

<%= @page.title %>

<% end %> + <%= @page.content %> +
+ + + -- cgit v1.2.3