Skip to content

Commit

Permalink
add blockquote for body text and footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Aug 17, 2023
1 parent 5c87421 commit 9495099
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Empty file added src/components/Me.css
Empty file.
6 changes: 5 additions & 1 deletion src/components/StoryEndnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ const StoryEndnotes = ({ language = 'en_GB', endnotes = {}, className }) => {
return (
<section className={`StoryEndnotes ${className}`}>
<h3>{t('notes')}</h3>
<ModuleText content={content} />
<ModuleText content={content// replace > blockquotes
.replace(/> /gm, ' ')
.replace(/>\n/gm, ' ')
.replace(/\\'/g, "'")
.replace('\\"', '"')} />
</section>
)
}
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
--size-1: 0.25rem;
--size-2: 0.5rem;
--size-3: 1rem;
--size-4: 1.5rem;
--size-5: 3rem;
--pebble-color-1: #87dcdc;
--pebble-color-2: #4e97da;
Expand Down
16 changes: 16 additions & 0 deletions src/styles/pages/Story.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,19 @@
.Story_StoryEndnotes a {
word-break: break-all;
}


.Story_StoryModule blockquote{
margin: var(--size-4);
font-size: .9em;
}

.Story_StoryEndnotes pre {
margin: var(--size-4);
font-size: .9em;
font-family:inherit;
}
.Story_StoryEndnotes pre code {
font-size: inherit;
font-family:inherit;
}
6 changes: 3 additions & 3 deletions src/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"actionReadBiography": "Lire la biographie",
"actionSearchPerson": "search",
"actionSendUsPageOfTestimony": "Contactez-nous",
"allAvailableStories": "Explorez les premières biographies.",
"allAvailableStories": "Explorez les biographies.",
"allStories": "Explorer toutes les biographies",
"ariaLabelSearch": "search & find",
"archive": "Archive",
Expand Down Expand Up @@ -97,7 +97,7 @@
"actionReadBiography": "Read this biography",
"actionSearchPerson": "search",
"actionSendUsPageOfTestimony": "Get in touch with us",
"allAvailableStories": "Explore the first biographies",
"allAvailableStories": "Explore the biographies",
"allStories": "Explore the Biographies",
"ariaLabelSearch": "search & find",
"archive": "Archive",
Expand Down Expand Up @@ -185,7 +185,7 @@
"actionReadBiography": "Lesen Sie diese Biografie",
"actionSearchPerson": "suchen",
"actionSendUsPageOfTestimony": "Nehmen Sie Kontakt mit uns auf",
"allAvailableStories": "Erkunden Sie die ersten Biografien",
"allAvailableStories": "Erkunden Sie die Biografien",
"allStories": "Alle Biografien erkunden",
"ariaLabelSearch": "search & find",
"archive": "Archiv",
Expand Down

0 comments on commit 9495099

Please sign in to comment.