generated from lucien/actix-react-template
Compare commits
2 commits
4e7259ae28
...
2adacceac5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2adacceac5 | ||
![]() |
de11f64cc3 |
6 changed files with 50 additions and 6 deletions
BIN
front/public/pictures/sea.gif
Normal file
BIN
front/public/pictures/sea.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 868 KiB |
|
@ -16,7 +16,7 @@ export default function Button({ onClick, color, children }: ButtonProps) {
|
|||
cursor: 'pointer',
|
||||
display: 'inline-block',
|
||||
fontFamily: '"Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
||||
fontSize: '14px',
|
||||
fontSize: '20px',
|
||||
fontWeight: '500',
|
||||
lineHeight: '20px',
|
||||
listStyle: 'none',
|
||||
|
|
|
@ -9,6 +9,7 @@ export default function ClickableLink({url, text}: ClickableLinkProps) {
|
|||
backgroundColor: "transparent",
|
||||
borderRadius: '8px',
|
||||
borderWidth: '0',
|
||||
color:"purple",
|
||||
cursor: 'pointer',
|
||||
display: 'inline-block',
|
||||
fontFamily: '"Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
||||
|
|
38
front/src/components/FstSection.tsx
Normal file
38
front/src/components/FstSection.tsx
Normal file
|
@ -0,0 +1,38 @@
|
|||
import Button from "./Button";
|
||||
import NavBar from "./NavBar";
|
||||
|
||||
interface FstSectionProps {
|
||||
centertxt: string;
|
||||
txtbt1:string;
|
||||
txtbt2:string;
|
||||
image:string;
|
||||
}
|
||||
|
||||
export default function FstSection ({centertxt, txtbt1, txtbt2, image}: FstSectionProps) {
|
||||
return (
|
||||
<div style={{
|
||||
textAlign: "center",
|
||||
color: "yellow",
|
||||
backgroundImage: image,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
height: "75vh"}}>
|
||||
<NavBar />
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<div style={{height:"150px"}} />
|
||||
<h1>{centertxt}</h1><br />
|
||||
<div style={{display:"flex", justifyContent: "center", gap: "20px"}}>
|
||||
<Button onClick={() => alert("One")} color="primary" children={txtbt1} />
|
||||
<Button onClick={() => {alert("Two")}} color="secondary" children={txtbt2} />
|
||||
</div>
|
||||
</div></div>
|
||||
)
|
||||
}
|
|
@ -4,14 +4,14 @@ import RoundButton from './RoundButton.tsx';
|
|||
|
||||
export default function NavBar(){
|
||||
return (
|
||||
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}>
|
||||
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between"}}>
|
||||
<div style={{ display : "flex", alignItems: "center", flexDirection: "row"}}>
|
||||
<LogoButton url="https://archlinux.org" logo = "https://archlinux.org/static/hetzner_logo.41114a37d25f.png"/>
|
||||
<ClickableLink url="https://archlinux.org" text = "Prout" />
|
||||
<ClickableLink url="https://archlinux.org" text = "Prout2" />
|
||||
</div>
|
||||
<div style={{ display : "flex", alignItems: "center", flexDirection: "row"}}>
|
||||
<RoundButton url="https://archlinux.org" bgcolor="transparent" text="?"/>
|
||||
<RoundButton url="https://archlinux.org" bgcolor="purple" text="?"/>
|
||||
</div>
|
||||
</nav>);
|
||||
}
|
|
@ -1,14 +1,19 @@
|
|||
import ArticlesSection from '../components/ArticlesSection.tsx'
|
||||
import NavBar from '../components/NavBar.tsx'
|
||||
import Footer from '../components/Footer.tsx'
|
||||
import FstSection from '../components/FstSection.tsx'
|
||||
|
||||
export default function MainPage() {
|
||||
return (
|
||||
<>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', minHeight: '100vh' }}>
|
||||
<NavBar />
|
||||
<FstSection
|
||||
centertxt="Choisissez votre numéro :"
|
||||
txtbt1="Un"
|
||||
txtbt2="Deux"
|
||||
image="url('/pictures/sea.gif')"/>
|
||||
<div style={{height:"30px"}} />
|
||||
<ArticlesSection />
|
||||
<Footer bgcolor="blue"/>
|
||||
<Footer bgcolor="lightblue"/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue