Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffroy-noel-ddh committed May 20, 2024
2 parents 7331fec + f6f602f commit 6446645
Show file tree
Hide file tree
Showing 30 changed files with 4,213 additions and 13,246 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/validate-tei.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ jobs:
- name: Lint book_one.xml
uses: ChristophWurst/xmllint-action@master
with:
xml-file: ./texts/book_one/book_one.xml
xml-file: ./texts/01_book_one/book_one.xml
xml-schema-file: ./tei_all.rng
xml-schema-type: relaxng
- name: Lint book_two.xml
uses: ChristophWurst/xmllint-action@master
with:
xml-file: ./texts/book_two/book_two.xml
xml-file: ./texts/02_book_two/book_two.xml
xml-schema-file: ./tei_all.rng
xml-schema-type: relaxng
- name: Lint book_three.xml
uses: ChristophWurst/xmllint-action@master
with:
xml-file: ./texts/03_book_three/book_three.xml
xml-schema-file: ./tei_all.rng
xml-schema-type: relaxng
- name: Lint book_of_remembrances.xml
uses: ChristophWurst/xmllint-action@master
with:
xml-file: ./texts/book_of_remembrances/book_of_remembrances.xml
xml-file: ./texts/00_book_of_remembrances/book_of_remembrances.xml
xml-schema-file: ./tei_all.rng
xml-schema-type: relaxng
2 changes: 1 addition & 1 deletion _build/autopull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ if [[ $h1 != $h2 ]]; then
fi

# update tweets
su - $GITUSER -c "cd $PROJECT_DIR && npm run tweets -w frontend"
# su - $GITUSER -c "cd $PROJECT_DIR && npm run tweets -w frontend"

echo "done"
6 changes: 5 additions & 1 deletion frontend/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ module.exports = function (config) {
}
});
ret = Object.values(ret).sort((a, b) =>
a.name < b.name ? -1 : a.name == b.name ? 0 : 1
a.name.toLowerCase() < b.name.toLowerCase()
? -1
: a.name.toLowerCase() == b.name.toLowerCase()
? 0
: 1
);
return ret;
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/_data/eleventyComputed.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
context: (data) => data,
date: (data) => data.page.date,
slug: (data) => data.page.fileSlug,
body_class: (data) => {
bodyClass: (data) => {
let ret = "";
if (data.tags) {
for (let tag of data.tags) {
Expand Down
39 changes: 29 additions & 10 deletions frontend/_includes/base.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ isContentHTML: false
isPageFluid: false
hideFooter: false
hideTitle: false
hideCitation: false
isCustomContent: false
customBodyClasses: ""
redirect: null
---
<!DOCTYPE html>
<html lang="en-GB">
Expand All @@ -12,6 +16,11 @@ hideTitle: false
<!-- Built with 11ty - {{ "now" | date: "%Y-%m-%d %H:%M" }} -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="King's Digital Lab, King's College London">
{% if redirect %}
<script>
window.location = "{{redirect}}?" + (location.search);
</script>
{% endif %}
{% if description %}<meta name="description" content="{{ description | escape_once }}">{% endif %}
{% comment %}Twitter cards{% endcomment %}
{% comment %}
Expand All @@ -37,7 +46,9 @@ hideTitle: false
<link rel="stylesheet" href="{{ '/assets/node_modules/@fortawesome/fontawesome-free/css/all.css' | url }}">
{% comment %} generated from assets/css/main.scss {% endcomment %}
<link rel="stylesheet" href="{{ '/assets/css/main.css' | url }}?ts={{ "now" | date: "%s" }}">
<link rel="stylesheet" href="{{ '/assets/css/text-viewer.css' | url }}?ts={{ "now" | date: "%s" }}">
{% if customCSS %}
<link rel="stylesheet" href="{{ customCSS | url }}?ts={{ "now" | date: "%s" }}">
{% endif %}

<script>
window.metadata = {{ metadata.front_end|json }};
Expand All @@ -49,19 +60,27 @@ hideTitle: false
Image by rawpixel.com on Freepik: https://www.freepik.com/free-photo/vintage-textured-watercolor-paper-background_15599882.htm
-->
</head>
<body class="{{ body_class }}">
<body class="{{ bodyClass }} {{ customBodyClasses }}">
{% include "header.liquid" %}
<section class="section">
<div class="container">
{% if hideTitle == false %}
<h1 class="title">
{{ title }}
</h1>
{% endif %}
</div>
<div class="container {% if isPageFluid %}is-fluid{% endif %}">
{% if hideTitle == false %}
<h1 class="title">
{{ title }}
</h1>
{% endif %}
<div class="{% if isContentHTML == false %}content{% endif %} {{ tags }}">
{% if isCustomContent %}
{{ content }}
</div>
{% include "page_citation.liquid" %}
{% else %}
<div class="{% if isContentHTML == false %}content{% endif %} {{ tags }}">
{{ content }}
</div>
{% endif %}
{% if hideCitation == false %}
{% include "page_citation.liquid" %}
{% endif %}
</div>
</section>
{% if hideFooter == false %}
Expand Down
8 changes: 4 additions & 4 deletions frontend/_includes/footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
alt="X Logo"
class="social-logo">
X</a>
&dash;

<a href="//www.facebook.com/thornton.books" title="Follow Alice Thornton's Books on Facebook">
<img
src="{{ '/assets/img/logos/facebook.svg' | url }}"
Expand All @@ -53,7 +53,7 @@
alt="Facebook Logo"
class="social-logo">
Facebook</a>
&dash;

<a href="//www.instagram.com/thornton_books/" title="Follow Alice Thornton's Books on Instagram">
<img
src="{{ '/assets/img/logos/instagram-square.svg' | url }}"
Expand All @@ -62,7 +62,7 @@
alt="Instagram Logo"
class="social-logo">
Instagram</a>
&dash;

<a href="//github.com/kingsdigitallab/alice-thornton" title="The project repository on Github">
<img
src="{{ '/assets/img/logos/github-mark.png' | url }}"
Expand All @@ -72,7 +72,7 @@
class="social-logo">
Github</a>
</p>
<p class="dont-print">
<p class="small dont-print">
<a href="/accessibility/">Accessibility Statement</a>
|
<a href="/credits/">Credits &amp; Acknowledgements</a>
Expand Down
13 changes: 5 additions & 8 deletions frontend/_includes/page_citation.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ Chicago style
Q: no date for blog post?
{% endcomment %}
<div class="box box-citation">
<p>Citing this web page:
<button class="button is-primary dont-print">
<span class="icon is-small">
<img src="{{ '/assets/img/icons/font-awesome/copy.svg' | url }}" alt="Copy citation to cliboard">
</span>
<span class="button-text">Copy</span>
</button>
</p>
<h3>Citing this web page:</h3>
<cite>
{% include 'people_names.liquid', people: authors %}.
'{{ titleCitation | default:title }}'.
Expand All @@ -21,4 +14,8 @@ Q: no date for blog post?
<br>
{{ metadata.live_domain }}{{ page.url }}
</cite>
<button class="button is-secondary dont-print">
<i class="far fa-copy"></i> &nbsp;
<span class="button-text">Copy</span>
</button>
</div>
31 changes: 26 additions & 5 deletions frontend/_includes/viewer2.liquid
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
<!DOCTYPE html>
<!--
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
GN: NO LONGER USED.
THE NEW VIEWER NOW USES THE BASE TEMPLATE.
SEE base.liquid.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
-->
<html lang="en-GB">
<head>
<!-- TODO: share code base.liquid; don't copy it here (GN) -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="{{ '/assets/css/main.css' | url }}?ts={{ "now" | date: "%s" }}"> -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | url }}?ts={{ "now" | date: "%s" }}">
<link rel="stylesheet" href="{{ '/assets/css/text-viewer2.css' | url }}?ts={{ "now" | date: "%s" }}">
<link rel="stylesheet" href="{{ '/assets/node_modules/@fortawesome/fontawesome-free/css/all.css' | url }}">
<!--<link rel="stylesheet" href="{{ '/assets/css/text-viewer.css' | url }}?ts={{ "now" | date: "%s" }}">-->
<link
rel="icon"
Expand All @@ -16,17 +28,26 @@
window.metadata = {{ metadata.front_end|json }};
</script>
</head>
<body>
<body class="body-text-viewer">
{% include "header.liquid" %}
<main id="text-viewer">
<section>
<div class="container">

<h1 class="title">
{{ title }}
</h1>

<section id="text-viewer">
{{ content }}
</main>

</section>
</div>
</section>
<script src="/assets/node_modules/vue/dist/vue.global.js"></script>
<script src="/assets/node_modules/kdl-dts-client/index.js?ts={{ "now" | date: "%s" }}"></script>
<script src="/assets/js/text-viewer.js?ts={{ "now" | date: "%s" }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/4.0.0/openseadragon.min.js"></script>

{% include "feedback_button.liquid" %}
</body>
</html>

Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: About the project
eleventyNavigation:
key: About
order: 4
order: 5
---

## About Our Research Project
Expand Down
Loading

0 comments on commit 6446645

Please sign in to comment.