Skip to content

Commit

Permalink
feat: add Slides
Browse files Browse the repository at this point in the history
  • Loading branch information
theanishtar committed Oct 5, 2024
1 parent 426f97f commit 970a1d4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/header/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import Image from 'next/image';
// import Image from 'next/image';
import '@/styles/header.css';

export default function Header() {
Expand All @@ -9,7 +9,7 @@ export default function Header() {

<div className="header" id="header">
<div className="logo">
<Image src="/img/ico/frog-bc.png" alt="F8" />
<img src="/img/ico/frog-bc.png" alt="F8" />
<h1 className=""><a className="_subTitle_vdbp4_58 d-lg-none" href="/"> <Link href={"/"}>DaviLands</Link> </a></h1>
</div>

Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Header from '@/app/header/page';
import Menu from '@/app/menu/page';
import Footer from '@/app/footer/page';
import Login from '@/app/login/page';
import Slides from '@/app/slider/page';
import Link from 'next/link';
const inter = Inter({ subsets: ['latin'] })

Expand Down Expand Up @@ -41,6 +42,7 @@ export default function RootLayout({
<body>
<Header />

{/* <Slides /> */}
<div className="main">
<Menu />
{/* <Login /> */}
Expand Down
24 changes: 14 additions & 10 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import Image from 'next/image';
import Slides from '@/app/slider/page';
// import Image from 'next/image';
import Link from 'next/link';
import '@/styles/slider.css';
import '@/styles/post-viral.css';
Expand All @@ -10,6 +11,9 @@ export default function Home() {

return (
<div>

{/* <Slides /> */}

<div id="slider">
<div className="left">
<div className="text-content">
Expand All @@ -32,7 +36,7 @@ export default function Home() {
</div>

<div className="right">
<Image src="/img/facion/frog-techs.gif" alt="Description of image" />
<img src="/img/facion/frog-techs.gif" alt="Description of image" />
</div>
</div>

Expand All @@ -47,7 +51,7 @@ export default function Home() {
<div className="cards">
<div className="card">
<div className="card-header">
<Image src="/img/blog/img/banner.png" alt="rover" />
<img src="/img/blog/img/banner.png" alt="rover" />
</div>
<div className="card-body">
<span className="tag tag-teal">Technology</span>
Expand All @@ -58,7 +62,7 @@ export default function Home() {
ExpressJS, Ejs, MySQL, MongoDB
</p>
<div className="user">
<Image
<img
src="https://yt3.ggpht.com/a/AGF-l7-0J1G0Ue0mcZMw-99kMeVuBmRxiPjyvIYONg=s900-c-k-c0xffffffff-no-rj-mo"
alt="user" />
<div className="user-info">
Expand All @@ -70,7 +74,7 @@ export default function Home() {
</div>
<div className="card">
<div className="card-header">
<Image src="/img/blog/img/laravel-socket.10ac0667.png" alt="ballons" />
<img src="/img/blog/img/laravel-socket.10ac0667.png" alt="ballons" />
</div>
<div className="card-body">
<span className="tag tag-purple">Popular</span>
Expand All @@ -82,7 +86,7 @@ export default function Home() {
deal with that fear.
</p>
<div className="user">
<Image src="https://lh3.googleusercontent.com/ogw/ADGmqu8sn9zF15pW59JIYiLgx3PQ3EyZLFp5Zqao906l=s32-c-mo"
<img src="https://lh3.googleusercontent.com/ogw/ADGmqu8sn9zF15pW59JIYiLgx3PQ3EyZLFp5Zqao906l=s32-c-mo"
alt="user" />
<div className="user-info">
<h5>Eyup Ucmaz</h5>
Expand All @@ -93,7 +97,7 @@ export default function Home() {
</div>
<div className="card">
<div className="card-header">
<Image src="/img/blog/img/main.png" alt="city" />
<img src="/img/blog/img/main.png" alt="city" />
</div>
<div className="card-body">
<span className="tag tag-pink">Design</span>
Expand All @@ -104,7 +108,7 @@ export default function Home() {
Dashboard Design Guidelines
</p>
<div className="user">
<Image src="https://studyinbaltics.ee/wp-content/uploads/2020/03/3799Ffxy.jpg" alt="user" />
<img src="https://studyinbaltics.ee/wp-content/uploads/2020/03/3799Ffxy.jpg" alt="user" />
<div className="user-info">
<h5>Carrie Br/ewer</h5>
<small>1w ago</small>
Expand All @@ -114,7 +118,7 @@ export default function Home() {
</div>
<div className="card">
<div className="card-header">
<Image src="/img/blog/img/SummaryTable-of-System-Design-for-API-design.421e3983.png" alt="city" />
<img src="/img/blog/img/SummaryTable-of-System-Design-for-API-design.421e3983.png" alt="city" />
</div>
<div className="card-body">
<span className="tag tag-pink">Design</span>
Expand All @@ -125,7 +129,7 @@ export default function Home() {
Dashboard Design Guidelines
</p>
<div className="user">
<Image src="https://studyinbaltics.ee/wp-content/uploads/2020/03/3799Ffxy.jpg" alt="user" />
<img src="https://studyinbaltics.ee/wp-content/uploads/2020/03/3799Ffxy.jpg" alt="user" />
<div className="user-info">
<h5>Carrie Br/ewer</h5>
<small>1w ago</small>
Expand Down
14 changes: 7 additions & 7 deletions app/slider/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import Link from 'next/link';
import { useState, useEffect } from 'react';
import '@/styles/menu.css';
import '@/styles/slides.css';

export default function Slider() {
export default function Slides() {
const [slideIndex, setSlideIndex] = useState(1); // Đặt trạng thái cho slideIndex

useEffect(() => {
Expand Down Expand Up @@ -46,7 +46,7 @@ export default function Slider() {
return (
<div className="slider-container">
<div className="slides" id="slideContainer">
<div className="slide slide-3">
<div className="slide 3">
<div className="left">
<p className="title">Trang 3</p>
<p className="desc">Lorem, ipsum dolor sit amet consectetur adipisicing elit...</p>
Expand All @@ -57,7 +57,7 @@ export default function Slider() {
</div>
</div>

<div className="slide slide-1">
<div className="slide 1">
<div className="left">
<p className="title">Đây là tiêu đề</p>
<p className="desc">Lorem, ipsum dolor sit amet consectetur adipisicing elit...</p>
Expand All @@ -68,7 +68,7 @@ export default function Slider() {
</div>
</div>

<div className="slide slide-2">
<div className="slide 2">
<div className="left">
<p className="title">Trang 2</p>
<p className="desc">Lorem, ipsum dolor sit amet consectetur adipisicing elit...</p>
Expand All @@ -79,7 +79,7 @@ export default function Slider() {
</div>
</div>

<div className="slide slide-3">
<div className="slide 3">
<div className="left">
<p className="title">Trang 3</p>
<p className="desc">Lorem, ipsum dolor sit amet consectetur adipisicing elit...</p>
Expand All @@ -91,7 +91,7 @@ export default function Slider() {
</div>

{/* Slide "ảo" (sao chép từ slide đầu tiên) */}
<div className="slide slide-1">
<div className="slide 1">
<div className="left">
<p className="title">Đây là tiêu đề</p>
<p className="desc">Lorem, ipsum dolor sit amet consectetur adipisicing elit...</p>
Expand Down

0 comments on commit 970a1d4

Please sign in to comment.