Skip to content

Commit

Permalink
Add markdown layout for /work routes. (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewjordan authored Apr 25, 2024
1 parent f74c0a2 commit 1adaad5
Show file tree
Hide file tree
Showing 28 changed files with 10,615 additions and 4,273 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/sort-type-union-intersection-members": "error",
"@typescript-eslint/ban-ts-comment": "off"
"@typescript-eslint/ban-ts-comment": "off",
"react/display-name": "off"
}
}
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
run: npm run prebuild -- --path=./config/.fixtures/canopy.presentation-3.json
- name: 3.0 Collection (Build)
run: npm run test-build
- name: Arabic Language (Aggregation)
run: npm run prebuild -- --path=./config/.fixtures/canopy.arabic.json
- name: Arabic Language (Build)
run: npm run test-build
- name: Customize Search (Aggregation)
run: npm run prebuild -- --path=./config/.fixtures/canopy.customize-search.json
- name: Customize Search (Build)
Expand Down
67 changes: 67 additions & 0 deletions config/.fixtures/canopy.arabic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"label": { "none": ["Maktaba"] },
"summary": {
"none": [
"A digital collection of 20 African Arabic manuscripts from University of Illinois at Urbana-Champaign and Northwestern University with images, translations, and brief essays."
]
},
"collection": "https://iiif-maktaba.dc.rdc-staging.library.northwestern.edu/collection.json",
"metadata": ["Date", "Subject"],
"locales": [
{
"config": "locales/en.json",
"label": "English إنجليزي",
"lang": "en"
},
{
"config": "locales/ar.json",
"label": "Arabic عربي",
"lang": "ar"
}
],
"search": {
"enabled": true,
"flexSearch": {
"bidirectional": false,
"charset": ["latin:extra", "arabic:extra"],
"document": {
"index": [
{
"bidirectional": true,
"depth": 3,
"field": "label",
"resolution": 9,
"tokenize": "full"
},
{
"field": "metadata",
"resolution": 2
},
{
"field": "summary",
"resolution": 1
}
]
},
"optimize": true,
"tokenize": "strict"
},
"index": {
"metadata": {
"all": false,
"enabled": true
},
"summary": {
"enabled": true
}
}
},
"theme": {
"defaultTheme": "light",
"accentColor": "red",
"grayColor": "sand",
"panelBackground": "translucent",
"radius": "small",
"scaling": "100%"
}
}
44 changes: 44 additions & 0 deletions content/works/_layout.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<Work.Viewer />

<Container>
<Section pb="4">
<Work.Title size="8" mb="5" />
<Work.Summary size="4" color="gray" />
</Section>

<Section size="1">
<Tabs.Root defaultValue="details">
<Tabs.List>
<Tabs.Trigger value="details">Item Details</Tabs.Trigger>
<Tabs.Trigger value="essays">Referencing Content</Tabs.Trigger>
<Tabs.Trigger value="annotations">Transcriptions and Translations</Tabs.Trigger>
</Tabs.List>

<Box pt="3">
<Tabs.Content value="details">
<Work.Metadata />
<Work.RequiredStatement />
<Work.ManifestId />
</Tabs.Content>

<Tabs.Content value="annotations">
<Work.Scroll />
</Tabs.Content>

<Tabs.Content value="essays">
<Work.ReferencingContent />
</Tabs.Content>

</Box>
</Tabs.Root>

</Section>

<Section size="1">
## Related Works

<Work.Related />

</Section>

</Container>
Loading

0 comments on commit 1adaad5

Please sign in to comment.