-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlayout.haml
48 lines (41 loc) · 2.21 KB
/
layout.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
39
40
41
42
43
44
45
46
47
!!!
%html
%head
-if not @album.nil?
%title= @album.config(:title)
%link{:href => @album.font_href, :rel => 'stylesheet', :type => 'text/css'}
%meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
%meta{:name => 'viewport', :content => "width=device-width, user-scalable=no"}
%script{:type => 'text/javascript', :src => "/js?#{Time.now.strftime "%Y%m%d"}"}
%link{:href => '/favicon.ico', :rel => 'shortcut icon'}
%link{:rel => "apple-touch-icon", :href => "favicon.png"}
%link{:href => "/css?#{Time.now.strftime "%Y%m%d"}", :rel => 'stylesheet', :type => 'text/css'}
%link{:href => "/css/photoswipe.css", :rel => 'stylesheet', :type => 'text/css'}
%link{:href => "/css/default-skin/default-skin.css", :rel => 'stylesheet', :type => 'text/css'}
- if not @photo.nil?
-# Facebook & OpenGraph
%meta{:property => "og:title", :content => @album.config(:title)}
%meta{:property => "og:url", :content => "http://#{domain}/#{@album.name}/#{@photo.id}"}
%meta{:property => "og:description", :content => ""}
%meta{:property => "og:image", :content => preview(@photo)}
%meta{:property => "og:image:type", :content => 'image/jpeg'}
%meta{:property => "og:image:width", :content => @photo.size(:preview).x}
%meta{:property => "og:image:height", :content => @photo.size(:preview).y}
-# Twitter
%meta{:name => "twitter:card", :content => "photo"}
%meta{:name => "twitter:image", :content => preview(@photo)}
%meta{:name => "twitter:image:width", :content => @photo.size(:preview).x}
%meta{:name => "twitter:image:height", :content => @photo.size(:preview).y}
%body
#content
= yield
- if settings.production?
:javascript
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-360138-11']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();