diff --git a/.eleventy.js b/.eleventy.js
index 97ec2658..4c7adf59 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -44,6 +44,13 @@ module.exports = function(eleventyConfig) {
return isActive ? "active" : "";
});
+ // shortcode to calculate readtime
+ eleventyConfig.addShortcode("readtime", function(content) {
+ let words = content.split(" ").length;
+ let minutes = Math.ceil(words / 265);
+ return minutes;
+ });
+
eleventyConfig.addShortcode("image", async function(src, alt, width, height, classes = "") {
let resizedImage = await resizeImage(src, width, height, "cover");
@@ -52,8 +59,6 @@ module.exports = function(eleventyConfig) {
outputDir: "out/img"
});
-
-
let imageAttributes = {
alt,
width: width,
diff --git a/content/_layouts/blog-layout.liquid b/content/_layouts/blog-layout.liquid
index 85908f37..9655ef9f 100644
--- a/content/_layouts/blog-layout.liquid
+++ b/content/_layouts/blog-layout.liquid
@@ -47,45 +47,5 @@ layout: default.liquid
async
src="https://platform.twitter.com/widgets.js"
charset="utf-8">
-
- {% comment %}
-
-
-
-
-
-
-
-
- Loading tweets from @HaxeFlixel
-
-
{{ postDate }}
+{% readtime content %} min read | {{ postDate }}
{{ content }} diff --git a/content/_layouts/partials/hf-splash-line.liquid b/content/_layouts/partials/hf-splash-line.liquid index dd1926c6..b59fc896 100644 --- a/content/_layouts/partials/hf-splash-line.liquid +++ b/content/_layouts/partials/hf-splash-line.liquid @@ -1,35 +1,32 @@ \ No newline at end of file + setTimeout(function () { + // code to be executed + audio.play(); + for (let i = 0; i < times.length; i++) { + setTimeout(function () { + // code to be executed + document.getElementById(footCol[i]).style.opacity = 1; + }, times[i] * 1000); + } + }, 1000); + } + }); + diff --git a/content/blog.liquid b/content/blog.liquid index 0ab6276e..ad30a6a8 100644 --- a/content/blog.liquid +++ b/content/blog.liquid @@ -5,17 +5,24 @@ layout: blog-layout- {{ blog.content | strip_html | truncate: 150 -}} - read more -
- {% comment %}<%- blog.contentPreview %> read more
{% endcomment %} +