Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert slim views to ERB #218

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,5 @@ gem "ransack"
gem "record_tag_helper"
gem "simple_form", "~> 5.0.0"
gem "sitemap_generator", require: false
gem "slim"
gem "sucker_punch"
gem "faraday"
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,6 @@ GEM
activemodel (>= 5.0)
sitemap_generator (6.3.0)
builder (~> 3.0)
slim (5.1.1)
temple (~> 0.10.0)
tilt (>= 2.1.0)
smart_properties (1.17.0)
spoon (0.0.6)
ffi
Expand All @@ -421,7 +418,6 @@ GEM
railties (>= 6.0.0)
tailwindcss-rails (2.0.32-x86_64-linux)
railties (>= 6.0.0)
temple (0.10.3)
thor (1.3.1)
tilt (2.3.0)
timeout (0.4.1)
Expand Down Expand Up @@ -491,7 +487,6 @@ DEPENDENCIES
selenium-webdriver
simple_form (~> 5.0.0)
sitemap_generator
slim
sprockets-rails
sucker_punch
tailwindcss-rails
Expand Down
24 changes: 24 additions & 0 deletions app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<section class="container">
<header>
<h1><%= t('.title') %></h1>
</header>

<div class="row">
<div class="col-sx-12 col-sm-4 col-sm-offset-4">
<%= simple_form_for resource, as: resource_name, url: password_path(resource_name), html: { class: 'form-horizontal', role: 'form' } do |f| %>
<%= f.error_notification %>
<%= f.input :email, required: true, autofocus: true %>

<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<%= f.button :submit, t('.send_instructions'), class: 'btn-default' %>
</div>
</div>

<div class="col-sm-offset-3">
<%= render 'devise/shared/links' %>
</div>
<% end %>
</div>
</div>
</section>
15 changes: 0 additions & 15 deletions app/views/devise/passwords/new.html.slim

This file was deleted.

25 changes: 25 additions & 0 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<section class="container">
<header>
<h1><%= t('.title') %></h1>
</header>

<div class="row">
<div class="col-sx-12 col-sm-6 col-sm-offset-3">
<%= simple_form_for resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal', role: 'form' } do |f| %>
<%= f.input :email, required: false, autofocus: true %>
<%= f.input :password, required: false %>
<%= f.input :remember_me, as: :boolean, wrapper: :checkbox %>

<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<%= f.button :submit, t('.sign_in'), class: 'btn-default' %>
</div>
</div>

<div class="col-sm-offset-3">
<%= render 'devise/shared/links' %>
</div>
<% end %>
</div>
</div>
</section>
16 changes: 0 additions & 16 deletions app/views/devise/sessions/new.html.slim

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/devise/shared/_links.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ul class="devise-links list-unstyled">
<% unless controller_name == 'sessions' %>
<li><%= link_to t('.sign_in'), new_session_path(resource_name) %></li>
<% end %>
<% if devise_mapping.recoverable? && !controller_name.in?(['passwords', 'registrations']) %>
<li><%= link_to t('.forgot_password'), new_password_path(resource_name) %></li>
<% end %>
</ul>
5 changes: 0 additions & 5 deletions app/views/devise/shared/_links.slim

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/kaminari/_first_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%# url: url to the first page %>
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="<%= 'disabled' if current_page.first? %>">
<%= link_to t('views.pagination.first'), url, remote: remote %>
</li>
7 changes: 0 additions & 7 deletions app/views/kaminari/_first_page.html.slim

This file was deleted.

5 changes: 5 additions & 0 deletions app/views/kaminari/_gap.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="disabled">
6 changes: 0 additions & 6 deletions app/views/kaminari/_gap.html.slim

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/kaminari/_last_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%# url: url to the last page %>
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="<%= 'disabled' if current_page.last? %>">
<%= link_to t('views.pagination.last'), url, remote: remote %>
</li>
7 changes: 0 additions & 7 deletions app/views/kaminari/_last_page.html.slim

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/kaminari/_next_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%# url: url to the next page %>
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="<%= 'disabled' if current_page.last? %>">
<%= link_to t('views.pagination.next'), url, rel: 'next', remote: remote %>
</li>
7 changes: 0 additions & 7 deletions app/views/kaminari/_next_page.html.slim

This file was deleted.

9 changes: 9 additions & 0 deletions app/views/kaminari/_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%# page: a page object for "this" page %>
<%# url: url to this page %>
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="<%= 'active' if page.current? %>">
<%= link_to page, url, remote: remote, rel: page_rel(page) %>
</li>
8 changes: 0 additions & 8 deletions app/views/kaminari/_page.html.slim

This file was deleted.

17 changes: 17 additions & 0 deletions app/views/kaminari/_paginator.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<%= paginator.render do %>
<div class="text-center">
<ul class="pagination pagination-sm pagination-centered">
<%= first_page_tag %>
<%= prev_page_tag %>
<% each_page do |page| %>
<% if page.left_outer? || page.right_outer? || page.inside_window? %>
<%= page_tag page %>
<% elsif !page.was_truncated? %>
<%= gap_tag %>
<% end %>
<% end %>
<%= next_page_tag %>
<%= last_page_tag %>
</ul>
</div>
<% end %>
17 changes: 0 additions & 17 deletions app/views/kaminari/_paginator.html.slim

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/kaminari/_prev_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%# url: url to the previous page %>
<%# current_page: a page object for the currently displayed page %>
<%# total_pages: total number of pages %>
<%# per_page: number of items to fetch per page %>
<%# remote: data-remote %>
<li class="<%= 'disabled' if current_page.first? %>">
<%= link_to t('views.pagination.previous'), url, rel: 'prev', remote: remote %>
</li>
7 changes: 0 additions & 7 deletions app/views/kaminari/_prev_page.html.slim

This file was deleted.

40 changes: 40 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<% if ENV["GOOGLE_WEB_TOOLS_ID"] %>
<meta name="google-site-verification" content="<%= ENV["GOOGLE_WEB_TOOLS_ID"] %>">
<% end %>

<%= display_meta_tags reverse: true, site: t('site_name'), separator: '·' %>
<%= render 'application/favicon' %>

<%= stylesheet_link_tag '//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css' %>
<%= stylesheet_link_tag 'application' %>
<%= csrf_meta_tags %>
</head>
<body>
<%= render 'shared/navbar' %>
<div class="main-content">
<% if notice %>
<p class="notice"><%= notice %></p>
<% end %>
<% if alert %>
<p class="alert"><%= alert %></p>
<% end %>

<%= yield %>
</div>

<footer>
<p>
<%= link_to t('project_on_github'), 'https://github.com/parisrb/rubyparis.org' %>
<%= link_to t('contact_maintainer'), 'https://twitter.com/happynoff' %>
</p>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
Dismissed Show dismissed Hide dismissed
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.2/js/bootstrap.min.js"></script>
Dismissed Show dismissed Hide dismissed
</body>
</html>
32 changes: 0 additions & 32 deletions app/views/layouts/application.html.slim

This file was deleted.

14 changes: 14 additions & 0 deletions app/views/layouts/reveal.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Lineup</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= stylesheet_link_tag 'lineup' %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<%= javascript_include_tag 'lineup' %>
</body>
</html>
12 changes: 0 additions & 12 deletions app/views/layouts/reveal.html.slim

This file was deleted.

9 changes: 9 additions & 0 deletions app/views/lineups/_newcomers.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<section>
<h2>ParisRB &lt;3</h2>

<h3>1ère visite à ParisRB ?</h3>
<p>Levez la main !</p>

<h3>Pas votre première fois ?</h3>
<p>Allez vers ceux qui l'ont levée :)</p>
</section>
8 changes: 0 additions & 8 deletions app/views/lineups/_newcomers.slim

This file was deleted.

Loading
Loading