diff --git a/netlify-cms.config.yml b/netlify-cms.config.yml index 4bae2406..1153bc74 100644 --- a/netlify-cms.config.yml +++ b/netlify-cms.config.yml @@ -1105,6 +1105,43 @@ collections: widget: markdown, label: Reminder description } + - name: latest + label: latest Download instruction + file: dataset/latestInstruction.yml + fields: + - name: title + widget: string + label: Title + - name: id + widget: string + label: id + hint: id of the block. Must match anchor link url + - name: recommended + widget: markdown + label: Our recommendation + - name: reminder + widget: object + fields: + - { + name: title, + widget: markdown, + label: Reminder title + } + - { + name: description, + widget: object, + fields: + - { + name: option, + widget: markdown, + label: option + } + - { + name: option2, + widget: markdown, + label: option2 + } + } - name: datasetLatest label: Latest dataset file: dataset/datasetLatest.yml diff --git a/templates/documentation/dataset/index.jsx b/templates/documentation/dataset/index.jsx index a8b59ffe..46bece98 100644 --- a/templates/documentation/dataset/index.jsx +++ b/templates/documentation/dataset/index.jsx @@ -46,12 +46,13 @@ const DatasetPageTemplate = ({ meta, header, instruction, + latestInstruction, datasetLatest, additionalDatasets, structures, }) => ( - + -
-

{instruction.title}

-
-
- {instruction.recommended} -
-
-
{instruction.reminder.title}
- - {instruction.reminder.description} - -
-
-
{datasetLatest.box.text} +
+

{latestInstruction.title}

+
+
+ {latestInstruction.recommended} +
+
+ {latestInstruction.reminder.title} + + {latestInstruction.reminder.descriptions.option} + + + {latestInstruction.reminder.descriptions.option2} + +
+
+
))} +
+

{instruction.title}

+
+
+ {instruction.recommended} +
+
+
{instruction.reminder.title}
+ + {instruction.reminder.description} + +
+
+

{structures.title}

{structures.items.map((structure) => ( diff --git a/templates/documentation/dataset/styles.module.scss b/templates/documentation/dataset/styles.module.scss index 8a3e2416..324ade08 100644 --- a/templates/documentation/dataset/styles.module.scss +++ b/templates/documentation/dataset/styles.module.scss @@ -4,6 +4,42 @@ $left-border: 4px solid var(--primary); $box-bg-color: #fef5ef; $primary-color: #b75400; +.dataset-wrapper { + .instruction { + background-color: var(--gray-200); + padding: 24px 48px; + &-content { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + } + &-reminder { + max-width: 50ch; + margin-left: auto; + &-text { + border-left: $left-border; + padding-left: 2rem; + line-height: 1.8; + &:last-child { + margin-top: 20px; + } + } + } + + strong { + color: $primary-color; + } + em { + color: var(--gray-600); + } + ul { + list-style: disc; + margin-left: 1.5rem; + li { + color: var(--gray-700); + } + } + } +} .header { &-content { display: flex; @@ -25,37 +61,6 @@ $primary-color: #b75400; } } -.instruction { - background-color: var(--gray-200); - &-content { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); - } - &-reminder { - max-width: 50ch; - margin-left: auto; - &-text { - border-left: $left-border; - padding-left: 2rem; - line-height: 1.8; - } - } - - strong { - color: $primary-color; - } - em { - color: var(--gray-600); - } - ul { - list-style: disc; - margin-left: 1.5rem; - li { - color: var(--gray-700); - } - } -} - .dataset { .box-wide { grid-column: 1/5;