Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Certificate issue fixes #498

Merged
merged 3 commits into from
Jan 19, 2024
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
Binary file added lms/static/certificates/images/certificate-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion lms/static/certificates/sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ body {
height: 100%;
margin: 0;
padding: 0;
background: $white;
background: $body-bg;
color: $primary;
font-family: $font-family-sans;
}

body { min-width: 320px; }

// ------------------------------
// #TYPOGRAPHY
// ------------------------------
Expand Down
1 change: 1 addition & 0 deletions lms/static/certificates/sass/_build.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
@import 'layouts';
@import 'views';
@import 'print';
@import 'sdaia-template';
@import 'overrides';
16 changes: 9 additions & 7 deletions lms/static/certificates/sass/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,33 +91,35 @@

// message to user-centric banner
.wrapper-banner-user {
box-shadow: inset 0 rem(2) rem(2) 0 $black;
background: $gray-dark;
position: relative;
}

.banner-user {
.message-title {
color: $white;
font-weight: 600;
margin-top: 0;
}

.message-copy {
color: $white;
position: relative;
}

.message-actions .action {
@include button-outline-variant($gray-x-back, $gray-dark);

background: $primary;
color: #fff;
padding: 0.625rem;
font-size: rem(14);
transition: color 0.125s ease-in-out 0s, border-color 0.125s ease-in-out 0s, background 0.125s ease-in-out 0s, box-shadow 0.125s ease-in-out 0s;
border: 1px solid;
border-radius: 3px;
border-radius: 5px;
cursor: pointer;
font-family: $font-family-sans;
font-weight: 600;

&:hover {
background: $secondary;
}

.icon {
@include margin-right(map-get($spacing-horizontal, x-small));

Expand Down
29 changes: 28 additions & 1 deletion lms/static/certificates/sass/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ $gray-transparent: rgba(65, 65, 65, 0.5);
$primary-accent: rgba(41, 145, 195, 100);
$primary-back: rgba(204, 227, 240, 100);

$body-bg: #f9f8f5;
$primary: #1c355e;
$secondary: #ea6852;
$success: #31b994;

// certificate characteristics
$cert-base-color: $gray-dark;
$cert-distinguished-color: $primary-accent;
Expand Down Expand Up @@ -121,9 +126,31 @@ $font-path: '../../certificates/fonts';
url('#{$font-path}/OpenSans/OpenSans-BoldItalic-webfont.ttf') format('truetype');
}

@font-face {
font-family: 'DIN Next LT Arabic';
src: url('#{$font-path}/Din/DIN-Next-LT-Arabic-Medium.woff2') format('woff2'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Medium.woff') format('woff'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Medium.ttf') format('truetype'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Medium.eot') format('truetype'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Medium.svg#din-next-lt-arabic-medium') format('svg');
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: 'DIN Next LT Arabic';
src: url('#{$font-path}/Din/DIN-Next-LT-Arabic-Bold.woff2') format('woff2'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Bold.woff') format('woff'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Bold.ttf') format('truetype'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Bold.eot') format('truetype'),
url('#{$font-path}/Din/DIN-Next-LT-Arabic-Bold.svg#din-next-lt-arabic-bold') format('svg');
font-weight: 700;
font-style: normal;
}

// typography: config - stacks
$font-family-serif: 'Domine', serif;
$font-family-sans: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
$font-family-sans: "DIN Next LT Arabic", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

// vertical spacing
$baseline-vertical: 2.5rem !default;
Expand Down
252 changes: 252 additions & 0 deletions lms/static/certificates/sass/_sdaia-template.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
html {
-webkit-text-size-adjust: 100%; /* 2 */
}

h1 {
font-size: 2em;
margin: 0.67em 0;
}

a {
background-color: transparent;
}

b,
strong {
font-weight: 500;
}

img {
border-style: none;
max-width: 100%;
height: auto;
}

.hidden,
[hidden] {
display: none;
}

.text-primary {
color: $success;
}

.text-secondary {
color: $secondary;
}


.certificate-wrapper {
background: url(../images/certificate-bg.png) no-repeat;
background-size: 100% 100%;
padding: 174px 11.9% 179px;
color: $primary;
font-weight: 500;
margin: 0 auto;
line-height: 1.15;

@include media-breakpoint-down(sm) {
padding: 100px 11.9%;
}

* {
box-sizing: border-box;
}
}

.certificate-wrapper * {
box-sizing: border-box;
}

.certificate-header {
overflow: hidden;
padding: 0 0 66px;

@include media-breakpoint-down(sm) {
padding: 0;
}

img {
vertical-align: middle;

@include media-breakpoint-down(sm) {
width: 120px;
}

@include media-breakpoint-down(xs) {
display: block;
margin: 0 auto 10px;
}

&.sdaia-academy-logo {
@include margin-right(19px);

@include media-breakpoint-down(sm) {
width: 150px;
}

@include media-breakpoint-down(xs) {
@include margin-right(auto);
}
}
}
}

.certificate-header-col {
float: right;
padding: 0 12px 0 0;

@include media-breakpoint-down(sm) {
float: none;
padding: 0 0 10px;
text-align: center;
}

&:first-child {
float: left;
padding: 2px 0 0 115px;

@include media-breakpoint-down(md) {
padding: 2px 0 0 47px;
}

@include media-breakpoint-down(sm) {
float: none;
padding: 0 0 10px;
text-align: center;
}
}
}

.certificate-heading {
padding: 0 0 33px;

@include media-breakpoint-down(sm) {
padding: 0;
}

h1 {
font-size: 71px;
margin: 0 0 17px;

@include media-breakpoint-down(sm) {
font-size: 40px;
}
}

.subtitle {
display: block;
font-size: 27px;
margin: 0 0 30px;

@include media-breakpoint-down(sm) {
font-size: 22px;
margin: 0 0 15px;
}

@include media-breakpoint-down(xs) {
font-size: 18px;
}
}
}

.certificate-body { text-align: center; }

.certificate-main {
overflow: hidden;

p,
h2 {
margin: 0 0 30px;
font-size: 38px;
font-weight: 500;

@include media-breakpoint-down(sm) {
margin: 0 0 15px;
font-size: 20px;
}

@include media-breakpoint-down(xs) {
margin: 0 0 10px;
font-size: 18px;
}
}

.sub-title,
.main-title {
margin: 0 0 34px;

@include media-breakpoint-down(sm) {
margin: 0 0 20px;
}
}

.limited-text {
max-width: 900px;
margin: 0 auto 97px;
text-align: right;

@include media-breakpoint-down(sm) {
margin: 0 0 40px;
}

@include media-breakpoint-down(xs) {
margin: 0 0 20px;
}

.text-secondary {
margin: 0 13px;

@include media-breakpoint-down(sm) {
margin: 0 6px;
}
}
}
}

@media print {
body {
margin: 0;
}

.certificate-header-col {

&:first-child {
padding-left: 100px;
}
}

.certificate-header {
padding: 0 0 40px;
}

.certificate-heading {
padding: 0;

h1 {
font-size: 50px;
}
}

.certificate-main {

p,
h2 {
margin: 0 0 25px;
font-size: 30px;
font-weight: 500;
}

.main-title {
margin: 0 0 25px;
}

.limited-text {
margin: 0 auto 50px;
}
}

.certificate-wrapper {
padding: 120px 11.9%;
}
}
Binary file removed lms/static/images/certificate-bg.png
Binary file not shown.
Loading
Loading