diff options
-rw-r--r-- | assets/css/_vars.scss | 2 | ||||
-rw-r--r-- | scripts/metadata_filter.lua | 12 | ||||
-rw-r--r-- | templates/layouts/categorized_list.html | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/assets/css/_vars.scss b/assets/css/_vars.scss index 7c2534d..3260ec4 100644 --- a/assets/css/_vars.scss +++ b/assets/css/_vars.scss | |||
@@ -1,5 +1,5 @@ | |||
1 | $breakpoints: ( | 1 | $breakpoints: ( |
2 | lg: 1500px, | 2 | lg: 1360px, |
3 | md: 900px, | 3 | md: 900px, |
4 | sm: 600px, | 4 | sm: 600px, |
5 | xs: 400px, | 5 | xs: 400px, |
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index c154708..9125696 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -210,7 +210,8 @@ function generate_list(meta) | |||
210 | end) | 210 | end) |
211 | elseif meta.depth == "2" then | 211 | elseif meta.depth == "2" then |
212 | return meta.pages.all:map(function(cat) | 212 | return meta.pages.all:map(function(cat) |
213 | local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or 9999 | 213 | local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or |
214 | 9999 | ||
214 | local allItems = ((cat.pages and cat.pages.all) or pandoc.List()):map(function(p) | 215 | local allItems = ((cat.pages and cat.pages.all) or pandoc.List()):map(function(p) |
215 | return { | 216 | return { |
216 | title = p.title, | 217 | title = p.title, |
@@ -227,7 +228,8 @@ function generate_list(meta) | |||
227 | 228 | ||
228 | return { | 229 | return { |
229 | title = cat.title, | 230 | title = cat.title, |
230 | content = cat.content, | 231 | description = (cat.description and pandoc.MetaBlocks(pandoc.Para(cat.description))) or |
232 | (not cat.no_description and cat.content), | ||
231 | url = cat.url, | 233 | url = cat.url, |
232 | grid = cat.list_grid, | 234 | grid = cat.list_grid, |
233 | items = items, | 235 | items = items, |
@@ -237,7 +239,8 @@ function generate_list(meta) | |||
237 | end):filter(function(cat) return #cat.items ~= 0 end) | 239 | end):filter(function(cat) return #cat.items ~= 0 end) |
238 | elseif meta.depth == "3" then | 240 | elseif meta.depth == "3" then |
239 | return meta.pages.all:map(function(cat) | 241 | return meta.pages.all:map(function(cat) |
240 | local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or 9999 | 242 | local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or |
243 | 9999 | ||
241 | local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) | 244 | local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) |
242 | if c.pages then | 245 | if c.pages then |
243 | return c.pages.all:map(function(p) | 246 | return c.pages.all:map(function(p) |
@@ -269,7 +272,8 @@ function generate_list(meta) | |||
269 | 272 | ||
270 | return { | 273 | return { |
271 | title = cat.title, | 274 | title = cat.title, |
272 | content = cat.content, | 275 | description = (cat.description and pandoc.MetaBlocks(pandoc.Para(cat.description))) or |
276 | (not cat.no_description and cat.content), | ||
273 | url = cat.url, | 277 | url = cat.url, |
274 | grid = cat.list_grid, | 278 | grid = cat.list_grid, |
275 | items = items, | 279 | items = items, |
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html index 0508230..690ab68 100644 --- a/templates/layouts/categorized_list.html +++ b/templates/layouts/categorized_list.html | |||
@@ -14,8 +14,8 @@ $body$ | |||
14 | </h2> | 14 | </h2> |
15 | $if(it.omitted)$<small>$it.omitted$ more</small>$endif$ | 15 | $if(it.omitted)$<small>$it.omitted$ more</small>$endif$ |
16 | </div> | 16 | </div> |
17 | $if(it.content)$ | 17 | $if(it.description)$ |
18 | <small class="c-card-list__category-description">$it.content$</small> | 18 | <small class="c-card-list__category-description">$it.description$</small> |
19 | $endif$ | 19 | $endif$ |
20 | </header> | 20 | </header> |
21 | $if(it.grid)$ | 21 | $if(it.grid)$ |