aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-23 16:53:39 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-23 16:53:39 +0000
commit462ba9835e36ca3b42ceb59f33c03a98a22c19af (patch)
tree7ba54e5e35e4a410d1152a1204d464294518a293
parent8ea33a576682005ffaf406541bf21b1be27e19f9 (diff)
Adds a new home page and more_info page
-rw-r--r--app/controllers/pages_controller.rb19
-rw-r--r--app/views/layouts/_navbar.html.erb3
-rw-r--r--app/views/layouts/application.html.erb2
-rw-r--r--app/views/pages/home.html.erb54
-rw-r--r--app/views/pages/more_info.html.erb41
-rw-r--r--config/routes.rb10
6 files changed, 124 insertions, 5 deletions
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
new file mode 100644
index 0000000..58c0ee7
--- /dev/null
+++ b/app/controllers/pages_controller.rb
@@ -0,0 +1,19 @@
+class PagesController < ApplicationController
+ def home
+ end
+
+ def about
+ end
+
+ def more_info
+ end
+
+ def faq
+ end
+
+ def contact
+ end
+
+ def terms
+ end
+end
diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb
index 0609d63..af7a0e4 100644
--- a/app/views/layouts/_navbar.html.erb
+++ b/app/views/layouts/_navbar.html.erb
@@ -6,7 +6,7 @@
<div class="w-full md:block md:w-auto" id="navbar-default">
<ul class="font-medium flex flex-col p-4 md:p-0 mt-4 border rounded-lg md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white">
<li>
- <a href="#" class="block py-2 px-3 text-black aria-current='page'">Home</a>
+ <%= link_to "Home", home_path, class: "block py-2 px-3 rounded" %>
</li>
<li>
<%= link_to "Resources", pdfresources_path, class: "block py-2 px-3 rounded" %>
@@ -30,4 +30,3 @@
</div>
</div>
</nav>
-
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 64bcdd8..33d963e 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title><%= content_for(:title) || "Alphabetlearning" %></title>
+ <title><%= content_for(:title) || "Alphabet Learning" %></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">
diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb
new file mode 100644
index 0000000..48d6433
--- /dev/null
+++ b/app/views/pages/home.html.erb
@@ -0,0 +1,54 @@
+<div class="min-h-screen">
+ <section class="bg-gradient-to-r from-blue-300 to-blue-800 text-white">
+ <div class="container mx-auto px-4 py-20">
+ <div class="max-w-3xl mx-auto text-center">
+ <h1 class="text-4xl md:text-6xl font-bold mb-6">
+ Your PDF Resources Hub
+ </h1>
+ <p class="text-xl mb-8">
+ Discover and download high-quality PDF resources for your needs
+ </p>
+ <a href="<%= new_registration_path %>"
+ class="bg-white text-blue-600 px-8 py-3 rounded-lg font-semibold
+ hover:bg-blue-50 transition duration-300">
+ Register Now
+ </a>
+ <a href="<%= more_info_path %>"
+ class="bg-white text-blue-600 px-8 py-3 rounded-lg font-semibold mx-4
+ hover:bg-blue-50 transition duration-300">
+ More Info
+ </a>
+ </div>
+ </div>
+ </section>
+ <section class="my-10 py-16 bg-gray-200">
+ <div class="container mx-auto px-4">
+ <h2 class="text-3xl font-bold text-center mb-12">Benefits</h2>
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
+ <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
+ <div class="w-full h-48 bg-gray-200"></div>
+ <div class="p-6">
+ <h3 class="text-xl font-semibold mb-2">High Quality Resources</h3>
+ <p class="text-gray-600 mb-4">Hand-made to ensure the highest quality resources. Clear and logical design.</p>
+ </div>
+ </div>
+
+ <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
+ <div class="w-full h-48 bg-gray-200"></div>
+ <div class="p-6">
+ <h3 class="text-xl font-semibold mb-2">Curriculum-focused</h3>
+ <p class="text-gray-600 mb-4">Resources designed for your specific curriculum.</p>
+ </div>
+ </div>
+
+ <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition duration-300">
+ <div class="w-full h-48 bg-gray-200"></div>
+ <div class="p-6">
+ <h3 class="text-xl font-semibold mb-2">Foundational knowledge for children</h3>
+ <p class="text-gray-600 mb-4">Designed for foundational knowledge for children.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+</div>
diff --git a/app/views/pages/more_info.html.erb b/app/views/pages/more_info.html.erb
new file mode 100644
index 0000000..cba5373
--- /dev/null
+++ b/app/views/pages/more_info.html.erb
@@ -0,0 +1,41 @@
+<div class="container mx-auto px-4 py-8 max-w-7xl">
+ <!-- Title with gradient similar to Featured Resources -->
+ <h1 class="text-4xl md:text-5xl font-bold text-center mb-12 bg-gradient-to-r from-blue-500 to-green-500 bg-clip-text text-transparent relative">
+ More Information
+ <!-- Underline effect -->
+ <span class="absolute bottom-0 left-1/2 transform -translate-x-1/2 w-24 h-1 bg-gradient-to-r from-blue-500 to-green-500 -mb-4"></span>
+ </h1>
+
+ <!-- Info Cards Container -->
+ <div class="grid grid-cols-1 md:grid-cols-1 gap-8 mt-12">
+ <!-- About Card -->
+ <div class="bg-white rounded-lg shadow-lg p-8 transform transition-transform duration-300 hover:-translate-y-2">
+ <div class="mt-12">
+ <div class="prose prose-lg mx-auto text-gray-500">
+ <h3 class="text-xl font-semibold text-gray-900">Why Register Now?</h3>
+ <p>By registering for an account today, you'll unlock exclusive benefits including:</p>
+ <ul>
+ <li>An automatic 50% discount on all purchases when we launch in January 2025</li>
+ <li>20 complimentary credits added to your account</li>
+ <li>Early access to new features and content</li>
+ </ul>
+ <h3 class="text-xl font-semibold text-gray-900 mt-8">What Happens Next?</h3>
+ <p>After you register:</p>
+ <ol>
+ <li>You'll receive an immediate email confirmation</li>
+ <li>Your account will be created with 20 credits ready to use</li>
+ <li>Your 50% launch discount will be automatically applied to your account</li>
+ <li>You'll be notified when we go live in January 2025</li>
+ </ol>
+ <div class="mt-8 flex justify-center">
+ <a href="<%= new_registration_path %>"
+ class="bg-white text-blue-600 px-8 py-3 rounded-lg font-semibold
+ hover:bg-blue-50 transition duration-300">
+ Register Now
+ </a>
+
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/config/routes.rb b/config/routes.rb
index 3455716..55ca8e8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,11 +1,17 @@
Rails.application.routes.draw do
+ get "home", to: "pages#home"
+ get "about", to: "pages#about"
+ get "faq", to: "pages#faq"
+ get "contact", to: "pages#contact"
+ get "terms", to: "pages#terms"
+ get "more-info", to: "pages#more_info"
resources :categories
resources :resource_types
resources :pdfresources
resources :users
resource :session
resources :passwords, param: :token
- resource :registration, only: [:new, :create]
+ resource :registration, only: [ :new, :create ]
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
@@ -17,5 +23,5 @@ Rails.application.routes.draw do
# get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
# Defines the root path route ("/")
- root "pdfresources#index"
+ root "pages#home"
end