/
default.haml
39 lines (38 loc) · 1.7 KB
/
default.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
!!! 5
%html
%head
%title= "\"#{@item[:title]}\""
%script{:type=>"text/javascript", :src=>"/assets/jquery-1.7.2.min.js"}
%script{:type=>"text/javascript", :src=>"/assets/jquery.tagcanvas-1.17.1.min.js"}
%link{:rel=>"stylesheet", :type=>"text/css", :href=>"/assets/styles/style.css"}
%meta{'http-equiv'=>"content-type", :content=>"text/html", :charset=>"UTF-8"}
%script{:type=>"text/javascript"}
$(document).ready(function() {
$('canvas.tagCloud').tagcanvas({
maxSpeed : 0.05,
depth : 0.075,
weightMode: 'both',
weight: true,
wheelZoom: true,
weightGradient: {0: '#cc9393', 0.33:'#e2e4cb', 0.66:'#b4cb8a', 1: '607835'},
outlineColour: "#ffffff",
outlineMethod: "colour"
});
});
%body
%div#all><
%nav><
- parents = get_parents(@item, @items)
- content_children = @item.children.reject{|i|i.binary?}
- do_collection(parents, 'parent', 'first', 'last') do |i, context, first, last|
%div{:class=>"#{context}#{first==true ? ' first' : ''}"}
%a{:href=>"#{i.identifier}"}<>= "#{i[:title]}"
%div{:class=>"current#{parents.size == 0 ? ' first' : ''}#{content_children.size==0 ? ' last' : ''}"}= @item[:title]
- do_collection(content_children, 'child', 'first', 'last') do |i, context, first, last|
%div{:class=>"#{context}#{last==true ? ' last' : ''}"}
%a{:href=>"#{i.reps[0].path}"}<>= "#{i[:title]}"
%div#main><
%h2.page><= @item[:page_title] || @item[:title] || " "
%div.chapter><= yield
%footer= "last modified: #{@item.mtime.strftime('%Y-%m-%d')} | Tags #{tags_for(@item, {:base_url => "/sitemap/tags/#"})}"