Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for jekyll template #3

Open
wants to merge 6 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Navigation for the site
- pages/r_0124_01_01-criminal-syndicalism-case-mccomb-mississippi.md
11 changes: 4 additions & 7 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<data class="u-url" href="{{ "/" | relative_url }}"></data>

<div class="wrapper">

<h2 class="footer-heading">{{ site.data.collection.label.en[0] | escape }}</h2>

<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<div class="footer-col">
<ul class="contact-list">
<li class="p-name">
{%- if site.author -%}
Expand All @@ -15,15 +12,15 @@ <h2 class="footer-heading">{{ site.data.collection.label.en[0] | escape }}</h2>
{{ site.data.collection.summary.en[0] | escape }}
{%- endif -%}
</li>
<li>Project by {{ site.name }}</li>
<li><br>Project by {{ site.name }}</li>
</ul>
</div>

<div class="footer-col footer-col-2">
<div class="footer-col footer-col-1">
{%- include social.html -%}
</div>

<div class="footer-col footer-col-3">
<div class="footer-col footer-col-2">
<p>{{- site.description -}}</p>
</div>
</div>
Expand Down
17 changes: 12 additions & 5 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
{%- assign page_paths = site.data.navigation | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.data.collection.label.en[0] }}</a>

{%- if page_paths -%}
Expand All @@ -15,18 +15,25 @@
</svg>
</span>
</label>

<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}
</div>
</nav>


{%- endif -%}
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/datatables/datatables.min.css">
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/uv/uv.css">
<script src="{{ site.baseurl }}/assets/uv/lib/offline.js"></script>
<script src="{{ site.baseurl }}/assets/uv/helpers.js"></script>
<style>
.uv-audio {
width: 100%;
height: 60px;
height: 120px;
}
.uv-video {
width: 100%;
Expand All @@ -36,9 +43,9 @@
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
z-index: 1;
}
</style>

{%- endif -%}
</div>
</header>
9 changes: 4 additions & 5 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@

{{ content }}

<div><p>{{ site.data.collection.summary.en[0] | escape }}</p></div>

<ul class="post-list">
{%- for item in site.items -%}
{%- for item in site.data.navigation -%}
{%- assign my_page = site.pages | where: "path", item | first -%}
<li>
<h3>
<a class="post-link" href="{{ item.url | relative_url }}">
{{ item.title }}
<a class="post-link" href="{{ my_page.url | relative_url }}">
{{ my_page.title }}
</a>
</h3>
</li>
Expand Down
8 changes: 3 additions & 5 deletions _layouts/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
{%- assign format = site.data[page.manifest_name].manifest.items[0].items[0].items[0].body.type -%}
{{ content }}

<p>Find the item page for <a href="{{ site.data[page.manifest_name].manifest.homepage[0].id }}">{{ site.data[page.manifest_name].manifest.homepage[0].label.en[0] }}</a> at <a href="{{ site.data[page.manifest_name].manifest.provider[0].id }}">{{ site.data[page.manifest_name].manifest.provider[0].label.en[0] }}</a>. </p>

{% if site.data[page.manifest_name].manifest.items[0].items[0].items[0].body.id == "" %}
The media file is not available

{% else %}

<div id="uv" {%- if format == "Sound" -%} class="uv-audio sticky" {%- endif -%} {%- if format == "Video" -%} class="uv-video sticky" {%- endif -%} ></div>

<div id="uv" {%- if format == "Audio" or format == "Sound" -%} class="uv-audio sticky" {%- else -%} class="uv-video sticky" {%- endif -%} ></div>
{% endif %}

<script>
Expand All @@ -23,7 +20,7 @@
window.addEventListener('uvLoaded', function (e) {

myUV = createUV('#uv', {
iiifResourceUri: 'manifest.json',
iiifResourceUri: '{{site.data[page.manifest_name].manifest.id}}',
configUri: '{{ site.baseurl }}/assets/uv-config.json',
root: '../../{{ site.baseurl }}/assets/uv'
}, new UV.URLDataProvider());
Expand Down Expand Up @@ -81,6 +78,7 @@
</table>

<div>
<p></p><p><a href="{{ site.data[page.manifest_name].manifest.homepage[0].id }}">{{ site.data[page.manifest_name].manifest.homepage[0].label.en[0] }}</a> at <a href="{{ site.data[page.manifest_name].manifest.provider[0].id }}">{{ site.data[page.manifest_name].manifest.provider[0].label.en[0] }}</a>. </p>
IIIF manifest: <a href="{{site.data[page.manifest_name].manifest.id}}">{{site.data[page.manifest_name].manifest.id}}</a>
</div>

Expand Down
8 changes: 8 additions & 0 deletions nav_create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
FILES=pages/*
for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f store current file name
echo "- $f" >> _data/navigation.yml
done