This repository has been archived by the owner on Mar 6, 2018. It is now read-only.
/
application.html.erb
75 lines (73 loc) · 3.76 KB
/
application.html.erb
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><%= raw (@page_title ? @page_title : @setting.site_name) %></title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="HandheldFriendly" content="True" />
<meta name="description" content="<%= @meta_description %>" />
<meta name="keywords" content="<%= @meta_keywords %>" />
<link rel="shortcut icon" href="/favicon.ico?v=002" />
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<%= csrf_meta_tag %>
<link href='http://fonts.googleapis.com/css?family=Crimson+Text&subset=latin' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "application", :cache => "cached_application" %>
<%= yield :styles -%>
<%= auto_discovery_link_tag(:rss,(@setting.feed_url || rss_blogs_url),:title => '定阅最新博客') %>
</head>
<body>
<div id="body">
<div id="header">
<div class="menu">
<% if !@menus.blank? %>
<% for item in @menus %>
<span><a href="<%= item.url %>"<%= " class='actived'" if @nav_actived == item.url.gsub('/','') %> title="<%= item.name %>"<%= ' target="_blank"' if item.new_window %>><%= item.name %></a></span>
<% end -%>
<% end -%>
</div>
<div class="title"><a id="site_name" href="/"><%= @setting.site_name %></a></div>
</div>
<div id="main">
<div id="sidebar">
<div class="section">
<h2>订阅我的博客</h2>
<div class="icons"><a href="<%= (@setting.feed_url || rss_blogs_url) %>"><%= image_tag("feed-big.png") %></a></div>
</div>
<div class="section">
<%= raw @setting.home_show %>
</div>
</div>
<%= yield %>
</div>
<div id="footer">
<% if !@setting.footer_html.blank? %>
<p>
<%=raw @setting.footer_html %>
</p>
<% end %>
<p class="copyright">
Powered by opensource project <a href="http://github.com/huacnlee/personlab" target="_blank">PersonLab</a> running on <a href="http://api.heroku.com/invitation/accept/5d4c3ac8a5" target="_blank">Heroku</a> + <a href="http://www.rubyonrails.org" target="_blank">Rails3</a>, Theme by <a href="http://bret.appspot.com/" target="_blank">Bret Taylor</a>.<br />
Version: <%= APP_VERSION %>
</p>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<%= javascript_include_tag "rails","will_paginate","common", :cache => "cached_application" %>
<%= yield :scripts %>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<%= @setting.disqus_shortname %>'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<% if !@setting.google_analytics_id.blank? %>
<script type='text/javascript'>var _gaq = _gaq || []; _gaq.push(['_setAccount', '<%= @setting.google_analytics_id %>']); _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); })();</script>
<% end %>
</body>
</html>