Skip to content

Commit cb2ef7b

Browse files
committed
add few initial short codes
Signed-off-by: Nabarun Pal <[email protected]>
1 parent 553a152 commit cb2ef7b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.eleventy.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = function (eleventyConfig) {
6969

7070
// Total minutes
7171
let totalMinutes = sh * 60 + sm + dh * 60 + dm;
72-
72+
7373
// Calculate end hour and minutes
7474
let endHour = Math.floor(totalMinutes / 60);
7575
let endMinute = totalMinutes % 60;
@@ -119,6 +119,25 @@ module.exports = function (eleventyConfig) {
119119
return content;
120120
});
121121

122+
// add a sectionheader shortcode
123+
eleventyConfig.addPairedShortcode("sectionheader", function (content) {
124+
return `<div class="black-han-sans-regular font-normal text-2xl md:text-4xl md:text-center text-[#000000] text-center lg:text-left">
125+
<p>${content}</p>
126+
</div>`;
127+
});
128+
129+
// add an aside shortcode
130+
eleventyConfig.addPairedShortcode("aside", function (content) {
131+
return `<blockquote class="p-4 my-4">
132+
<p class="text-xl italic font-medium leading-relaxed">${content}</p>
133+
</blockquote>`;
134+
});
135+
136+
// TODO: Add more shortcodes as needed
137+
// - defaultlist
138+
// - cards
139+
// ...
140+
122141
return {
123142
pathPrefix: isProd ? "inpycon2025" : "",
124143
dir: {

0 commit comments

Comments
 (0)