Landing page

This commit is contained in:
Tejas Panchal
2025-07-24 19:41:17 +05:30
parent 1c0e1cfe14
commit d502d2dbc5
161 changed files with 14116 additions and 12747 deletions

View File

@@ -0,0 +1,227 @@
/* Base styles */
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
color: white;
}
/* Container and background */
.splash-container {
min-height: 100vh;
width: 100%;
position: relative;
background: url('/splash.jpg') no-repeat center center fixed;
background-size: cover;
display: flex;
justify-content: center;
align-items: flex-start;
padding: 0 30px;
}
.splash-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 1;
}
.content-wrapper {
position: relative;
z-index: 2;
width: 100%;
max-width: 800px;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 140px;
}
/* Logo */
.logo-container {
margin-bottom: 30px;
}
.logo {
height: 75px;
width: auto;
}
/* Search */
.search-container {
width: 100%;
max-width: 500px;
position: relative;
margin-bottom: 24px;
}
.search-input {
width: 100%;
padding: 14px 48px 14px 20px;
background: rgba(17, 17, 17, 0.75);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: white;
font-size: 16px;
outline: none;
transition: border-color 0.2s;
}
.search-input:focus {
border-color: rgba(255, 255, 255, 0.3);
}
.search-input::placeholder {
color: rgba(255, 255, 255, 0.5);
}
.search-button {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
padding: 0;
font-size: 18px;
transition: color 0.2s;
}
.search-button:hover {
color: white;
}
/* Enter button */
.enter-button {
background: white;
color: black;
padding: 12px 24px;
border-radius: 8px;
text-decoration: none;
font-weight: 500;
margin: 8px 0 60px;
transition: background-color 0.2s;
}
.enter-button:hover {
background: #ffbade;
}
/* FAQ Section */
.faq-section {
width: 100%;
max-width: 700px;
}
.faq-title {
font-size: 32px;
font-weight: 700;
text-align: center;
margin-bottom: 40px;
color: white;
}
.faq-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.faq-item {
background: #141414;
border-radius: 12px;
overflow: hidden;
border: 1px solid #1a1a1a;
}
.faq-question {
width: 100%;
padding: 18px 24px;
display: flex;
justify-content: space-between;
align-items: center;
background: none;
border: none;
color: white;
font-size: 17px;
text-align: left;
cursor: pointer;
transition: all 0.2s ease;
}
.faq-question:hover {
background: #1a1a1a;
}
.faq-toggle {
font-size: 16px;
color: white;
opacity: 0.8;
transition: transform 0.2s ease;
}
.faq-toggle.rotate {
transform: rotate(180deg);
}
.faq-answer {
padding: 0 24px 18px;
color: rgba(255, 255, 255, 0.7);
line-height: 1.6;
font-size: 15px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.content-wrapper {
padding-top: 100px;
}
.logo {
height: 60px;
}
.search-input {
padding: 12px 40px 12px 16px;
font-size: 15px;
}
.faq-title {
font-size: 24px;
margin-bottom: 24px;
}
}
@media (max-width: 480px) {
.content-wrapper {
padding-top: 80px;
}
.logo {
height: 50px;
}
.search-input {
padding: 12px 36px 12px 14px;
font-size: 14px;
}
.enter-button {
padding: 10px 20px;
font-size: 14px;
}
.faq-question {
padding: 16px;
font-size: 15px;
}
.faq-answer {
padding: 0 16px 16px;
font-size: 14px;
}
}

View File

@@ -0,0 +1,107 @@
import { useState, useCallback } from "react";
import { Link, useNavigate } from "react-router-dom";
import "./SplashScreen.css";
import logoTitle from "@/src/config/logoTitle";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faMagnifyingGlass, faChevronDown } from "@fortawesome/free-solid-svg-icons";
const FAQ_ITEMS = [
{
question: "Is JustAnime safe?",
answer: "Yes, JustAnime is completely safe to use. We ensure all content is properly scanned and secured for our users."
},
{
question: "What makes JustAnime the best site to watch anime free online?",
answer: "JustAnime offers high-quality streaming, a vast library of anime, no intrusive ads, and a user-friendly interface - all completely free."
},
{
question: "How do I request an anime?",
answer: "You can submit anime requests through our contact form or by reaching out to our support team."
}
];
function SplashScreen() {
const navigate = useNavigate();
const [search, setSearch] = useState("");
const [expandedFaq, setExpandedFaq] = useState(null);
const handleSearchSubmit = useCallback(() => {
const trimmedSearch = search.trim();
if (!trimmedSearch) return;
const queryParam = encodeURIComponent(trimmedSearch);
navigate(`/search?keyword=${queryParam}`);
}, [search, navigate]);
const handleKeyDown = useCallback(
(e) => {
if (e.key === "Enter") {
handleSearchSubmit();
}
},
[handleSearchSubmit]
);
const toggleFaq = (index) => {
setExpandedFaq(expandedFaq === index ? null : index);
};
return (
<div className="splash-container">
<div className="splash-overlay"></div>
<div className="content-wrapper">
<div className="logo-container">
<img src="/logo.png" alt={logoTitle} className="logo" />
</div>
<div className="search-container">
<input
type="text"
placeholder="Search anime..."
className="search-input"
value={search}
onChange={(e) => setSearch(e.target.value)}
onKeyDown={handleKeyDown}
/>
<button
className="search-button"
onClick={handleSearchSubmit}
aria-label="Search"
>
<FontAwesomeIcon icon={faMagnifyingGlass} />
</button>
</div>
<Link to="/home" className="enter-button">
Enter Homepage
</Link>
<div className="faq-section">
<h2 className="faq-title">Frequently Asked Questions</h2>
<div className="faq-list">
{FAQ_ITEMS.map((item, index) => (
<div key={index} className="faq-item">
<button
className="faq-question"
onClick={() => toggleFaq(index)}
>
<span>{item.question}</span>
<FontAwesomeIcon
icon={faChevronDown}
className={`faq-toggle ${expandedFaq === index ? 'rotate' : ''}`}
/>
</button>
{expandedFaq === index && (
<div className="faq-answer">
{item.answer}
</div>
)}
</div>
))}
</div>
</div>
</div>
</div>
);
}
export default SplashScreen;