Shapes Background #164
No reviewers
Labels
No Label
a11y
Backlog
Blocked
Bug
Content
Dependencies
Design
Feature Request
Good First Issue
In Progress
Performance
Priority - High
Priority - Low
Priority - Medium
Untriaged
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: www/www-new#164
Loading…
Reference in New Issue
No description provided.
Delete Branch "feat/shapes-background"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
EDIT: We have decided to use randomly-generated shapes for most of the pages, instead of hard-coding the shapes backgrounds. The old to-do list of hard-coded backgrounds is retained for reference.
Closes #25
OLD TODO:
@ -93,2 +94,4 @@
return <div className={styles.page}>{props.children}</div>;
};
Home.getShapesConfig = (() => {
This does not seem scalable at all :'( Can we try to make it less hardcoded? I think 200 lines of code just to define shapes is not worth it.
@ -22,0 +29,4 @@
if (window.innerWidth <= 768) {
return mobileShapesConfig;
}
return aboutShapesConfig;
return window.innerWidth <= 768 ? mobileShapesConfig : aboutShapesConfig
@ -0,0 +155,4 @@
minAngle: 15,
maxAngle: 26,
},
triangleBig: {
Why is it not just
triangle
? Same for waves.triangleBig
is a different SVG file from the smallertriangle
. Scalingtriangle.svg
up to be really big caused the lines to be too thick, sotriangleBig.svg
has thinner lines which allow it to be scaled up without looking out of place. Same withwaves
/wavesBig
.@ -0,0 +208,4 @@
const colour = getRandomColour();
const opacity = getRandomOpacity(colour);
defaultConfig[shape]?.push({
nitpick:
and then you can remove
shapeTypes.forEach((shape) => (defaultConfig[shape] = []));
on 189WIP: Shapes Backgroundto Shapes Background@ -0,0 +271,4 @@
}
function getRandomOpacity(colour: "blue" | "teal"): number {
if (colour == "blue") {
===