This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/app/views/layout/application.html.erb

131 lines
3.9 KiB
Plaintext

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<title><%= tuxconfig[:site_name] -%><% if @page_title -%> :: <%= @page_title -%><% end -%><% if @secondary_title -%> :: <%= @secondary_title -%><% end -%></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/stylesheets/application.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="/stylesheets/tuxbliki.css" type="text/css" media="all" charset="utf-8" />
<link rel="alternate" type="application/rss+xml" title="RSS2.0" href="/feeds/rss.xml" />
<script src="/javascripts/prototype.js" type="text/javascript"></script>
<script src="/javascripts/scriptaculous.js" type="text/javascript"></script>
<script src="/javascripts/curvycorners.js" type="text/javascript"></script>
<style type="text/css">
<%= catch_content :for_stylesheet %>
</style>
<script type="text/javascript">
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
addLoadEvent(function(){
new curvyCorners({
tl: false,
tr: false,
bl: { radius: 10 },
br: { radius: 10 },
antiAlias: true,
autoPad: false
}, $('headercontainer')).applyCornersToAll();
cloud_settings = {
tl: { radius: 5 },
tr: { radius: 5 },
bl: { radius: 5 },
br: { radius: 5 },
antiAlias: false,
autoPad: true
};
if($('tag_cloud'))
new curvyCorners(cloud_settings, $('tag_cloud')).applyCornersToAll();
if($('related_links'))
new curvyCorners(cloud_settings, $('related_links')).applyCornersToAll();
$$('.photo_album').each(function(link){
new curvyCorners(cloud_settings, link).applyCornersToAll();
});
$$('.photo').each(function(link){
new curvyCorners(cloud_settings, link).applyCornersToAll();
});
new curvyCorners({
tl: { radius: 10 },
tr: { radius: 10 },
bl: { radius: 10 },
br: { radius: 10 },
antiAlias: true,
autoPad: true
}, $('footer')).applyCornersToAll();
});
<%= catch_content :for_javascript %>
</script>
</head>
<body>
<div id="container">
<div id="headercontainer"><div id="header">
<span style="float: left; margin-right: 10px;"><img src="/images/<%= tuxconfig[:logo] -%>" /></span>
<h1><%= @page_title or 'TuxBliki' -%></h1>
<% if @secondary_title -%><h2><%= @secondary_title -%></h2><% end -%>
<br style="clear: both" />
<%
links = []
links << [ 'Blog', '/', 'internet-group-chat.png' ]
links << [ 'Wiki', url(:pages), 'text-html.png' ]
links << [ 'Post', url(:new_page), 'accessories-text-editor.png' ] if allowed_to?(:create_pages)
links << [ 'Photo Albums', url(:albums), 'camera-photo.png' ]
links << [ 'Authors', url(:authors), 'system-users.png' ]
links << [ 'Tags', url(:tags), 'preferences-desktop-font.png' ]
if logged_in?
links << [ 'Logout', url(:delete_session, :id => session[:author_id]), 'system-log-out.png' ]
else
links << [ 'Login', url(:new_session), 'system-lock-screen.png' ]
end
links << [ 'Help', url(:page, :id => 'Help'), 'help-browser.png' ]
-%>
<div class="navigation_links"><%= links.collect { |l| "<a href='#{l[1]}'><img src='/images/#{l[2]}' alt='#{l[0]}' /> #{l[0]}</a>" }.join(' | ') -%></div>
</div></div>
<br style="clear: both;" />
<% flash.keys.each do |key| -%>
<div id="<%= key -%>">
<%= flash[key] %>
</div>
<br style="clear: both;" />
<% end -%>
<div id="page">
<div id="content">
<%= catch_content :for_layout %>
</div>
<div id="sidebar">
<%= catch_content :for_sidebar %>
</div>
<br style="clear: both" />
</div>
<br style="clear: both;" />
<div id="footer">
<span id="copyright">&copy; 2004 - <%= Date.today.year -%> penguincoder</span>
</div>
</div>
</body>
</html>