Remove haml

This commit is contained in:
Samuel Cochran 2015-01-17 15:03:00 +11:00
parent eff638f920
commit 6ec409bfcb
7 changed files with 70 additions and 67 deletions

View File

@ -4,7 +4,6 @@ PATH
mailcatcher (0.6.0) mailcatcher (0.6.0)
activesupport (>= 4.0.0, < 5) activesupport (>= 4.0.0, < 5)
eventmachine (~> 1.0.0) eventmachine (~> 1.0.0)
haml (>= 3.1, < 4.1)
mail (~> 2.3) mail (~> 2.3)
sinatra (~> 1.2) sinatra (~> 1.2)
skinny (~> 0.2.3) skinny (~> 0.2.3)
@ -36,8 +35,6 @@ GEM
execjs (2.1.0) execjs (2.1.0)
ffi (1.9.3) ffi (1.9.3)
fssm (0.2.10) fssm (0.2.10)
haml (4.0.5)
tilt
hike (1.2.3) hike (1.2.3)
i18n (0.6.9) i18n (0.6.9)
json (1.8.1) json (1.8.1)

View File

@ -17,7 +17,6 @@ module MailCatcher
class Application < Sinatra::Base class Application < Sinatra::Base
set :development, ENV["MAILCATCHER_ENV"] == "development" set :development, ENV["MAILCATCHER_ENV"] == "development"
set :root, File.expand_path("#{__FILE__}/../../../..") set :root, File.expand_path("#{__FILE__}/../../../..")
set :haml, :format => :html5
if development? if development?
require "sprockets-helpers" require "sprockets-helpers"
@ -49,7 +48,7 @@ module MailCatcher
end end
get "/" do get "/" do
haml :index erb :index
end end
delete "/" do delete "/" do
@ -179,7 +178,7 @@ module MailCatcher
end end
not_found do not_found do
haml :"404" erb :"404"
end end
end end
end end

View File

@ -32,7 +32,6 @@ Gem::Specification.new do |s|
s.add_dependency "activesupport", ">= 4.0.0", "< 5" s.add_dependency "activesupport", ">= 4.0.0", "< 5"
s.add_dependency "eventmachine", "~> 1.0.0" s.add_dependency "eventmachine", "~> 1.0.0"
s.add_dependency "haml", ">= 3.1", "< 4.1"
s.add_dependency "mail", "~> 2.3" s.add_dependency "mail", "~> 2.3"
s.add_dependency "sinatra", "~> 1.2" s.add_dependency "sinatra", "~> 1.2"
s.add_dependency "sqlite3", "~> 1.3" s.add_dependency "sqlite3", "~> 1.3"

6
views/404.erb Normal file
View File

@ -0,0 +1,6 @@
<html>
<body>
<h1>No Dice</h1>
<p>The message you were looking for does not exist, or doesn't have content of this type.</p>
</body>
</html>

View File

@ -1,4 +0,0 @@
%html
%body
%h1 No Dice
%p The message you were looking for does not exist, or doesn't have content of this type.

62
views/index.erb Normal file
View File

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html class="mailcatcher">
<head>
<title>MailCatcher</title>
<link href="/favicon.ico" rel="icon" />
<%= stylesheet_tag "mailcatcher" %>
<%= javascript_tag "mailcatcher" %>
</head>
<body>
<header>
<h1><a href="http://mailcatcher.me" target="_blank">MailCatcher</a></h1>
<nav class="app">
<ul>
<li class="search"><input type="search" name="search" placeholder="Search messages..." incremental="true" /></li>
<li class="clear"><a href="#" title="Clear all messages">Clear</a></li>
<% unless MailCatcher.options[:no_exit] %>
<li class="quit"><a href="#" title="Quit MailCatcher">Quit</a></li>
<% end %>
</ul>
</nav>
</header>
<nav id="messages">
<table>
<thead>
<tr>
<th>From</th>
<th>To</th>
<th>Subject</th>
<th>Received</th>
</tr>
</thead>
<tbody></tbody>
</table>
</nav>
<div id="resizer"><div class="ruler"></div></div>
<article id="message">
<header>
<dl class="metadata">
<dt class="created_at">Received</dt>
<dd class="created_at"></dd>
<dt class="from">From</dt>
<dd class="from"></dd>
<dt class="to">To</dt>
<dd class="to"></dd>
<dt class="subject">Subject</dt>
<dd class="subject"></dd>
<dt class="attachments">Attachments</dt>
<dd class="attachments"></dd>
</dl>
<nav class="views">
<ul>
<li class="format tab html selected" data-message-format="html"><a href="#">HTML</a></li>
<li class="format tab plain" data-message-format="plain"><a href="#">Plain Text</a></li>
<li class="format tab source" data-message-format="source"><a href="#">Source</a></li>
<li class="action download" data-message-format="html"><a href="#" class="button"><span>Download</span></a></li>
</ul>
</nav>
</header>
<iframe class="body"></iframe>
</article>
</body>
</html>

View File

@ -1,56 +0,0 @@
!!!
%html.mailcatcher
%head
%title MailCatcher
%link{:href => "/favicon.ico", :rel => "icon"}
= stylesheet_tag "mailcatcher"
= javascript_tag "mailcatcher"
%body
%header
%h1
%a{:href => "http://mailcatcher.me", :target => "_blank"} MailCatcher
%nav.app
%ul
%li.search
%input{:type => "search", :name => "search", :placeholder => "Search messages...", :incremental => true}
%li.clear
%a{:href => "#", :title => "Clear all messages"} Clear
- unless MailCatcher.options[:no_exit]
%li.quit
%a{:href => "#", :title => "Quit MailCatcher"} Quit
%nav#messages
%table
%thead
%tr
%th From
%th To
%th Subject
%th Received
%tbody
#resizer
.ruler
%article#message
%header
%dl.metadata
%dt.created_at Received
%dd.created_at
%dt.from From
%dd.from
%dt.to To
%dd.to
%dt.subject Subject
%dd.subject
%dt.attachments Attachments
%dd.attachments
%nav.views
%ul
%li.format.tab.html.selected{"data-message-format" => "html"}
%a{:href => "#"} HTML
%li.format.tab.plain{"data-message-format" => "plain"}
%a{:href => "#"} Plain Text
%li.format.tab.source{"data-message-format" => "source"}
%a{:href => "#"} Source
%li.action.download
%a.button{:href => "#"}
%span Download
%iframe.body