Development #287

Merged
bones7242 merged 58 commits from development into master 2017-12-11 20:53:02 +01:00
6 changed files with 31 additions and 24 deletions
Showing only changes of commit 842ee526df - Show all commits

View file

@ -501,27 +501,32 @@ table {
width: calc(100% - 1rem); width: calc(100% - 1rem);
} }
/* Show page */ /* Assets */
#video-player {
display: block;
margin: 0 auto;
background-color: #fff;
cursor: pointer;
}
#showlite-body #video-player {
margin-top: 2%;
padding: 6px;
max-width: 50%;
border: 1px solid #d0d0d0;
}
.asset { .asset {
max-width: 100%; max-width: 100%;
} }
#showlite-body > .asset { #show-body #asset-boilerpate {
max-width: 50%; display: none;
}
#showlite-body #asset-display-component {
max-width: 50%;
text-align: center;
}
/* video */
#video-asset {
background-color: #fff;
cursor: pointer;
}
#showlite-body #video-asset {
width: calc(100% - 12px - 12px - 2px);
margin: 6px;
padding: 6px;
border: 1px solid #d0d0d0;
} }
/* item lists */ /* item lists */

View file

@ -36,7 +36,7 @@
padding-right: 1.5em; padding-right: 1.5em;
} }
#showlite-body > asset { #showlite-body #asset-display-component {
max-width: 100%; max-width: 100%;
} }

View file

@ -9,6 +9,7 @@
{{> image}} {{> image}}
{{/ifConditional}} {{/ifConditional}}
</div> </div>
<a id="asset-boilerpate" class="link--primary fine-print" href="/{{claimInfo.claimId}}/{{claimInfo.name}}">hosted via Spee&lt;h</a>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
@ -24,7 +25,7 @@
}, },
showVideo: function () { showVideo: function () {
console.log('showing video'); console.log('showing video');
const video = document.getElementById('video-player'); const video = document.getElementById('video-asset');
const source = document.createElement('source'); const source = document.createElement('source');
source.setAttribute('src', '/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}'); source.setAttribute('src', '/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}');
video.appendChild(source); video.appendChild(source);
@ -32,7 +33,7 @@
}, },
showImage: function () { showImage: function () {
console.log('showing image'); console.log('showing image');
const asset = document.getElementById('asset'); const asset = document.getElementById('image-asset');
asset.setAttribute('src', "/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}"); asset.setAttribute('src', "/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}");
}, },
hideMessages: function () { hideMessages: function () {

View file

@ -1 +1 @@
<img id="asset" class="asset"/> <img id="image-asset" class="asset"/>

View file

@ -1,5 +1,5 @@
<video id="video-player" controls poster="{{claimInfo.thumbnail}}"> <video id="video-asset" class="asset" controls poster="{{claimInfo.thumbnail}}">
<source id="asset"> <source>
<!--fallback--> <!--fallback-->
Your browser does not support the <code>video</code> element. Your browser does not support the <code>video</code> element.
</video> </video>

View file

@ -1,2 +1,3 @@
{{> asset }} <div class="row row--tall flex-container--column flex-container--center-center">
<a class="link--primary fine-print" href="/{{claimInfo.claimId}}/{{claimInfo.name}}">hosted via Spee&lt;h</a> {{> asset }}
</div>