placeholder root page
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -61,6 +61,7 @@ end
|
||||
group :development do
|
||||
# Use console on exceptions pages [https://github.com/rails/web-console]
|
||||
gem "web-console"
|
||||
gem "htmlbeautifier"
|
||||
|
||||
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
||||
gem "rack-mini-profiler", require: ["enable_rails_patches", "rack-mini-profiler"]
|
||||
|
||||
@@ -137,6 +137,7 @@ GEM
|
||||
railties (>= 6.0.0)
|
||||
thor (>= 0.14.1)
|
||||
webrick (>= 1.3)
|
||||
htmlbeautifier (1.4.2)
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
i18n (1.12.0)
|
||||
@@ -342,6 +343,7 @@ DEPENDENCIES
|
||||
disco
|
||||
faiss
|
||||
good_job
|
||||
htmlbeautifier
|
||||
http-cookie
|
||||
importmap-rails
|
||||
influxdb-client
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
before_action :validate_api_token
|
||||
before_action do
|
||||
if Rails.env.development?
|
||||
@site_title = "TheTitle"
|
||||
@site_subtitle = "Placeholder Tagline Here"
|
||||
else
|
||||
@site_title = "ReFurrer"
|
||||
@site_subtitle = "Furry Swiss Army Knife"
|
||||
end
|
||||
end
|
||||
|
||||
API_TOKENS = {
|
||||
"a4eb03ac-b33c-439c-9b51-a834d1c5cf48" => "dymk",
|
||||
|
||||
@@ -2,5 +2,10 @@ class PagesController < ApplicationController
|
||||
skip_before_action :validate_api_token, only: [:root]
|
||||
|
||||
def root
|
||||
if VpnOnlyRouteConstraint.new.matches?(request)
|
||||
render :root
|
||||
else
|
||||
render :under_construction
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class VpnOnlyRouteConstraint
|
||||
def matches?(request)
|
||||
return false if request.params[:force_vpn_off]
|
||||
if Rails.env.development?
|
||||
request.ip == "127.0.0.1" || request.ip == "::1"
|
||||
else
|
||||
|
||||
@@ -10,8 +10,19 @@
|
||||
<%= javascript_importmap_tags %>
|
||||
<%= yield :head %>
|
||||
</head>
|
||||
<body class="w-full mx-0">
|
||||
<main class="mx-auto w-full">
|
||||
<body class="h-full mx-0">
|
||||
<header class="bg-slate-100 border-slate-200 border-b-2">
|
||||
<div class="mx-auto max-w-5xl py-6 px-6 sm:px-8 flex items-baseline">
|
||||
<h1 class="text-4xl sm:text-5xl font-bold text-slate-900">
|
||||
<%= @site_title %>
|
||||
</h1>
|
||||
<div class="flex-grow"></div>
|
||||
<h2 class="text-1xl sm:text-2xl italic font-bold text-slate-500">
|
||||
<%= @site_subtitle %>
|
||||
</h2>
|
||||
</div>
|
||||
</header>
|
||||
<main class="h-full flex flex-col">
|
||||
<%= yield %>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
<div class="min-h-full">
|
||||
<header class="bg-white shadow">
|
||||
<div class="mx-auto max-w-5xl py-6 px-6 sm:px-8 flex items-baseline">
|
||||
<h1 class="text-4xl sm:text-5xl font-bold text-gray-900">ReFurrer</h1>
|
||||
<div class="flex-grow"></div>
|
||||
<h2 class="text-1xl sm:text-2xl italic font-bold text-gray-500">
|
||||
Furry Swiss Army Knife</h2>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="mx-auto max-w-5xl py-6 px-6 sm:px-8">
|
||||
<div class="mx-auto max-w-xl border-gray-800 rounded">
|
||||
<input
|
||||
class="rounded bg-gray-200 text-gray-900 w-full text-xl p-2 placeholder:italic"
|
||||
placeholder="FurAffinity Username"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div class='w-full mt-2 sm:mt-6'>
|
||||
<div class="block mx-auto w-full p-2
|
||||
sm:p-6 sm:border-2 sm:border-slate-100 sm:max-w-md rounded
|
||||
focus-within:border-slate-200 focus-within:shadow-md
|
||||
transition-all duration-75
|
||||
">
|
||||
<input class="w-full text-xl font-extralight p-4 outline-none rounded
|
||||
placeholder:italic transition-all duration-75
|
||||
border-slate-200 border-2 bg-slate-100 text-slate-900
|
||||
focus:border-slate-400"
|
||||
placeholder="Enter Username"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
11
app/views/pages/under_construction.html.erb
Normal file
11
app/views/pages/under_construction.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<main class="flex-grow flex w-full">
|
||||
<div class="
|
||||
max-w-5xl p-6 sm:p-8 justify-self-center self-center mx-auto
|
||||
text-4xl bg-gray-100 drop-shadow-2xl border-gray-400 border-2 text-gray-500
|
||||
hover:drop-shadow-md hover:bg-gray-50 hover:border-gray-500 hover:text-gray-600
|
||||
transition-all duration-75
|
||||
rounded italic font-extralight
|
||||
">
|
||||
Under Construction
|
||||
</div>
|
||||
</main>
|
||||
Reference in New Issue
Block a user