Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/layout/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export default component$((props: { project: Project | null }) => {

<div
class="object-og u-cursor-pointer"
style="height: 200px;"
onClick$={async () => await nav(`/projects/${project.$id}`)}
>
<img src={AppwriteService.getProjectThumbnail(project.imageId)} />
Expand Down
3 changes: 1 addition & 2 deletions src/components/layout/ProjectFeatured.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ export default component$((props: { project: Project }) => {
<div class="u-flex-basis-50-percent u-flex-shrink-0">
<button
onClick$={async () => await nav(`/projects/${project.$id}`)}
class="object-og"
class="object-og object-og-rounded"
>
<img
src={AppwriteService.getProjectThumbnail(project.imageId, 1920)}
style="border-radius: var(--border-radius-medium);"
/>
</button>
</div>
Expand Down
25 changes: 17 additions & 8 deletions src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,34 @@
}

.object-og {
aspect-ratio: 1.8 / 1;
width: 100%;
height: 100%;
position: relative;
}

.object-og img {
display: block;
width: 100%;
object-fit: cover;
object-position: center;
aspect-ratio: 16 / 9;
}

.object-square {
aspect-ratio: 1 / 1;
.object-og::after {
display: block;
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: inset 0 0 0.5rem rgba(0, 0, 0, 0.1);
pointer-events: none;
}

.object-square img {
width: 100%;
height: 100%;
object-fit: cover;
.object-og-rounded {
border-radius: var(--border-radius-medium);
overflow: hidden;
display: inline-block;
}

.vertical-button {
Expand Down
6 changes: 3 additions & 3 deletions src/routes/projects/[projectId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ export default component$(() => {
/>
</div>
</div>
<div class="u-flex-vertical u-gap-24 u-width-full-line">
<div class="object-og u-width-full-line">

<div>
<div class="object-og object-og-rounded">
<img
style="border-radius: var(--border-radius-medium);"
src={AppwriteService.getProjectThumbnail(
projectData.value.project.imageId
)}
Expand Down