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 - -

- - - - - -

- -
- -
- -
- - {% endcomment %} diff --git a/content/_layouts/blog-post.liquid b/content/_layouts/blog-post.liquid index f52c0edf..7d65e474 100644 --- a/content/_layouts/blog-post.liquid +++ b/content/_layouts/blog-post.liquid @@ -14,7 +14,7 @@ layout: default.liquid -

{{ 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
{%- for blog in collections.blogpost reversed -%} - -

{{ blog.data.title }}

-
- -

- {{ blog.content | strip_html | truncate: 150 -}} - read more -

- {% comment %}

<%- blog.contentPreview %> read more

{% endcomment %} +
+
+

{{ blog.data.title }}

-
+
+ +
+

+ {{ blog.content | strip_html | truncate: 250 -}} + read more +

+ {% comment %}

<%- blog.contentPreview %> read more

{% endcomment %} +
+
+ +
{%- endfor -%}
diff --git a/content/demos/FlxBitmapText.md b/content/demos/FlxBitmapText.md index bcb93722..bbe84c91 100644 --- a/content/demos/FlxBitmapText.md +++ b/content/demos/FlxBitmapText.md @@ -12,4 +12,3 @@ Demo showcasing loading `flixel.text.FlxBitmapText` and `flixel.graphics.frames. - `HELLO WORLD!...` is using `FlxBitmapFont.fromAngelCode()` and loading a `.fnt` file - `ROBOCOP RULES!!!` is using `FlxBitmapFont.fromMonospace()` - `You can even define and use Unicode Combining Diacritical Marks!` is using `FlxBitmapFont.fromAngelCode()` and loading a `.xml` file. -