forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: convert html template to pdf using pdfkit
- Loading branch information
Muhammad Faraz Maqsood
authored and
Muhammad Faraz Maqsood
committed
Jul 24, 2024
1 parent
4c2e90c
commit eb814cf
Showing
3 changed files
with
555 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,272 @@ | ||
html { | ||
-webkit-text-size-adjust: 100%; /* 2 */ | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 200; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 300; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 400; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 500; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 600; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Diodrum'; | ||
font-weight: 700; | ||
src: url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]'); | ||
src: | ||
url('http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]') format('truetype'); | ||
} | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.primary-color { | ||
color: #32b994; | ||
} | ||
.black-color { | ||
color: #1c355e; | ||
} | ||
.flex-small { | ||
display: flex; | ||
flex-shrink: 0; | ||
gap: 4px; | ||
} | ||
.text-align{ | ||
text-align: right; | ||
} | ||
.diodrumFontFamily{ | ||
font-family: Diodrum; | ||
font-weight: 500; | ||
} | ||
.stronger{ | ||
font-weight: 700; | ||
} | ||
.certificateWrapper { | ||
background: url("http://local.overhang.io:8000/asset-v1:Arbisoft+SE001+2024_S1+type@[email protected]") no-repeat; | ||
padding: 130px 12% 150px; | ||
background-size: 100% 100%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 60px; | ||
|
||
.sdaia-academy-logo { | ||
width: 240px; | ||
} | ||
.sdaia-logo { | ||
width: 190px; | ||
} | ||
|
||
&__bodywraper { | ||
width: 100%; | ||
max-width: 1100px; | ||
margin: 0 auto; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 30px; | ||
} | ||
&__header { | ||
display: flex; | ||
justify-content: space-between; | ||
gap: 10px; | ||
} | ||
|
||
&__mainTitleWrap { | ||
text-align: center; | ||
color: #32b994; | ||
display: flex; | ||
flex-direction: column; | ||
font-size: 45px; | ||
} | ||
&__titleAr { | ||
font-weight: 100; | ||
} | ||
&__title { | ||
font-weight: bold; | ||
} | ||
|
||
&__subTitleWrap { | ||
display: flex; | ||
justify-content: space-between; | ||
font-size: 22px; | ||
color: #1c355e; | ||
font-weight: bold; | ||
flex-direction: column; | ||
} | ||
&__personName { | ||
font-size: 30px; | ||
} | ||
&__subTitleBody, | ||
&__personWrap, | ||
&__innerDetailWrap { | ||
display: flex; | ||
justify-content: space-between; | ||
gap: 10px; | ||
} | ||
&__innerDetailWrap { | ||
font-size: 18px; | ||
} | ||
&__topWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 50px; | ||
} | ||
&__list { | ||
display: flex; | ||
gap: 10px; | ||
justify-content: space-between; | ||
font-size: 20px; | ||
color: #1c355e; | ||
} | ||
&__listWraper { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
&__valueListWrap { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
@media only screen and (max-width: 1200px) { | ||
gap: 20px; | ||
.sdaia-academy-logo { | ||
width: 200px; | ||
} | ||
.sdaia-logo { | ||
width: 160px; | ||
} | ||
|
||
&__list { | ||
font-size: 18px; | ||
} | ||
|
||
&__mainTitleWrap { | ||
font-size: 25px; | ||
} | ||
&__bodywraper { | ||
gap: 25px; | ||
} | ||
&__subTitleWrap { | ||
font-size: 18px; | ||
} | ||
&__personName { | ||
font-size: 26px; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 992px) { | ||
padding: 100px 11%; | ||
.sdaia-academy-logo { | ||
width: 1700px; | ||
} | ||
.sdaia-logo { | ||
width: 150px; | ||
} | ||
&__topWrapper { | ||
gap: 30px; | ||
} | ||
&__bodywraper { | ||
gap: 20px; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 768px) { | ||
padding: 70px 11%; | ||
&__topWrapper { | ||
gap: 20px; | ||
} | ||
.sdaia-academy-logo { | ||
width: 150px; | ||
} | ||
.sdaia-logo { | ||
width: 120px; | ||
} | ||
|
||
&__list { | ||
font-size: 14px; | ||
} | ||
|
||
&__mainTitleWrap { | ||
font-size: 20px; | ||
} | ||
&__bodywraper { | ||
gap: 20px; | ||
} | ||
&__subTitleWrap, | ||
&__innerDetailWrap { | ||
font-size: 15px; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 556px) { | ||
padding: 60px 13%; | ||
gap: 15px; | ||
|
||
.sdaia-academy-logo { | ||
width: 100px; | ||
} | ||
.sdaia-logo { | ||
width: 80px; | ||
} | ||
&__bodywraper, | ||
&__topWrapper { | ||
gap: 10px; | ||
} | ||
|
||
&__mainTitleWrap { | ||
font-size: 18px; | ||
} | ||
&__subTitleWrap, | ||
&__list, | ||
&__innerDetailWrap { | ||
font-size: 12px; | ||
} | ||
&__list{ | ||
gap: 5px; | ||
} | ||
&__personName { | ||
font-size: 22px; | ||
} | ||
} | ||
} | ||
|
||
[dir="rtl"] { | ||
.certificateWrapper { | ||
.text-align{ | ||
text-align: left; | ||
} | ||
} | ||
} |
Oops, something went wrong.