From 5f61398499ada36db0bf66c8ccd1a86dc9771d22 Mon Sep 17 00:00:00 2001 From: rlskoeser Date: Tue, 14 May 2024 10:23:47 -0400 Subject: [PATCH] Update template and figure data structure to display figures in order --- content/2024/afterlives/index.md | 8 +++---- content/2024/counterfactual-canon/index.md | 4 ++-- content/2024/missingdata-specreading/index.md | 12 +++++------ content/2024/peggrams-library/index.md | 4 ++-- content/2024/woolf-common-readers/index.md | 12 +++++------ themes/shxco/layouts/article/single.html | 21 ++++++++++--------- .../shxco/layouts/partials/figure/styles.css | 11 +++++----- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/content/2024/afterlives/index.md b/content/2024/afterlives/index.md index 7cb024b..8442453 100644 --- a/content/2024/afterlives/index.md +++ b/content/2024/afterlives/index.md @@ -3,16 +3,16 @@ type: article title: Figures for The Afterlives of Shakespeare and Company in Online Social Readership shortTitle: Afterlives figures: - author: - figure: 2 + - id: author + number: 2 title: Author Popularity src: figures/2024/afterlives/author-popularity/ style: aspect-ratio: "65 / 49" min-width: "772px" max-height: "80vh" - relative: - figure: 3 + - id: relative + number: 3 title: Relative popularity of work by publication year src: figures/2024/afterlives/relative-popularity/ style: diff --git a/content/2024/counterfactual-canon/index.md b/content/2024/counterfactual-canon/index.md index 042df8a..28f73a5 100644 --- a/content/2024/counterfactual-canon/index.md +++ b/content/2024/counterfactual-canon/index.md @@ -3,8 +3,8 @@ type: article title: Figures for A Counterfactual Canon shortTitle: Counterfactual Canon figures: - gendered-reading: - figure: 3 + - id: gendered-reading + number: 3 title: Authors with the highest deltas src: figures/2024/counterfactual-canon/gendered-reading-delta/ style: diff --git a/content/2024/missingdata-specreading/index.md b/content/2024/missingdata-specreading/index.md index f73b835..3354bca 100644 --- a/content/2024/missingdata-specreading/index.md +++ b/content/2024/missingdata-specreading/index.md @@ -3,22 +3,22 @@ type: article title: Figures for Missing Data, Speculative Reading shortTitle: Missing Data, Speculative Reading figures: - weekly-activity-logbooks: - figure: 2 + - id: weekly-activity-logbooks + number: 2 title: Weekly activity from logbooks src: figures/2024/missingdata-specreading/weekly-activity-logbooks/ style: aspect-ratio: "130 / 40" min-width: "600px" - hemingway: - figure: 12 + - id: hemingway + number: 12 title: Hemingway's Borrowing src: figures/2024/missingdata-specreading/hemingway-borrowing/ style: aspect-ratio: "407 / 144" min-width: "600px" - recommendation-scores: - figure: 14 + - id: recommendation-scores + number: 14 title: Distributions of Prediction Scores for the Top Books for Ernest Hemingway src: figures/2024/missingdata-specreading/recommendation-scores/ cssString: " diff --git a/content/2024/peggrams-library/index.md b/content/2024/peggrams-library/index.md index d002e7f..2761bdd 100644 --- a/content/2024/peggrams-library/index.md +++ b/content/2024/peggrams-library/index.md @@ -3,8 +3,8 @@ type: article title: Figures for Unpacking Reed Peggram's Library shortTitle: Peggram's Library figures: - map: - figure: 4 + - id: map + number: 4 title: Map of Reed Peggram's addresses in Paris src: figures/2024/peggrams-library/map/ style: diff --git a/content/2024/woolf-common-readers/index.md b/content/2024/woolf-common-readers/index.md index 8d13e38..7f2db2a 100644 --- a/content/2024/woolf-common-readers/index.md +++ b/content/2024/woolf-common-readers/index.md @@ -3,22 +3,22 @@ type: article title: Figures for Virginia Woolf’s Common Readers in Paris shortTitle: Woolf's Common Readers figures: - borrows: - figure: 9 + - id: borrows + number: 9 title: Number of times Woolf books were borrowed src: figures/2024/woolf-common-readers/borrows/ style: aspect-ratio: "100 / 76" min-width: "600px" - gender: - figure: 10 + - id: gender + number: 10 title: Woolf’s borrowers by gender src: figures/2024/woolf-common-readers/gender/ style: aspect-ratio: "100 / 76" min-width: "600px" - community: - figure: 11 + - id: community + number: 11 title: The community of readers of Virginia Woolf’s books src: figures/2024/woolf-common-readers/community/ allowfullscreen: true diff --git a/themes/shxco/layouts/article/single.html b/themes/shxco/layouts/article/single.html index 46a660d..afa3820 100644 --- a/themes/shxco/layouts/article/single.html +++ b/themes/shxco/layouts/article/single.html @@ -5,19 +5,20 @@

{{ .Title }}

{{/* generate brief list with anchor links */}}

Contents

+
{{/* display figures */}} {{ partial "figure/styles.css" . }} {{/* include styles for display on this page */}} -{{- range $figureId, $props := .Params.figures -}} -
-

{{ $props.title }}

- {{ partial "figure/iframe.html" (dict "figureId" $figureId "props" $props "baseurl" $.Site.BaseURL ) }} +{{- range $figure := .Params.figures -}} +
+

{{ $figure.title }}

+ {{ partial "figure/iframe.html" (dict "figureId" $figure.id "props" $figure "baseurl" $.Site.BaseURL ) }}
{{- end -}} @@ -27,15 +28,15 @@

{{ $props.title }}

{{ $css := partial "figure/styles.css" . }} {{/* styles for display when embedding; output as string */}} {{ transform.Highlight (printf "%s\n" $css ) "css" }} -{{- range $figureId, $props := .Params.figures -}} -{{- $iframe := partial "figure/iframe.html" (dict "figureId" $figureId "props" $props "baseurl" $.Site.BaseURL ) -}} +{{- range $figure := .Params.figures -}} +{{- $iframe := partial "figure/iframe.html" (dict "figureId" $figure.id "props" $figure "baseurl" $.Site.BaseURL ) -}} {{ transform.Highlight ( printf "%s\n" $iframe ) "html" }} {{- end -}}
-{{- range $figureId, $props := .Params.figures -}} -

view embed : {{ $props.title }}

+{{- range $figure := .Params.figures -}} +

view embed : {{ $figure.title }}

{{- end -}}
diff --git a/themes/shxco/layouts/partials/figure/styles.css b/themes/shxco/layouts/partials/figure/styles.css index c73c413..d66c60a 100644 --- a/themes/shxco/layouts/partials/figure/styles.css +++ b/themes/shxco/layouts/partials/figure/styles.css @@ -1,11 +1,10 @@