diff --git a/src/components/Course/components/Ceritficate/Design.svelte b/src/components/Course/components/Ceritficate/Design.svelte index 7319fc3e..ae5b7723 100644 --- a/src/components/Course/components/Ceritficate/Design.svelte +++ b/src/components/Course/components/Ceritficate/Design.svelte @@ -12,34 +12,38 @@ import { course } from '../../store'; import { currentOrg } from '../../../../utils/store/org'; - const professional = './professional.svg'; - const plain = './plain.svg'; - const student = 'Name of student'; + const studentNamePlaceholder = 'Name of student'; - const themes = [ - { label: 'professional', src: professional }, - { label: 'plain', src: plain }, - ]; + const themes = ['professional', 'plain']; - let Selectedtheme = themes[0]; let isSaving = false; const saveCertificate = () => { // set isSaving to true // Validation - make sure description isn't empty /** - * Update course description and is_certificate_downloadable (like in src/components/Course/components/Settings/index.svelte) + * Update course description, is_certificate_downloadable and certificate_theme (like in src/components/Course/components/Settings/index.svelte) * * await updateCourse($course.id, undefined, { description: $course.description, - is_certificate_downloadable: $course.is_certificate_downloadable + is_certificate_downloadable: $course.is_certificate_downloadable, + certificate_theme: $course.certificate_theme }); * */ // set isSaving to false }; -
+ + + + + + +
@@ -48,20 +52,16 @@ >Certificate settings

Choose a theme

- - {#each themes as value} + + {#each themes as theme}
- - themes + + themes
{/each}

Brand Logo

-

- We recommend using a PNG file with transparency. Maximum size: 512px x - 512px. -

To update your brand image, go to goto(`org/${$currentOrg.siteName}/settings`)} />

@@ -90,19 +90,19 @@ class="my-4" size="sm" > - Student access - Student access + Locked + Unlocked
-
- {#if Selectedtheme.label == 'professional'} - +
+ {#if $course.certificate_theme === 'professional'} + {:else} - + {/if}
@@ -121,11 +121,11 @@ p { color: #262626; } - .certContainer { + .certificate-container { width: 95%; max-width: 95%; } - .certbg { + .certificate-bg { background-color: #f5f8fe; } diff --git a/src/components/Course/components/Ceritficate/certificates/Plain.svelte b/src/components/Course/components/Ceritficate/certificates/Plain.svelte index 44f53bb7..75627219 100644 --- a/src/components/Course/components/Ceritficate/certificates/Plain.svelte +++ b/src/components/Course/components/Ceritficate/certificates/Plain.svelte @@ -9,25 +9,25 @@
logo

{$currentOrg.name}

Certificate of completion

This is to certify that

-

{studentName}

+

{studentName}

@@ -46,6 +46,9 @@