diff --git a/_includes/transcript/item/av.html b/_includes/transcript/item/av.html new file mode 100644 index 0000000..2e50d3f --- /dev/null +++ b/_includes/transcript/item/av.html @@ -0,0 +1,4 @@ +
+ {% include + transcript/player/{{av}}.html %} +
diff --git a/_includes/transcript/item/filters.html b/_includes/transcript/item/filters.html new file mode 100644 index 0000000..3e6e341 --- /dev/null +++ b/_includes/transcript/item/filters.html @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/_includes/transcript/item/transcript-metadata.html b/_includes/transcript/item/transcript-metadata.html new file mode 100644 index 0000000..167ad7e --- /dev/null +++ b/_includes/transcript/item/transcript-metadata.html @@ -0,0 +1,22 @@ +
+
+

+ {%if page.bio and site.data.theme.transcript-fields contains 'bio'%}Bio: {{page.bio}}
{%endif%} + {%if page.description and site.data.theme.transcript-fields contains 'description'%}Description: {{page.description}}{%endif%}{%if + page.date and site.data.theme.transcript-fields contains 'date'%}
Date: {{page.date | date: "%B %d, %Y" }}{%endif%} {%if + page.location and site.data.theme.transcript-fields contains 'location' %}Location: {{page.location }}{%endif%} + {%if page.interviewer and site.data.theme.transcript-fields contains 'interviewer' %}
Interviewer: {{page.interviewer}}{%endif%} + {%if page.interviewer and site.data.theme.transcript-fields contains 'interviewee' %}
Interviewee: {{page.interviewee}}{%endif%} +

+ {% include transcript/item/download-buttons.html %} + {% include transcript/item/metadata-modal.html %} + +
+ {% if site.data.theme.transcript-fields contains 'image' %} + {% if page.image_small or page.image_thumb %} +
+ {{page.title}} +
+ {% endif %} + {% endif %} +
\ No newline at end of file diff --git a/_includes/transcript/item/transcript-viz.html b/_includes/transcript/item/transcript-viz.html new file mode 100644 index 0000000..49a9ffd --- /dev/null +++ b/_includes/transcript/item/transcript-viz.html @@ -0,0 +1,18 @@ +
+

Topics:

+
+ + {% for item in items %} + {% assign my_integer = forloop.length %} + {% assign my_float = my_integer | times: 1.0 %} + {% assign rect-width = 100 | divided_by: my_float %} + + + + {%endfor%} +
+
+ {% include /transcript/style/visualization-filter-legend.html %} \ No newline at end of file diff --git a/_includes/transcript/item/transcript.html b/_includes/transcript/item/transcript.html index 5449a3d..58758ff 100644 --- a/_includes/transcript/item/transcript.html +++ b/_includes/transcript/item/transcript.html @@ -1,85 +1,20 @@ -
-
-
-

Topics: - - {% for item in items %} - {% assign my_integer = forloop.length %} - {% assign my_float = my_integer | times: 1.0 %} - {% assign rect-width = 100 | divided_by: my_float %} - - - - {%endfor%} -

-
- {% include /transcript/style/visualization-filter-legend.html %} -
- +{% include transcript/item/filters.html %} -
- {% for item in items %} - {% assign prev_index = forloop.index0 | times: 1 | minus: 1 %} - {% assign prev_speaker = items[prev_index].speaker %} - {% assign mod = forloop.index0 | plus: 1 | modulo: 5 %} -
-

- {% unless item.speaker == prev_speaker %}{%if item.speaker %}{{item.speaker | - remove: ":"}}: {% endif %}{% endunless %}{{item.words}} -

-
{%if item.timestamp%}{% if av %}{% capture avlink %}transcript/timestamp/{{av | downcase }}.html{% endcapture %}{{item.timestamp}}{% else %}{{item.timestamp}}{% endif %}{% endif %} -
-
- {% endfor %} +
+ {% for item in items %} + {% assign prev_index = forloop.index0 | times: 1 | minus: 1 %} + {% assign prev_speaker = items[prev_index].speaker %} + {% assign mod = forloop.index0 | plus: 1 | modulo: 5 %} +
+

+ {% unless item.speaker == prev_speaker %}{%if item.speaker %}{{item.speaker | + remove: ":"}}: {% endif %}{% endunless %}{{item.words}} +

+
{%if item.timestamp%}{% if av %}{% capture avlink + %}transcript/timestamp/{{av | downcase }}.html{% endcapture %}{{item.timestamp}}{% else %}{{item.timestamp}}{% endif %}{% endif %}
-
\ No newline at end of file + {% endfor %} +
diff --git a/_layouts/item/transcript.html b/_layouts/item/transcript.html index 6de401e..d23f928 100644 --- a/_layouts/item/transcript.html +++ b/_layouts/item/transcript.html @@ -4,7 +4,7 @@ layout: item/item-page-base custom-foot: transcript/js/transcript-js.html --- -{% assign children = site.data[site.metadata] | where_exp: 'item','item.parentid == page.objectid' %} +{%- comment -%} Determine if transcript filename is the objectid of the item or if it is determined by the metadata's object-transcript field {%- endcomment -%} {% if page.object-transcript contains ".csv"%} {% assign transcript = page.object-transcript | remove: ".csv" %} {% assign items = site.data.transcripts[transcript] %} @@ -13,7 +13,10 @@ {% else %} {% assign items = site.data.transcripts[page.objectid] %} {% endif %} -{%- comment -%} find all words used in the subject metadata {%- endcomment -%} + +{%- comment -%} if using color-coded visualization find all words used in the subject metadata {%- endcomment -%} +{% if site.data.filters %} +{% include transcript/style/filter-style.html %} {%- assign min-count = 1 -%} {%- assign raw-subjects = items | map: "tags" | compact | join: ";" | split: ";" -%} {%- capture subjects -%}{% for s in raw-subjects %}{% if s != "" %}{{- s | strip | downcase -}};{% endif %}{%- endfor @@ -21,7 +24,9 @@ endcapture -%} {%- assign subjects = subjects | split: ";" -%} {%- assign uniqueSubjects = subjects | uniq | sort -%} +{% endif %} +{%- comment -%} determine AV component (if there is one) {%- endcomment -%} {% if page.object_location contains 'vimeo' %} {% assign av = "vimeo" %} {% assign vimeo_id = page.object_location | split: '/' | last %} @@ -36,39 +41,21 @@ {% assign av = "soundcloud" %} {% assign soundcloud_id = page.object_location | split: '.com/' | last %} {%endif%} - - -{% include transcript/style/filter-style.html %} +
+{% if site.data.theme.media-scroll == true %} +{% include transcript/style/media-scroll-wrapper.html %} +{% endif %} {% if av %} -
- {% include - transcript/player/{{av}}.html %} -
{% endif %} -
-
-
-

- {%if page.bio and site.data.theme.transcript-fields contains 'bio'%}Bio: {{page.bio}}
{%endif%} - {%if page.description and site.data.theme.transcript-fields contains 'description'%}Description: {{page.description}}{%endif%}{%if - page.date and site.data.theme.transcript-fields contains 'date'%}
Date: {{page.date | date: "%B %d, %Y" }}{%endif%} {%if - page.location and site.data.theme.transcript-fields contains 'location' %}Location: {{page.location }}{%endif%} - {%if page.interviewer and site.data.theme.transcript-fields contains 'interviewer' %}
Interviewer: {{page.interviewer}}{%endif%} - {%if page.interviewer and site.data.theme.transcript-fields contains 'interviewee' %}
Interviewee: {{page.interviewee}}{%endif%} -

- {% include transcript/item/download-buttons.html %} - {% include transcript/item/metadata-modal.html %} - -
- {% if site.data.theme.transcript-fields contains 'image' %} - {% if page.image_small or page.image_thumb %} -
- {{page.title}} - -
- {% endif %} - {% endif %} -
+{% include transcript/item/av.html %} +{% endif %} +
+ {% include transcript/item/transcript-metadata.html %} +
+{% if site.data.filters %} +{% include transcript/item/transcript-viz.html %} +{% endif %} +
- {% include transcript/item/transcript.html %} +{% include transcript/item/transcript.html %}