|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
{%block head%}
|
|
{%block head%}
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style/fontello/css/fontello.css') }}"" />
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style/fontello/css/fontello.css') }}"" />
|
|
-<script src="{{ url_for('static', filename='script/artifacts.js') | timestamp }}"></script>
|
|
|
|
|
|
+</script>
|
|
{%endblock%}
|
|
{%endblock%}
|
|
|
|
|
|
{%block title%}{{selected_project.info.name}}{%endblock%}
|
|
{%block title%}{{selected_project.info.name}}{%endblock%}
|
|
@@ -55,7 +55,10 @@
|
|
<tbody>
|
|
<tbody>
|
|
{%-for download_item in artifact.artifacts%}
|
|
{%-for download_item in artifact.artifacts%}
|
|
<tr>
|
|
<tr>
|
|
- <td class="min-size"><a class="button is-link" style="width: calc({{download_item.width}} * 0.6rem);" href="{{ url_for('download_item', project_id=selected_project.id, artifact_id=artifact.id, download_item=download_item.file)}}">{{download_item.file}}</a></td>
|
|
|
|
|
|
+ <td class="min-size"><a class="button is-link button-scale"
|
|
|
|
+ style="width: calc({{download_item.width * 0.5}}em);"
|
|
|
|
+ href="{{ url_for('download_item', project_id=selected_project.id, artifact_id=artifact.id, download_item=download_item.file)}}">{{download_item.file}}</a>
|
|
|
|
+ </td>
|
|
<td>{{download_item.description}}</td>
|
|
<td>{{download_item.description}}</td>
|
|
</tr>
|
|
</tr>
|
|
{%-endfor%}
|
|
{%-endfor%}
|
|
@@ -74,5 +77,28 @@
|
|
</div>
|
|
</div>
|
|
{%-endfor%}
|
|
{%-endfor%}
|
|
|
|
|
|
-<script>init();</script>
|
|
|
|
|
|
+<script>
|
|
|
|
+ function init() {
|
|
|
|
+ let dates = document.querySelectorAll("span.build-date");
|
|
|
|
+
|
|
|
|
+ for (let date of dates) {
|
|
|
|
+ date.textContent = new Date(date.textContent).toLocaleString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let artifacts = document.querySelectorAll("div.artifact-item");
|
|
|
|
+ for (let artifact of artifacts) {
|
|
|
|
+ let contents = artifact.querySelector(".artifact-contents");
|
|
|
|
+ if (!contents || !(contents instanceof HTMLElement))
|
|
|
|
+ continue;
|
|
|
|
+ artifact.addEventListener("click", e => {
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ if (contents.classList.contains("contents-visible"))
|
|
|
|
+ contents.classList.remove("contents-visible");
|
|
|
|
+ else
|
|
|
|
+ contents.classList.add("contents-visible");
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ init();
|
|
|
|
+</script>
|
|
{%endblock%}
|
|
{%endblock%}
|