-
+
{{ content }}
@@ -32,7 +38,7 @@
- Date
- - {{ page.date|date:'%A, %B %d, %Y at %I:%M %p'|replace:' 0',' '|replace:' AM',' am'|replace:' PM',' pm' }}
+
- {{ page.date|date:'%A, %B %d at %I:%M %p'|replace:' 0',' '|replace:' AM',' am'|replace:' PM',' pm' }}
- Camera
- {{ page.exif.make }} {{ page.exif.model }}
diff --git a/_layouts/post.html b/_layouts/post.html
index c1b9857..348f926 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -9,7 +9,7 @@
{% endif %}
{% if page.code %}
-
+
{% endif %}
diff --git a/_plugins/loopdir.rb b/_plugins/loopdir.rb
index a4e8f14..9211150 100644
--- a/_plugins/loopdir.rb
+++ b/_plugins/loopdir.rb
@@ -13,7 +13,7 @@ module Jekyll
@attributes['path'] = nil;
@attributes['parse'] = 'true';
@attributes['match'] = '*';
- @attributes['sort'] = 'asc';
+ @attributes['sort'] = 'path';
markup.scan(Liquid::TagAttributes) do | key, value |
@attributes[key] = value
@@ -35,47 +35,54 @@ module Jekyll
def render(context)
context.registers[:loopdir] ||= Hash.new(0)
- files = Dir.glob(File.join(@attributes['path'], @attributes['match']))
-
- if @attributes['sort'].casecmp('desc') == 0
- files.sort! do | x, y |
- y <=> x
- end
- else
- files.sort!
- end
+ items = []
- result = []
-
- context.stack do
- files.each do |pathname|
- if @attributes['parse']
- data = {}
+ Dir.glob(File.join(@attributes['path'], @attributes['match'])).each do |pathname|
+ if @attributes['parse']
+ item = {}
- content = File.read(pathname)
+ content = File.read(pathname)
- if content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
- content = $POSTMATCH
+ if content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
+ content = $POSTMATCH
- begin
- data = YAML.load($1)
- rescue => e
- puts "YAML Exception reading #{name}: #{e.message}"
- end
+ begin
+ item = YAML.load($1)
+ rescue => e
+ puts "YAML Exception reading #{name}: #{e.message}"
end
-
- data['name'] = File.basename(pathname, @attributes['match'].sub('*', ''))
- data['path'] = pathname
- data['content'] = content
-
- context['item'] = data
- else
- context['item'] = pathname
end
+ item['content'] = content
+ else
+ context['item'] = pathname
+ end
+
+ item['name'] = File.basename(pathname, @attributes['match'].sub('*', ''))
+ item['path'] = pathname
+
+ items.push item
+ end
+
+ sortby = @attributes['sort'].gsub(/^-/, '')
+
+ items.sort! do | x, y |
+ x[sortby] <=> y[sortby]
+ end
+
+ if sortby != @attributes['sort']
+ items.reverse!
+ end
+
+ context.stack do
+ result = []
+
+ items.each do | item |
+ context['item'] = item
+
result << render_all(@nodelist, context)
end
-
+
result
end
end
diff --git a/robots.txt b/robots.txt
index 6f27bb6..aaf93aa 100644
--- a/robots.txt
+++ b/robots.txt
@@ -1,2 +1,2 @@
User-agent: *
-Disallow:
\ No newline at end of file
+Disallow: /static/
diff --git a/static/dev/style/default-common.css b/static/dev/style/default-common.css
index cc96ea7..6d3f186 100644
--- a/static/dev/style/default-common.css
+++ b/static/dev/style/default-common.css
@@ -14,6 +14,14 @@ body > header, article > section {
width: 640px;
}
+body.layout-gallery-photo > header {
+ display: none;
+}
+
+body.layout-gallery-photo article > section {
+ padding-top: 14px;
+}
+
body > footer {
color: #999999;
font-size: 11px;
@@ -162,6 +170,7 @@ section .timeline > * {
}
body.layout-post section .timeline > *,
+ body.layout-gallery-photo section .timeline > *,
section:hover .timeline > * {
opacity: 1;
}