diff --git a/.eleventy.js b/.eleventy.js index 45e5b23..d94c1eb 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -15,10 +15,12 @@ module.exports = function (eleventyConfig) { }).setLocale("de").toLocaleString(DateTime.DATE_FULL) }) + // Filter for showing excerpts of posts on the "/posts/" site, limited to 180 characters (about 4 lines on mobile) eleventyConfig.addFilter("excerpt", (post) => { const content = post.replace(/(<([^>]+)>)/gi, ""); - return content.substr(0, content.lastIndexOf(" ", 200)) + "..."; + return content.substr(0, content.lastIndexOf(" ", 180)) + "..."; }); + return { passthroughFileCopy: true, dir: { diff --git a/src/_includes/model-list.njk b/src/_includes/model-list.njk new file mode 100644 index 0000000..5db8bc9 --- /dev/null +++ b/src/_includes/model-list.njk @@ -0,0 +1,34 @@ + + + + + + + + + {{ title }} + + + {% include "partials/nav.njk" %} + + + +
+ {{ content | safe }} +
+ {% include "partials/footer.njk" %} + + diff --git a/src/_includes/model-preview.njk b/src/_includes/model-preview.njk index 5342983..f71266a 100644 --- a/src/_includes/model-preview.njk +++ b/src/_includes/model-preview.njk @@ -6,7 +6,7 @@ -
+
{{post.data.title}}

{{post.data.alt}}

diff --git a/src/_includes/modelviewer.njk b/src/_includes/modelviewer.njk index 04ccd54..6cc02bf 100644 --- a/src/_includes/modelviewer.njk +++ b/src/_includes/modelviewer.njk @@ -13,8 +13,7 @@ field-of-view="{{fieldofview if fieldofview else 'auto'}}" ar xr-environment - camera-controls - shadow-intensity=1> + camera-controls auto-rotate shadow-intensity=1>