-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Develop
- Loading branch information
Showing
26 changed files
with
104 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,10 +48,25 @@ export default class Element { | |
await File.remove(dir, "cover"); | ||
await File.write(cover, dir, `cover.${extention}`); | ||
|
||
const metadata = await sharp(buf).metadata(); | ||
let { width, height } = metadata; | ||
if (width > height) { | ||
width = undefined; | ||
height = 288; | ||
} else if (width < height) { | ||
width = 190; | ||
height = undefined; | ||
} else { | ||
width = 190; | ||
height = undefined; | ||
} | ||
|
||
const webp288 = await sharp(buf, { animated: true }) | ||
.webp() | ||
// .resize(190, 288, { fit: "cover", withoutEnlargement: true }) | ||
.resize(288, 288, { fit: "inside", withoutEnlargement: true }) | ||
.webp({ quality: 100, smartSubsample: true }) | ||
.resize(width, height, { | ||
withoutEnlargement: true, | ||
fastShrinkOnLoad: true, | ||
}) | ||
.toBuffer(); | ||
await File.write(webp288, dir, "[email protected]"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,10 +51,27 @@ export default class Page { | |
await File.remove(dir, "cover"); | ||
await File.write(cover, dir, `cover.${extention}`); | ||
|
||
const metadata = await sharp(buf).metadata(); | ||
let { width, height } = metadata; | ||
if (width > height) { | ||
width = undefined; | ||
height = 288; | ||
} else if (width < height) { | ||
width = 190; | ||
height = undefined; | ||
} else { | ||
width = 190; | ||
height = undefined; | ||
} | ||
|
||
const webp288 = await sharp(buf, { animated: true }) | ||
.webp() | ||
// .resize(190, 288, { fit: "cover", withoutEnlargement: true }) | ||
.resize(288, 288, { fit: "inside", withoutEnlargement: true }) | ||
.webp({ quality: 100, smartSubsample: true }) | ||
// .resize(288, 288, { fit: "outside", withoutEnlargement: true }) | ||
.resize(width, height, { | ||
// fit: "outside", | ||
withoutEnlargement: true, | ||
fastShrinkOnLoad: true, | ||
}) | ||
.toBuffer(); | ||
await File.write(webp288, dir, "[email protected]"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ export default class Profile { | |
await File.write(avatar, dir, `avatar.${extention}`); | ||
|
||
const webp64 = await sharp(buf, { animated: true }) | ||
.webp() | ||
.webp({ quality: 100, smartSubsample: true }) | ||
.resize(64, 64, { fit: "cover", withoutEnlargement: true }) | ||
.toBuffer(); | ||
await File.write(webp64, dir, "[email protected]"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
:root { | ||
--gap-v: 6px; | ||
--gap-h: 4px; | ||
|
||
--gap-outter-v: 24px; | ||
--gap-outter-h: 16px; | ||
} | ||
|
||
.grid, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
.login { | ||
.login__form { | ||
grid-column: 1 / span 2; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
} | ||
form > p { | ||
margin: 0; | ||
} | ||
.login__signup-container { | ||
grid-column: 1 / span 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
flex-direction: column; | ||
gap: 8px; | ||
} | ||
.page__cover { | ||
width: fit-content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<a href="<%= it.url %>" class="button_url__container"> | ||
<button class="button button_url border-outter <%= it.className || '' %>"> | ||
<p><%= it.text || 'default-text' %></p> | ||
</button> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters