Skip to content

Commit 1a11b51

Browse files
committed
Tweaks to template.
1 parent c167c70 commit 1a11b51

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/css/tailwind.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,16 @@ details[open] .summary-swap-open {
347347
.aspect-ratio-youtube {
348348
padding-top: 74.9295775%;
349349
}
350+
.jamstacktv-time {
351+
display: inline-block;
352+
font-size: .75em;
353+
border: 1px solid #eee;
354+
padding: 0 .5em;
355+
margin-right: .5em;
356+
border-radius: .25em;
357+
word-spacing: 0.25em; /* 4px /16 */
358+
font-weight: 700;
359+
}
350360
/* purgecss end ignore */
351361

352362
@tailwind utilities;

src/site/tv.njk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Jamstack TV
33
layout: layouts/base.njk
44
---
5-
5+
{# This search index data is populated by the code at https://github.com/netlify/jamstack-tv-search-data #}
66
{# <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/reset-min.css" integrity="sha256-t2ATOGCtAIZNnzER679jwcFcKYfLlw01gli6F6oszk8=" crossorigin="anonymous"> #}
77
{# <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/satellite-min.css" integrity="sha256-TehzF/2QvNKhGQrrNpoOb2Ck4iGZ1J/DI4pkd2oUsBc=" crossorigin="anonymous"> #}
88
<div class="p-8">
@@ -24,6 +24,9 @@ const search = instantsearch({
2424
search.addWidgets([
2525
instantsearch.widgets.searchBox({
2626
container: '#searchbox',
27+
placeholder: 'Search Video Content',
28+
showReset: false,
29+
showSubmit: false,
2730
}),
2831
2932
instantsearch.widgets.hits({
@@ -50,7 +53,7 @@ search.addWidgets([
5053
let hours = Math.floor(start / secondsInOne.hour);
5154
let minutes = Math.floor((start % secondsInOne.hour) / secondsInOne.minute);
5255
let seconds = Math.floor(start % secondsInOne.minute);
53-
obj.displayStart = `(at ${hours ? `${pad(hours)}:`: ""}${pad(minutes)}:${pad(seconds)}) `;
56+
obj.displayStart = `<span class="jamstacktv-time">⏱ ${hours ? `${pad(hours)}:`: ""}${pad(minutes)}:${pad(seconds)}</span>`;
5457
//obj._highlightResult.caption.content = `…${obj._highlightResult.caption.content}`;
5558
}
5659
return obj;
@@ -64,7 +67,7 @@ search.addWidgets([
6467
</div>
6568
<div class="col-span-3">
6669
<div>{{#helpers.highlight}}{ "attribute": "playlist.title" }{{/helpers.highlight}}: {{#helpers.highlight}}{ "attribute": "video.title" }{{/helpers.highlight}}</div>
67-
<span class="text-2xl">{{ displayStart }}</span>
70+
<span class="text-2xl">{{{ displayStart }}}</span>
6871
<strong class="text-2xl">{{#helpers.highlight}}{ "attribute": "caption.content" }{{/helpers.highlight}}</strong>
6972
<div></div>
7073
</div>

0 commit comments

Comments
 (0)