artifactview/templates/selection.hbs

181 lines
7.8 KiB
Handlebars

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<style type="text/css">
* {padding: 0;margin: 0;--color-secondary: #dedede;--color-text:
#000;--color-text-light: #888;}body {font-family: sans-serif;text-rendering:
optimizespeed;background-color: #f5f5f5;color: var(--color-text);}a {color:
#006ed3;text-decoration: none;}a:hover {color: #319cff;}#summary, header {padding:
0 20px;}header {display: flex;flex-direction: row;gap: 1em;padding-top:
25px;padding-bottom: 15px;background-color: #f2f2f2;}header h1 {font-size:
20px;font-weight: normal;white-space: nowrap;overflow-x: hidden;text-overflow:
ellipsis;color: #999;}header h1 a {color: var(--color-text);margin: 0 4px;}footer
a:hover, header h1 a:hover {text-decoration: underline;}header h1 a:first-child
{margin: 0;}main {display: block;}.meta {font-size: 12px;font-family: Verdana,
sans-serif;border-bottom: 1px solid #9c9c9c;padding-top: 10px;padding-bottom:
10px;}.meta-item {margin-right: 1em;}#filter {padding: 4px;border: 1px solid
#ccc;}#list {width: 100%;border-collapse: collapse;}#list tr {border-bottom: 1px
dashed #dadada;}#list tbody tr:hover {background-color: #ffffec;}#list td, #list
th {text-align: left;padding: 10px 0;}#list th {padding-top: 15px;padding-bottom:
15px;font-size: 16px;white-space: nowrap;}#list th a {color:
var(--color-text);}#list th svg {vertical-align: middle;}#list td {white-space:
nowrap;font-size: 14px;}#list td:nth-child(1), #list th:nth-child(1)
{padding-left: 20px;width: 80%;}#list td:nth-child(2), #list th:nth-child(2)
{text-align: right;padding: 0 20px;}#list td:nth-child(3), #list th:nth-child(3)
{text-align: right;padding-right: 20px;}#list td:nth-child(1) svg {position:
absolute;}#list td .goup, #list td .name {margin-left: 1.75em;word-break:
break-all;overflow-wrap: break-word;white-space: pre-wrap;}footer {padding: 40px
20px;font-size: 12px;text-align: center;}p { margin: 16px 0; }.light{ color:
var(--color-text-light); } @media (max-width: 600px)
{td:nth-child(1) {width: auto;}td:nth-child(2), th:nth-child(2) {display: none;}h1
a {margin: 0;}#filter {max-width: 100px;}}.expired {filter: grayscale(100%);}
@media (prefers-color-scheme: dark) {*{--color-secondary: #082437;--color-text: #dddddd;}
body {background-color: #101010;}header {background-color:
#151515;}#list tbody tr:hover {background-color: #252525;}a {color:
#5796d1;text-decoration: none;}a:hover, h1 a:hover {color: #62b2fd;}#list tr
{border-bottom: 1px dashed rgba(255, 255, 255, 0.12);}#filter {background-color:
#151515;color: #ffffff;border: 1px solid #212121;}.meta {border-bottom: 1px solid
#212121;}}
</style>
<title>
Artifacts:
{{run_name}}
</title>
</head>
<body onload="initFilter()">
<svg
xmlns="http://www.w3.org/2000/svg"
height="0"
width="0"
style="position:absolute"
><defs><g id="folder" fill-rule="nonzero" fill="none"><path
d="M285.22 37.55h-142.6L110.9 0H31.7C14.25 0 0 16.9 0 37.55v75.1h316.92V75.1c0-20.65-14.26-37.55-31.7-37.55z"
fill="#FFA000"
/><path
d="M285.22 36H31.7C14.25 36 0 50.28 0 67.74v158.7c0 17.47 14.26 31.75 31.7 31.75h253.5c17.44 0 31.7-14.3 31.7-31.75V67.75c0-17.47-14.26-31.75-31.7-31.75z"
fill="#FFCA28"
/></g></defs></svg>
<header>
<a href="{{main_url}}" aria-label="Back to main page" style="height: 32px;">
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 13.229 13.229"
><g
aria-label="AV"
style="stroke-width:.264583"
><path
d="m12.381 2.878-2.698 7.557H8.73L6.031 2.878h.995L8.73 7.725q.17.466.286.879.116.402.19.772.074-.37.19-.783.117-.413.287-.889l1.693-4.826Z"
style="fill:#888;fill-opacity:1"
/><path
d="m1.158 10.435 2.699-7.557h.952l2.699 7.557h-.995L4.81 5.588q-.169-.466-.285-.879-.117-.402-.19-.772-.075.37-.191.783-.117.412-.286.889l-1.694 4.826Z"
style="fill:#ddd;fill-opacity:1;stroke-width:.264583"
/></g></svg>
</a>
<h1>
<a href="/">{{run_name}}</a>
/
</h1>
</header>
<main>
<div class="meta">
<div id="summary">
<span class="meta-item"><b>{{artifacts.len()}}</b> artifact{{#if artifacts.len() != 1}}s{{/if}}</span>
<span class="meta-item"><a
href="{{run_url}}"
target="_blank"
rel="noopener noreferrer"
>CI run</a></span>
<span class="meta-item"><input
type="text"
placeholder="filter"
id="filter"
onkeyup="filter()"
/></span>
</div>
</div>
<div class="listing">
<table id="list" aria-describedby="summary">
<thead>
<tr>
<th>Artifact</th>
<th>Size</th>
<th>Download</th>
</tr>
</thead>
<tbody>
{{#each artifacts}}
<tr class="file">
{{#if this.expired}}
<td>
<svg
class="expired"
width="1.5em"
height="1em"
version="1.1"
viewBox="0 0 317 259"
><use xlink:href="#folder"></use></svg>
<span class="name light">{{this.name}}</span>
</td>
{{else}}
<td>
<a href="{{this.url}}">
<svg
width="1.5em"
height="1em"
version="1.1"
viewBox="0 0 317 259"
><use xlink:href="#folder"></use></svg>
<span class="name">{{this.name}}</span>
</a>
</td>
{{/if}}
<td>{{this.size}}</td>
<td>
{{#if this.expired}}
&mdash;
{{else}}
<a href="{{this.download_url}}" rel="noopener noreferrer">Download</a>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</main>
<footer>
Served with
<a
href="https://code.thetadev.de/ThetaDev/artifactview"
target="_blank"
rel="noopener noreferrer"
>Artifactview</a>
{{version}}
<p class="light">
<b>Disclaimer:</b> Artifactview does not host any websites, the data is fetched
from the respective software forge and is only stored temporarily on this server.
The publisher of this artifact,
<a href="{{publisher.url}}" target="_blank" rel="noopener noreferrer">{{publisher.name}}</a>,
is the only one responsible for the content.
Most forges delete artifacts after 90 days.
</p>
</footer>
<script>
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT
var filterEl=document.getElementById("filter");function initFilter(){if(!filterEl.value){var filterParam=new URL(window.location.href).searchParams.get("filter");if(filterParam){filterEl.value=filterParam}}filter()}function filter(){var q=filterEl.value.trim().toLowerCase();var elems=document.querySelectorAll("tr.file");elems.forEach(function(el){if(!q){el.style.display="";return}var nameEl=el.querySelector("td");var nameVal=nameEl.textContent.trim().toLowerCase();if(nameVal.indexOf(q)!==-1){el.style.display=""}else{el.style.display="none"}})}
// @license-end
</script>
</body>
</html>