mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Wed Dec 18 02:14:35 EET 2024
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
a465d604af
commit
86c92034a7
5 changed files with 61 additions and 5 deletions
31
blog.json
31
blog.json
File diff suppressed because one or more lines are too long
|
@ -69,7 +69,7 @@ blockquote:before {
|
|||
}
|
||||
|
||||
.media > img {
|
||||
max-width: 400px;
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -11,5 +11,18 @@
|
|||
"ext": "jpeg",
|
||||
"mime": "image/jpeg",
|
||||
"uploaded": 1734269521.436514
|
||||
},
|
||||
"0867cea01b7f0dda58de112b78d19a2ef5b0c06102a8526b2157d14ec9e3db24": {
|
||||
"type": "image",
|
||||
"width": 1200,
|
||||
"height": 630,
|
||||
"alt": "The rust mascot next to text: \"Is rust worth it? (no, not really)\", on a black background",
|
||||
"purpose": "Image preview for \"Rust Bad II\"",
|
||||
"title": "Is rust worth it? (no, not really)",
|
||||
"license": "CC-BY-SA-4.0",
|
||||
"credit": "Ari Archer",
|
||||
"ext": "png",
|
||||
"mime": "image/png",
|
||||
"uploaded": 1734473202.686761
|
||||
}
|
||||
}
|
|
@ -162,7 +162,7 @@ DEFAULT_CONFIG: dict[str, typing.Any] = {
|
|||
"top-words": 64,
|
||||
"top-tags": 64,
|
||||
"code-style": "coffee",
|
||||
"note": 'This page uses the <a href="https://github.com/ryanoasis/nerd-fonts">Nerd Hack Font</a>, which is licensed under the OFL 1.1 License. All internal content, unless specified otherwise, is subject to their respective license terms as well as <a href=\"https://ari.lt/legal\">Ari-web legal policies</a>.',
|
||||
"note": 'This page uses the <a href="https://github.com/ryanoasis/nerd-fonts">Nerd Hack Font</a>, which is licensed under the OFL 1.1 License. All internal content, unless specified otherwise, is subject to their respective license terms as well as <a href="https://ari.lt/legal">Ari-web legal policies</a>. Treat the content and the source of the page as source code according to the license.',
|
||||
"posts": {},
|
||||
}
|
||||
|
||||
|
@ -580,6 +580,11 @@ def select_posts(posts: dict[str, dict[str, typing.Any]]) -> tuple[str, ...]:
|
|||
|
||||
|
||||
def select_medias(type: typing.Optional[str] = None) -> tuple[str, ...]:
|
||||
if os.path.exists("media/media.json"):
|
||||
with open("media/media.json", "r") as fp:
|
||||
MEDIA_INDEX.clear()
|
||||
MEDIA_INDEX.update(json.load(fp))
|
||||
|
||||
if type:
|
||||
return tuple(
|
||||
map(
|
||||
|
@ -823,6 +828,7 @@ def parse_inline_media_embed(
|
|||
"type": "emphasis",
|
||||
"raw": f"{mdx['alt']} | \"{mdx['title']}\" by {mdx['credit']} ({mdx['license']}). Purpose: {mistune.escape(mdx['purpose'])}. Uploaded on {datetime.datetime.utcfromtimestamp(mdx['uploaded']).strftime('%a, %d %b %Y %H:%M:%S GMT')}.",
|
||||
},
|
||||
{"type": "text", "raw": " "},
|
||||
{
|
||||
"type": "link",
|
||||
"children": [{"type": "text", "raw": f"(raw media here)"}],
|
||||
|
@ -1766,7 +1772,15 @@ def media(config: dict[str, typing.Any]) -> int:
|
|||
|
||||
purpose: str = iinput("media purpose")
|
||||
title: str = iinput("media title")
|
||||
license: str = ", ".join(select_multi(licenses))
|
||||
license: str = ", ".join(
|
||||
select_multi(
|
||||
[
|
||||
"All-rights-reserved",
|
||||
"Unknown",
|
||||
]
|
||||
+ licenses
|
||||
)
|
||||
)
|
||||
|
||||
credit: str = iinput("media credit")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue