Convert everything to slim

This commit is contained in:
Petko Bordjukov 2014-09-02 11:24:15 +03:00
parent 643aa9a790
commit b6a6a04064
5 changed files with 53 additions and 75 deletions

View File

@ -1,34 +0,0 @@
<nav class="menu">
<ul class="sf-menu sf-js-enabled">
<%= content_tag :li, class: [('current_page_item' if controller_name == 'home')] do %>
<%= link_to t(:home), root_path %>
<% end %>
<% unless user_signed_in? %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'sessions')] do %>
<%= link_to t(:login), new_user_session_path %>
<% end %>
<% else %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'lectures')] do %>
<%= link_to t(:talks), lectures_path %>
<% end %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'workshops')] do %>
<%= link_to t(:workshops), workshops_path %>
<% end %>
<%= content_tag :li, class: [('current_page_item' if controller_name == 'registrations')] do %>
<%= link_to t(:edit_speaker_profile), edit_user_registration_path %>
<% end %>
<li>
<%= link_to t(:logout), destroy_user_session_path, method: :delete %>
</li>
<% end %>
<li>
<% if I18n.locale != :en %>
<%= link_to 'English', root_url(locale: 'en') %>
<% elsif I18n.locale != :bg %>
<%= link_to 'Български', root_url(locale: 'bg') %>
<% end %>
</li>
</ul>
</nav>

View File

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>
<%= Conference.current.title %>
<%= yield :title if content_for? :title %>
</title>
<%= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'http://openfest.org/wp-content/themes/thematic-openfest/style.css' %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="wrapper" class="hfeed">
<header id="header">
<div id="branding">
<div id="blog-title">
<span>
<a href="http://openfest.org/" title="OpenFest" rel="home">
<img src="//openfest.org/images/logo-header.png" alt="OpenFest" />
</a>
</span>
</div>
<h1 id="blog-description"><%= t(:of_motto)%></h1>
</div><!-- #branding -->
<div id="access">
<%= render partial: '/layouts/nav' %>
</div><!-- #access -->
</header>
<div id="main">
<%= render('/shared/flash_messages') unless flash.empty? %>
<%= yield %>
</div>
</div>
<%= javascript_include_tag 'application' %>
</body>
</html>

View File

@ -0,0 +1,27 @@
doctype html
html
head
meta charset="utf-8"
title
= Conference.current.title
= yield :title if content_for? :title
= stylesheet_link_tag 'application'
= stylesheet_link_tag 'http://openfest.org/wp-content/themes/thematic-openfest/style.css'
= csrf_meta_tags
body
#wrapper.hfeed
header#header
#branding
#blog-title
span
= link_to 'http://openfest.org/', title: 'OpenFest', rel: 'home' do
= image_tag '//openfest.org/images/logo-header.png', alt: 'OpenFest'
h1#blog-description
= t(:of_motto)
#access
== render partial: '/shared/nav'
#main
== render(partial: '/shared/flash_messages') unless flash.empty?
== yield
= javascript_include_tag 'application'

View File

@ -1,3 +0,0 @@
div#flash_messages
- flash.each do |key, value|
= content_tag :div, value, class: "flash #{key}"

View File

@ -0,0 +1,26 @@
nav.menu
ul.sf-menu.sf-js-enabled
== content_tag :li, class: [('current_page_item' if controller_name == 'home')] do
= link_to t(:home), root_path
- unless user_signed_in?
== content_tag :li, class: [('current_page_item' if controller_name == 'sessions')] do
= link_to t(:login), new_user_session_path
- else
== content_tag :li, class: [('current_page_item' if controller_name == 'lectures')] do
= link_to t(:talks), lectures_path
== content_tag :li, class: [('current_page_item' if controller_name == 'workshops')] do
= link_to t(:workshops), workshops_path
== content_tag :li, class: [('current_page_item' if controller_name == 'registrations')] do
= link_to t(:edit_speaker_profile), edit_user_registration_path
li
= link_to t(:logout), destroy_user_session_path, method: :delete
li
- if I18n.locale != :en
= link_to 'English', root_url(locale: 'en')
- elsif I18n.locale != :bg
= link_to 'Български', root_url(locale: 'bg')