-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HL-861 | Use markdown format to display service terms (#2172)
* feat: declare md fields for terms and serve them * feat: use markdown to display service terms * feat: add md api tests * chore: add default terms as markdown * feat: use 'terms' param to provide terms from API
- Loading branch information
Showing
22 changed files
with
966 additions
and
71 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
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
27 changes: 27 additions & 0 deletions
27
backend/benefit/terms/migrations/0005_add_support_for_md_terms.py
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,27 @@ | ||
# Generated by Django 3.2.18 on 2023-08-15 13:02 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("terms", "0004_alter_terms_terms_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="terms", | ||
name="terms_md_en", | ||
field=models.TextField(blank=True, verbose_name="English terms (md)"), | ||
), | ||
migrations.AddField( | ||
model_name="terms", | ||
name="terms_md_fi", | ||
field=models.TextField(blank=True, verbose_name="Finnish terms (md)"), | ||
), | ||
migrations.AddField( | ||
model_name="terms", | ||
name="terms_md_sv", | ||
field=models.TextField(blank=True, verbose_name="Swedish terms (md)"), | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
backend/benefit/terms/migrations/0006_alter_pdf_terms_not_required.py
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,28 @@ | ||
# Generated by Django 3.2.18 on 2023-08-15 13:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('terms', '0005_add_support_for_md_terms'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='terms', | ||
name='terms_pdf_en', | ||
field=models.FileField(blank=True, upload_to='', verbose_name='english terms (pdf file)'), | ||
), | ||
migrations.AlterField( | ||
model_name='terms', | ||
name='terms_pdf_fi', | ||
field=models.FileField(blank=True, upload_to='', verbose_name='finnish terms (pdf file)'), | ||
), | ||
migrations.AlterField( | ||
model_name='terms', | ||
name='terms_pdf_sv', | ||
field=models.FileField(blank=True, upload_to='', verbose_name='swedish terms (pdf file)'), | ||
), | ||
] |
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,45 @@ | ||
.module .EasyMDEContainer h1, | ||
.module .EasyMDEContainer h2, | ||
.module .EasyMDEContainer h3, | ||
.module .EasyMDEContainer h4, | ||
.module .EasyMDEContainer h5, | ||
.module .EasyMDEContainer h6 { | ||
color: #000; | ||
background: none; | ||
margin: 0; | ||
padding: 0; | ||
margin-bottom: 1.2rem; | ||
font-weight: 400; | ||
text-transform: none; | ||
letter-spacing: 0; | ||
line-height: 1.25; | ||
} | ||
|
||
.module .EasyMDEContainer h1 { | ||
font-size: 2em; | ||
} | ||
.module .EasyMDEContainer h2 { | ||
font-size: 1.75em; | ||
} | ||
|
||
.module .EasyMDEContainer h3 { | ||
font-size: 1.5em; | ||
} | ||
|
||
.module .EasyMDEContainer h4, | ||
.module .EasyMDEContainer h5, | ||
.module .EasyMDEContainer h6 { | ||
font-size: 1.25em; | ||
} | ||
|
||
.module .EasyMDEContainer ul { | ||
margin-left: 1em; | ||
} | ||
.module .EasyMDEContainer ul li { | ||
list-style: disc; | ||
font-size: 1em; | ||
} | ||
|
||
label[for*="id_terms_md_"] { | ||
float: none; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.