Skip to content

Commit

Permalink
Star Gazers landing
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhbhatia committed Aug 21, 2024
1 parent dcaadae commit 34f1208
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 27 deletions.
10 changes: 10 additions & 0 deletions app/controllers/landing_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class LandingController < ApplicationController
def index
end

def star_gazers
set_meta_tags title: "Star Gazers : Sirius",
description: "Star Gazers : Sirius",
keywords: "Comics, Indie comics"
end
end
6 changes: 0 additions & 6 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,4 @@ def for_creators
description: "For Creators page",
keywords: "Comics, Indie comics"
end

def star_gazers
set_meta_tags title: "Star Gazers : Sirius",
description: "Star Gazers : Sirius",
keywords: "Comics, Indie comics"
end
end
2 changes: 2 additions & 0 deletions app/helpers/landing_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module LandingHelper
end
6 changes: 6 additions & 0 deletions app/views/landing/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script async src="https://cdn.builder.io/js/webcomponents"></script>

<builder-component model="landing" api-key="17b796452ccc442b9fe4244370d4008b">
<!-- content here displays while loading -->
Loading...
</builder-component>
1 change: 1 addition & 0 deletions app/views/landing/star_gazers.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= render(PageTitleComponent.new(title: "Star Gazers : Sirius")) %>
21 changes: 0 additions & 21 deletions app/views/pages/star_gazers.html.erb

This file was deleted.

6 changes: 6 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require "sidekiq/web"
Rails.application.routes.draw do
get 'landing/index'
if Rails.env.development?
mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"
end
Expand Down Expand Up @@ -46,6 +47,11 @@
resources :stores, param: :slug, only: [:show]
resources :products, param: :slug, only: [:show]
resources :stores, param: :slug, only: [:index, :show]
resources :landing, only: [:index] do
collection do
get :star_gazers
end
end
resources :cart, only: [:show] do
collection do
post "add", to: "cart#add", as: :add
Expand Down
15 changes: 15 additions & 0 deletions spec/helpers/landing_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'rails_helper'

# Specs in this file have access to a helper object that includes
# the LandingHelper. For example:
#
# describe LandingHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe LandingHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
11 changes: 11 additions & 0 deletions spec/requests/landing_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'rails_helper'

RSpec.describe "Landings", type: :request do
describe "GET /index" do
it "returns http success" do
get "/landing/index"
expect(response).to have_http_status(:success)
end
end

end
5 changes: 5 additions & 0 deletions spec/views/landing/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'rails_helper'

RSpec.describe "landing/index.html.erb", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end

0 comments on commit 34f1208

Please sign in to comment.