Skip to content

Commit

Permalink
changed button and file size (#566)
Browse files Browse the repository at this point in the history
* changed button and file size

changed file size and added descriptive information to button

* removed lazy loading for the carousel, and changed size of carousel on pc
  • Loading branch information
MariaBonde authored Sep 3, 2024
1 parent 7c30a8a commit d82e2db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/hemsedal24/bilder.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@
--tw-ring-color: transparent;
}

.customButton > *[data-ut-element='allowed-content'] {
display: none;
}

.container {
display: grid;
grid-template-columns: repeat(4, 1fr); /* Four columns */
Expand Down Expand Up @@ -166,7 +162,7 @@
align-items: center;
}
.embla__slide {
flex: 0 0 60%;
flex: 0 0 40%;
width: 100%;
user-select: none;
padding-left: 3rem;
Expand Down Expand Up @@ -259,8 +255,7 @@ html {
}

.customButton > *[data-ut-element='button'] {
width: 19.5rem;
height: 3.375rem;
width: 50%;
}

.customButton > *[data-ut-element='button'][data-state='readying'],
Expand All @@ -284,6 +279,10 @@ html {
.lastoppbilder img {
width: 120%;
}
.tilbake,
.lastoppbilder {
width: 100%;
}

@-moz-document url-prefix() {
.uploadDropZone {
Expand Down
2 changes: 1 addition & 1 deletion src/hemsedal24/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Files({ data }: any) {
<div className={styles.embla__container}>
{data.files.map((file:any) =>
<div key = {file.id} className={styles.embla__slide}>
<img loading="lazy" src={`https://utfs.io/f/${file.key}`} alt={`${file.name}`}/>
<img src={`https://utfs.io/f/${file.key}`} alt={`${file.name}`}/>
</div>
)}
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/hemsedal24/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default function Upload() {
onUploadError={(error: Error) => {
alert(`En feil har skjedd. Feilmelding: ${error.message}`);
}}
content={{allowedContent() {
return 'Bilder opp til 16MB, maks 20 om gangen'
}}}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/server/uploadthing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const f = createUploadthing({
export const uploadRouter = {
videoAndImage: f({
image: {
maxFileSize: "8MB",
maxFileSize: "16MB",
maxFileCount: 20,
},
video: {
Expand Down

0 comments on commit d82e2db

Please sign in to comment.