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
ef5c3390
Commit
ef5c3390
authored
Jun 23, 2021
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pages: Sync changes
parent
aabcab33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
51 deletions
+12
-51
index.js
pages/index.js
+5
-28
[id].js
pages/photos/[id].js
+7
-23
No files found.
pages/index.js
View file @
ef5c3390
...
...
@@ -37,13 +37,8 @@ export default function Home({ data, placeholders }) {
<
link
rel
=
"icon"
href
=
"/favicon.ico"
/>
<
Box
overflow
=
"hidden"
bg
=
"gray.100"
minH
=
"100vh"
>
<
Container
>
<
Image
src
=
"/img/signal-2021-06-09-200337_001.jpeg"
alt
=
"me"
width
=
"32"
height
=
"32"
/>
<
Text
as
=
"h1"
color
=
"gray.700"
fontWeight
=
"semibold"
mb
=
"1rem"
...
...
@@ -54,11 +49,11 @@ export default function Home({ data, placeholders }) {
Philippe
Bureau
-
Galerie
Photo
<
/Text
>
<
/Container
>
<
Wrap
px
=
"1rem"
spacing
=
{
"
4
px"
}
justify
=
"center"
>
<
Wrap
px
=
"1rem"
spacing
=
{
"
10
px"
}
justify
=
"center"
>
{
photos
.
map
((
photo
)
=>
(
<
WrapItem
key
=
{
"wrap-"
+
photo
.
id
}
boxShadow
=
"
dark-
lg"
boxShadow
=
"lg"
rounded
=
"10px"
overflow
=
"hidden"
m
=
{
3
}
...
...
@@ -67,13 +62,6 @@ export default function Home({ data, placeholders }) {
_hover
=
{{
boxShadow
:
"dark-lg"
,
rounded
:
"20px"
}}
>
<
Link
href
=
{
`/photos/
${
photo
.
id
}
`
}
>
{
/*<img
key={"img-" + path}
src={path}
height="200px"
width="80px"
color="gray.700"
/>*/
}
<
Image
key
=
{
photo
.
path
}
src
=
{
photo
.
path
}
...
...
@@ -81,21 +69,10 @@ export default function Home({ data, placeholders }) {
height
=
{
240
}
objectFit
=
"cover"
quality
=
{
20
}
placeholder
=
"blur"
//
placeholder="blur"
priority
blurDataURL
=
{
`
${
placeholders
[
photo
.
id
]}
`
}
//
blurDataURL={`${placeholders[photo.id]}`}
/>
{
/*<Image
key={"img-" + photo.path}
src={photo.path}
height="240px"
width="240px"
objectFit="cover"
placeholder="img/Diaporama/f5b1d804-3860-4073-b280-69e54985c66f.jpg"
color="gray.700"
quality={50}
/>*/
}
<
/Link
>
<
/WrapItem
>
))}
...
...
pages/photos/[id].js
View file @
ef5c3390
...
...
@@ -49,25 +49,9 @@ export async function getStaticProps({ params }) {
if
(
photo
.
dimensions
.
width
>
1000
||
photo
.
dimensions
.
heigth
>
1000
)
{
photo
.
dimensions
.
width
/=
2
;
photo
.
dimensions
.
height
/=
2
;
console
.
log
(
"Resized: "
,
photo
.
dimensions
.
width
,
photo
.
dimensions
.
height
);
// Fix dimensions if really big picture
console
.
log
(
"Pic dims: "
,
photo
.
dimensions
.
width
,
photo
.
dimensions
.
height
);
if
(
photo
.
dimensions
.
widths
>
1000
||
photo
.
dimensions
.
heigth
>
1000
)
{
photo
.
dimensions
.
width
/=
2
;
photo
.
dimensions
.
height
=
2
;
console
.
log
(
"Resized:"
,
photo
.
dimensions
.
width
,
photo
.
dimensions
.
height
);
}
if
(
photo
.
dimensions
.
width
>
1000
||
photo
.
dimensions
.
heigth
>
1000
)
{
photo
.
dimensions
.
width
/=
2
;
photo
.
dimensions
.
height
/=
2
;
console
.
log
(
"Resized 2:"
,
photo
.
dimensions
.
width
,
photo
.
dimensions
.
height
);
}
console
.
log
(
"Resized 2:"
,
photo
.
dimensions
.
width
,
photo
.
dimensions
.
height
);
}
// console.log("P/N:", photo.prev, photo.next);
return
{
props
:
{
photo
,
...
...
@@ -111,21 +95,21 @@ export default function Photos({ photo, placeholder }) {
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
fontSize
=
{[
"sm"
,
"md"
,
"lg"
,
"lg"
]}
size
=
{[
"sm"
,
"md"
,
"lg"
,
"lg"
]}
cursor
=
"pointer"
m
=
"15px"
>
⟸
Pr
é
c
é
dente
<
/Button
>
<
/Link
>
<
Link
href
=
{
"/photos/"
+
photo
.
next
}
m
=
"15px"
>
<
Link
href
=
{
"/photos/"
+
photo
.
prev
}
>
<
Button
as
=
"a"
borderRadius
=
"full"
colorScheme
=
"gray"
fontSize
=
"xl"
size
=
"lg"
fontSize
=
{[
"sm"
,
"md"
,
"lg"
,
"lg"
]}
size
=
{[
"sm"
,
"md"
,
"lg"
,
"lg"
]}
cursor
=
"pointer"
m
=
"15px"
>
...
...
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