From f835f0aa6f015f7a7dd5df2cfcca3146e3148a5b Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 21 Feb 2023 01:06:05 +0800 Subject: [PATCH] Create QoL improvements for code listings - Added a "Copy to clipboard" button for easily following in case the post is code-heavy. - Added a toggle fullscreen button for code listings that are too large. It is pretty small and limiting in those cases, after all. --- i18n/en.toml | 33 ++++++++++++++++ layouts/partials/footer.html | 75 +++++++++++++++++++++++++++++++++--- 2 files changed, 103 insertions(+), 5 deletions(-) create mode 100644 i18n/en.toml diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..49fae0f --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,33 @@ +[siteFooterAriaLabel] +other = "Site footer" + +[copyButtonLabel] +other = "Copy to clipboard" + +[copyButtonAriaLabel] +other = "Copy to clipboard" + +[copyButtonDescription] +other = "Copy the code listing content to clipboard" + +[fullscreenButtonLabel] +other = "Toggle fullscreen" + +[fullscreenButtonAriaLabel] +other = "Toggle fullscreen" + +[fullscreenButtonDescription] +other = "Make the code listing takes up fullscreen" + +[generatedOn] +other = "Generated on" + +[siteFeaturesScriptingDisabled] +other = """ + Some of the features of this site relies on JavaScript scripting. + You'll be missing out on some features such as copying code listings to the clipboard, code syntax higlighting, and code listing fullscreen button. + Also, some of the JavaScript libraries this site relies on such as interactive image zooming and MathJax rendering will be disabled. +""" + +[lastUpdated] +other = "Last updated" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 6ebb0e6..c573ee3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,10 +1,10 @@ -