Convert layout to slim

openid
Marcin Kulik 11 years ago
parent 847f8a4a3a
commit 49be5d6fe2

@ -16,6 +16,7 @@ gem 'girl_friday', '~> 0.11.2'
gem 'thin', '~> 1.5.0'
gem 'open4', '~> 1.3.0'
gem 'redcarpet', '~> 2.2.2'
gem 'slim'
# Gems used only for assets and not required
# in production environments by default.

@ -275,6 +275,9 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
slim (2.0.0)
temple (~> 0.6.5)
tilt (~> 1.3, >= 1.3.3)
slop (3.4.5)
spoon (0.0.4)
ffi
@ -283,6 +286,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
temple (0.6.5)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
@ -342,6 +346,7 @@ DEPENDENCIES
sass-rails (~> 3.2.6)
simple_form (~> 2.0.4)
simplecov (~> 0.7.1)
slim
thin (~> 1.5.0)
uglifier (>= 1.0.3)
unicorn (~> 4.6.2)

@ -1,9 +0,0 @@
<section class="supplimental error-404">
<div class="wrapper">
<h1>404</h1>
<p>
You shouldn't be here. Really.
</p>
<div class="vertical-expander"></div>
</div>
</section>

@ -0,0 +1,5 @@
section.supplimental.error-404
.wrapper
h1 404
p You shouldn't be here. Really.
.vertical-expander

@ -1,4 +0,0 @@
<ul>
<li><%= link_to "Browse", browse_path %></li>
<li><%= link_to "Record", docs_path(:record) %></li>
</ul>

@ -0,0 +1,3 @@
ul
li = link_to "Browse", browse_path
li = link_to "Record", docs_path(:record)

@ -1,20 +0,0 @@
<ul class="session-info">
<% if current_user %>
<li class="username">
<%= current_user.img_link(:title => '') %>
<%= current_user.link(:title => '') %>
<ul class="menu">
<li>
<%= link_to "Settings", edit_user_path, :class => "settings" %>
</li>
<li>
<%= link_to "Log out", logout_path, :class => "logout" %>
</li>
</ul>
</li>
<% else %>
<li><%= link_to "Log in", login_path %></li>
<% end %>
</ul>

@ -0,0 +1,13 @@
ul.session-info
- if current_user
li.username
=> current_user.img_link(:title => '')
= current_user.link(:title => '')
ul.menu
li
a.settings href=edit_user_path Settings
li
a.logout href=logout_path Log out
- else
li
a href=login_path Log in

@ -1,67 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><%= page_title %></title>
<%= csrf_meta_tags %>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "player" %>
<%= favicon_link_tag 'favicon.png' %>
<%= render :partial => 'layouts/current_user_js' %>
<%= render :partial => 'layouts/ga' %>
<script>
window.unpackWorkerPath = '<%= javascript_path "unpack_worker" %>';
window.mainWorkerPath = '<%= javascript_path "main_worker" %>';
</script>
</head>
<body>
<header>
<div class="wrapper">
<h1>
<a href="/">ascii.io <span class="cursor-block"></a>
</h1>
<div class="navigation">
<%= render :partial => 'layouts/navigation' %>
<div class="divider-vertical"></div>
<%= render :partial => 'layouts/session_info' %>
</div>
</div>
</header>
<% flash.each do |type, message| %>
<p class="<%= type %>"><%= message %></p>
<% end %>
<div id="content">
<%= content_for?(:content) ? yield(:content) : yield %>
</div>
<footer>
<div class="wrapper">
<p class="links">
<%= link_to 'About', docs_path(:about) %>
<%# <a href="/tos">Terms of Service</a> %>
<%# <a href="/privacy">Privacy Policy</a> %>
</p>
<p class="title">
Created by <%= link_to 'Marcin Kulik', 'https://github.com/sickill' %>
<img alt="Marcin" src="http://gravatar.com/avatar/9cecfc695240b56e5d3c1a5dc3830967" class="avatar">
</p>
</div>
</footer>
</body>
</html>

@ -0,0 +1,38 @@
doctype html
html[lang="en"]
head
meta[charset="utf-8"]
title = page_title
= csrf_meta_tags
= stylesheet_link_tag "application", :media => "all"
= javascript_include_tag "application"
= javascript_include_tag "player"
= favicon_link_tag 'favicon.png'
= render :partial => 'layouts/current_user_js'
= render :partial => 'layouts/ga'
script
| window.unpackWorkerPath = '#{javascript_path "unpack_worker"}';
window.mainWorkerPath = '#{javascript_path "main_worker"}';
body
header
.wrapper
h1
a href="/"
' ascii.io
span.cursor-block
.navigation
= render :partial => 'layouts/navigation'
.divider-vertical
= render :partial => 'layouts/session_info'
- flash.each do |type, message|
p[class=type] = message
#content
= content_for?(:content) ? yield(:content) : yield
footer
.wrapper
p.links
= link_to 'About', docs_path(:about)
p.title
' Created by
= link_to 'Marcin Kulik', 'https://github.com/sickill'
img.avatar alt="Marcin" src="http://gravatar.com/avatar/9cecfc695240b56e5d3c1a5dc3830967"
Loading…
Cancel
Save