Skip to content

Commit

Permalink
fix(): console errors and fixed size for images (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Dec 25, 2024
1 parent dd1f67c commit c9859d0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/components/Companies/companies.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#companies .imageContainer {
height: 180px;
width: 180px;
display: flex;
flex-direction: row;
align-items: center;
Expand All @@ -31,4 +32,11 @@
max-width: 100%;
display: flex;
justify-content: space-around;
}
}

@media (min-width: 400px) {
#companies a img {
width: 180px;
max-height: 180px;
}
}
5 changes: 5 additions & 0 deletions src/components/ContributorCard/contributorCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
.contributorCard img {
border-radius: 50%;
width: 90%;
height: 90%;
}

@media (min-width: 400px) {
.contributorCard {
width: 200px;
}
.contributorCard img {
width: 180px;
height: 180px;
}
}
13 changes: 13 additions & 0 deletions src/components/CoolCanvasBanner/setupCanvasBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,24 @@ import {
Group,
FabricObject,
Path,
Gradient,
classRegistry,
} from 'fabric/es';



export const setupCanvasBanner = ({ canvasEl, container }) => {
classRegistry.setClass(Path);
classRegistry.setSVGClass(Path);
classRegistry.setClass(Gradient, 'gradient');
classRegistry.setClass(Gradient, 'linear');
classRegistry.setClass(Gradient, 'radial');
FabricObject.ownDefaults.originX = 'center';
FabricObject.ownDefaults.originY = 'center';
FabricObject.ownDefaults.cornerStrokeColor = 'white';
FabricObject.ownDefaults.cornerStyle = 'circle';
FabricObject.ownDefaults.cornerColor = '#0C7CAC';
FabricObject.ownDefaults.transparentCorners = false;
const resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
if (entry.target === container) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header id="site-header">
<a id="logo" href="/">
<img alt="Fabric.js logo" src="/logo.svg" />
<img alt="Fabric.js logo" src="/logo.svg" width="200" height="63" />
</a>
<slot />
<nav>
Expand Down

0 comments on commit c9859d0

Please sign in to comment.