Skip to content

Commit

Permalink
Adding homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurp committed Oct 27, 2024
1 parent 9e6894f commit b0035d1
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
18 changes: 8 additions & 10 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* This is a manifest file that'll be compiled into application.css.
*
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
* depending on specificity.
*
* Consider organizing styles into separate files for maintainability.
*/
body {
font-family: -apple-system, Helvetica, sans-serif;
}

main {
margin: 30px auto;
max-width: 600px;
}
4 changes: 4 additions & 0 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PagesController < ApplicationController
def home
end
end
2 changes: 2 additions & 0 deletions app/helpers/pages_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module PagesHelper
end
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title><%= content_for(:title) || "Email Gpt" %></title>
<title><%= content_for(:title) || "📧🤖 Email GPT as a Service" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
Expand Down
4 changes: 4 additions & 0 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<main>
<h1>Email GPT as a Service</h1>
<p>Just email <a href="mailto:[email protected]">[email protected]</a> and get a reply to your question or comment by our AI assistant.</p>
</main>
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker

# Defines the root path route ("/")
# root "posts#index"
root "pages#home"
end
8 changes: 8 additions & 0 deletions test/controllers/pages_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require "test_helper"

class PagesControllerTest < ActionDispatch::IntegrationTest
test "should get home" do
get pages_home_url
assert_response :success
end
end

0 comments on commit b0035d1

Please sign in to comment.