spee.ch/views/partials/assetInfo.handlebars

117 lines
5.7 KiB
Handlebars
Raw Normal View History

2017-11-21 21:53:43 +01:00
{{#if claimInfo.channelName}}
2017-10-26 02:07:59 +02:00
<div class="row row--padded row--wide row--no-top">
<div class="column column--2 column--med-10">
<span class="text">Channel:</span>
</div><div class="column column--8 column--med-10">
2017-12-07 23:45:07 +01:00
<span class="text"><a href="/{{claimInfo.channelName}}:{{claimInfo.certificateId}}">{{claimInfo.channelName}}</a></span>
2017-10-26 02:07:59 +02:00
</div>
</div>
{{/if}}
2017-11-21 21:53:43 +01:00
{{#if claimInfo.description}}
2017-10-26 02:07:59 +02:00
<div class="row row--padded row--wide row--no-top">
2017-11-21 21:53:43 +01:00
<span class="text">{{claimInfo.description}}</span>
2017-10-26 02:07:59 +02:00
</div>
{{/if}}
<div class="row row--wide">
<div id="show-short-link">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
2017-11-21 21:53:43 +01:00
<a class="link--primary" href="/{{shortId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}"><span class="text">Link:</span></a>
2017-10-26 02:07:59 +02:00
</div><div class="column column--8 column--med-10">
<div class="row row--short row--wide">
2017-10-10 19:14:43 +02:00
<div class="column column--7">
<div class="input-error" id="input-error-copy-short-link" hidden="true"></div>
<input type="text" id="short-link" class="input-disabled input-text--full-width" readonly spellcheck="false" value="{{claimInfo.host}}/{{shortId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}" onclick="select()"/>
2017-10-10 19:14:43 +02:00
</div><div class="column column--1"></div><div class="column column--2">
<button class="button--primary" data-elementtocopy="short-link" onclick="copyToClipboard(event)">copy</button>
</div>
</div>
</div>
2017-09-30 00:56:13 +02:00
</div>
<div id="show-embed-code">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
<span class="text">Embed:</span>
</div><div class="column column--8 column--med-10">
<div class="row row--short row--wide">
<div class="column column--7">
<div class="input-error" id="input-error-copy-embed-text" hidden="true"></div>
2017-11-21 21:53:43 +01:00
{{#ifConditional claimInfo.contentType '===' 'video/mp4'}}
<input type="text" id="embed-text" class="input-disabled input-text--full-width" readonly onclick="select()" spellcheck="false" value='&lt;video width="100%" controls poster="{{claimInfo.thumbnail}}" src="{{claimInfo.host}}/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}"/>&lt;/video>'/>
{{else}}
<input type="text" id="embed-text" class="input-disabled input-text--full-width" readonly onclick="select()" spellcheck="false" value='&lt;img src="{{claimInfo.host}}/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}"/>'/>
{{/ifConditional}}
</div><div class="column column--1"></div><div class="column column--2">
<button class="button--primary" data-elementtocopy="embed-text" onclick="copyToClipboard(event)">copy</button>
</div>
2017-10-10 19:14:43 +02:00
</div>
</div>
</div>
2017-10-03 02:49:04 +02:00
</div>
2017-09-30 00:56:13 +02:00
2017-10-11 23:16:28 +02:00
<div id="show-share-buttons">
<div class="row row--padded row--no-bottom row--wide">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
<span class="text">Share:</span>
</div><div class="column column--7 column--med-10">
2017-10-30 18:07:23 +01:00
<div class="row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap">
<a class="link--primary" target="_blank" href="https://twitter.com/intent/tweet?text={{claimInfo.host}}/{{shortId}}/{{claimInfo.name}}">twitter</a>
<a class="link--primary" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{claimInfo.host}}/{{shortId}}/{{claimInfo.name}}">facebook</a>
<a class="link--primary" target="_blank" href="http://tumblr.com/widgets/share/tool?canonicalUrl={{claimInfo.host}}/{{shortId}}/{{claimInfo.name}}">tumblr</a>
<a class="link--primary" target="_blank" href="https://www.reddit.com/submit?url={{claimInfo.host}}/{{shortId}}/{{claimInfo.name}}&title={{claimInfo.name}}">reddit</a>
2017-10-24 22:39:06 +02:00
</div>
2017-10-11 23:16:28 +02:00
</div>
</div>
</div>
<div id="show-details" class="row row--padded row--no-bottom row--wide" hidden="true">
<div id="show-claim-name">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
<span class="text">Claim Name:</span>
2017-10-26 02:07:59 +02:00
</div><div class="column column--8 column--med-10">
2017-11-21 21:53:43 +01:00
{{claimInfo.name}}
</div>
</div>
<div id="show-claim-id">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
<span class="text">Claim Id:</span>
</div><div class="column column--8 column--med-10">
2017-11-21 21:53:43 +01:00
{{claimInfo.claimId}}
</div>
</div>
<div id="show-claim-id">
2017-10-26 02:07:59 +02:00
<div class="column column--2 column--med-10">
<span class="text">File Type:</span>
</div><div class="column column--8 column--med-10">
2017-11-21 21:53:43 +01:00
{{#if claimInfo.contentType}}
{{claimInfo.contentType}}
{{else}}
unknown
{{/if}}
</div>
</div>
2017-10-03 02:49:04 +02:00
</div>
<div class="row row--padded row--no-bottom row--wide">
<a class="text link--primary" id="show-details-toggle" href="#" onclick="toggleSection(event)" data-status="closed">[more]</a>
</div>
<script>
function toggleSection(event){
event.preventDefault();
var dataSet = event.target.dataset;
var status = dataSet.status;
var toggle = document.getElementById("show-details-toggle");
var details = document.getElementById("show-details");
if (status === "closed") {
details.hidden = false;
toggle.innerText = "[less]";
toggle.dataset.status = "open";
} else {
details.hidden = true;
toggle.innerText = "[more]";
toggle.dataset.status = "closed";
}
}
</script>