include images in blog pages
continuous-integration/drone/push Build is passing Details

This commit is contained in:
ktyl 2022-12-15 20:59:10 +00:00
parent 673ac6b90e
commit 6647c3cf68
2 changed files with 12 additions and 0 deletions

View File

@ -56,6 +56,9 @@ with open(dummy_file, 'r') as read_file, open(dest_file, 'w') as write_file:
# modify the basic html to make it nicer for styling later
html = read_file.read()
# extract images from their enclosing <p> tags
html = re.sub('(<p>(<img(?:.+)/>)</p>)', r'\2', html)
# insert text-panel start between non-<p> and <p> elements
html = re.sub('((?<!</p>)\n)(<p>)', r'\1<div class="text-panel">\n\2', html)
# insert para-block end between <p> and non-<p> elements

View File

@ -88,6 +88,15 @@ ul.blog-index li a {
padding-right: 1em;
}
.page .blog img {
width: max(30vmax, 500px);
margin-top: 1.2em;
margin-bottom: 2em;
border-radius: 2em;
}
@media only screen and (max-width: 700px) {
.page .blog .code-panel {
padding: 1.0em 5.0em;