From 4e4021da5d0f283840e4cde7a592b2e0a288d775 Mon Sep 17 00:00:00 2001 From: welpo Date: Sat, 25 Feb 2023 02:00:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=20format=20references=20w?= =?UTF-8?q?ith=20custom=20shortcode=20Uses=20hanging=20indent=20for=20a=20?= =?UTF-8?q?References=20section.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/shortcodes.md | 27 +++++++++++++++++++++++++++ sass/parts/_misc.scss | 5 +++++ templates/shortcodes/references.html | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 templates/shortcodes/references.html diff --git a/content/shortcodes.md b/content/shortcodes.md index 3f7f2b4..0ded60f 100644 --- a/content/shortcodes.md +++ b/content/shortcodes.md @@ -30,3 +30,30 @@ Usage: ``` {{/* dimmable_image(src="img/desert_by_oskerwyld.webp", alt="Photograph of a desert, heavenly sky") */}} ``` + +## References + +This shortcode formats a reference section with a hanging indent like so: + +{% references() %} + +Alderson, E. (2015). Cybersecurity and Social Justice: A Critique of Corporate Hegemony in a Digital World. *New York Journal of Technology, 11*(2), 24-39. [https://doi.org/10.1007/s10198-022-01497-6](https://doi.org/10.1007/s10198-022-01497-6). + +Funkhouser, M. (2012). The Social Norms of Indecency: An Analysis of Deviant Behavior in Contemporary Society. *Los Angeles Journal of Sociology, 16*(3), 41-58. [https://doi.org/10.1093/jmp/jhx037](https://doi.org/10.1093/jmp/jhx037). + +Schrute, D. (2005). The Beet Farming Revolution: An Analysis of Agricultural Innovation. *Scranton Agricultural Quarterly, 38*(3), 67-81. + +Steinbrenner, G. (1997). The Cost-Benefit Analysis of George Costanza: An Examination of Risk-Taking Behavior in the Workplace. *New York Journal of Business, 12*(4), 112-125. + +Winger, J. A. (2010). The Art of Debate: An Examination of Rhetoric in Greendale Community College's Model United Nations. *Colorado Journal of Communication Studies, 19*(2), 73-86. [https://doi.org/10.1093/6seaons/1movie](https://doi.org/10.1093/6seaons/1movie). + +{% end %} + +Usage: + +``` +{%/* references() */%} + +Your references go here. + +Each in a new line. Markdown (links, italics…) will be rendered. diff --git a/sass/parts/_misc.scss b/sass/parts/_misc.scss index cbc8806..e2e01c5 100644 --- a/sass/parts/_misc.scss +++ b/sass/parts/_misc.scss @@ -149,3 +149,8 @@ table tbody tr:nth-child(even) { display: inline; } } + +.references p { + text-indent: -2.4rem; + margin-left: 2.4rem; +} diff --git a/templates/shortcodes/references.html b/templates/shortcodes/references.html new file mode 100644 index 0000000..1894479 --- /dev/null +++ b/templates/shortcodes/references.html @@ -0,0 +1,3 @@ +
+ {{ body | markdown | safe }} +
From bec5ccb9b7e2a922235001a26fc51fb7b0a40b40 Mon Sep 17 00:00:00 2001 From: welpo Date: Sat, 25 Feb 2023 02:04:14 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20add=20link=20to=20shortcodes?= =?UTF-8?q?=20in=20repository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4024a7b..9102441 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A simple blog theme powered by [Zola](https://getzola.org). See a live preview [ - [x] Tags. - [x] Social links. - [X] Code syntax highlighting. -- [X] Invertible and dimmable images shortcodes. +- [X] [Custom shortcodes](./templates/shortcodes/). - [X] Customizable secure headers. See the project's roadmap [here](https://github.com/users/welpo/projects/1).