Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
Philippe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
Philippe
Commits
34161d9e
Unverified
Commit
34161d9e
authored
Jun 16, 2021
by
PLN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: NavLinks, adapt quality on home
parent
0c166881
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
35 deletions
+57
-35
.gitignore
.gitignore
+2
-0
NavLinks.js
components/NavLinks.js
+51
-0
index.js
pages/index.js
+1
-1
[id].js
pages/photos/[id].js
+3
-34
No files found.
.gitignore
View file @
34161d9e
...
@@ -5,3 +5,5 @@ node_modules/
...
@@ -5,3 +5,5 @@ node_modules/
# TODO: Video Content
# TODO: Video Content
*.MOV
*.MOV
*.mp4
*.mp4
.vercel
components/NavLinks.js
0 → 100644
View file @
34161d9e
import
Image
from
"next/image"
;
import
{
Box
,
Divider
,
Center
,
Text
,
Flex
,
Spacer
,
Button
,
}
from
"@chakra-ui/react"
;
import
Head
from
"next/head"
;
import
Link
from
"next/link"
;
function
NavLinks
({
prev
,
next
})
{
let
prevText
=
next
==
2
?
"Dernière"
:
"Précédente"
;
let
nextText
=
next
!=
1
?
"Suivante"
:
"Retour au début"
;
return
(
<
Center
p
=
"6"
justify
=
"space-between"
>
<
a
href
=
{
"/photos/"
+
prev
}
>
<
Button
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
mx
=
{
2
}
cursor
=
"pointer"
>
<
Text
mr
=
{
2
}
>
⟸
<
/Text
>
<
Text
>
{
prevText
}
<
/Text
>
<
/Button
>
<
/a
>
<
a
href
=
{
"/photos/"
+
next
}
>
<
Button
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
mx
=
{
2
}
cursor
=
"pointer"
>
<
Text
>
{
nextText
}
<
/Text
>
<
Text
ml
=
{
2
}
>
⟹
<
/Text
>
<
/Button
>
<
/a
>
<
/Center
>
);
}
export
default
NavLinks
;
pages/index.js
View file @
34161d9e
...
@@ -65,7 +65,7 @@ export default function Home({ data }) {
...
@@ -65,7 +65,7 @@ export default function Home({ data }) {
objectFit
=
"cover"
objectFit
=
"cover"
placeholder
=
"img/Diaporama/f5b1d804-3860-4073-b280-69e54985c66f.jpg"
placeholder
=
"img/Diaporama/f5b1d804-3860-4073-b280-69e54985c66f.jpg"
color
=
"gray.700"
color
=
"gray.700"
quality
=
{
10
0
}
quality
=
{
5
0
}
/
>
/
>
<
/a
>
<
/a
>
<
/WrapItem
>
<
/WrapItem
>
...
...
pages/photos/[id].js
View file @
34161d9e
...
@@ -12,6 +12,7 @@ import Image from "next/image";
...
@@ -12,6 +12,7 @@ import Image from "next/image";
import
Head
from
"next/head"
;
import
Head
from
"next/head"
;
import
Link
from
"next/link"
;
import
Link
from
"next/link"
;
import
BackHome
from
"../../components/BackHome"
;
import
BackHome
from
"../../components/BackHome"
;
import
NavLinks
from
"../../components/NavLinks"
;
import
{
InfoIcon
,
AtSignIcon
}
from
"@chakra-ui/icons"
;
import
{
InfoIcon
,
AtSignIcon
}
from
"@chakra-ui/icons"
;
import
{
Img
}
from
"@chakra-ui/react"
;
import
{
Img
}
from
"@chakra-ui/react"
;
...
@@ -60,7 +61,7 @@ export default function Photos({ pic }) {
...
@@ -60,7 +61,7 @@ export default function Photos({ pic }) {
<
/Head
>
<
/Head
>
<
BackHome
/>
<
BackHome
/>
<
Divider
my
=
"1rem"
/>
<
NavLinks
prev
=
{
pic
.
prev
}
next
=
{
pic
.
next
}
/
>
<
Center
>
<
Center
>
<
a
href
=
{
pic
.
path
}
>
<
a
href
=
{
pic
.
path
}
>
...
@@ -75,39 +76,7 @@ export default function Photos({ pic }) {
...
@@ -75,39 +76,7 @@ export default function Photos({ pic }) {
/>
/>
<
/a
>
<
/a
>
<
/Center
>
<
/Center
>
<
Divider
my
=
"1rem"
/>
<
NavLinks
prev
=
{
pic
.
prev
}
next
=
{
pic
.
next
}
/
>
<
Center
>
<
Box
p
=
"6"
>
<
a
href
=
{
"/photos/"
+
pic
.
prev
}
>
<
Button
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
cursor
=
"pointer"
m
=
"15px"
>
⟸
Pr
é
c
é
dente
<
/Button
>
<
/a
>
<
a
href
=
{
"/photos/"
+
pic
.
next
}
>
<
Button
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
cursor
=
"pointer"
m
=
"15px"
>
<
p
m
=
"1"
>
{
pic
.
next
!=
1
?
"Suivante "
:
"Retour au début "
}
<
/p
>
<
p
>
⟹
<
/p
>
<
/Button
>
<
/a
>
<
/Box
>
<
/Center
>
<
/Box
>
<
/Box
>
);
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment