Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6be7034f9b | ||
|
|
1adaf20f61 | ||
|
|
c32ed88713 | ||
|
|
1d572cec43 | ||
|
|
fd42b38c23 | ||
|
|
b8faf538be |
@@ -20,6 +20,9 @@ build:
|
|||||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_COMMIT_TAG
|
||||||
stage: test
|
stage: test
|
||||||
image:
|
image:
|
||||||
name: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
name: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
|||||||
0
ui/static/ui/button.css
Normal file
0
ui/static/ui/button.css
Normal file
@@ -19,6 +19,7 @@ var button = document.getElementById("BUTTON");
|
|||||||
var count = document.getElementById("COUNT");
|
var count = document.getElementById("COUNT");
|
||||||
|
|
||||||
button.addEventListener("click", event => {
|
button.addEventListener("click", event => {
|
||||||
|
button.disabled = true;
|
||||||
fetch('/button', {
|
fetch('/button', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -31,5 +32,9 @@ button.addEventListener("click", event => {
|
|||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
count.innerText = data.pressed;
|
count.innerText = data.pressed;
|
||||||
|
}).finally(() => {
|
||||||
|
button.disabled = false;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
button.focus();
|
||||||
24
ui/templates/ui/base.html
Normal file
24
ui/templates/ui/base.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{% load static %}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>The Button</title>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.8.2/css/bulma.min.css">
|
||||||
|
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||||
|
{% block css %}
|
||||||
|
{% endblock %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{% endblock %}
|
||||||
|
</body>
|
||||||
@@ -1,33 +1,29 @@
|
|||||||
|
{% extends 'ui/base.html' %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
{% block css %}
|
||||||
<html>
|
<link rel="stylesheet" href="{% static 'ui/button.css' %}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<head>
|
{% block js %}
|
||||||
<meta charset="utf-8">
|
<script src="{% static 'ui/button.js' %}"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
{% endblock %}
|
||||||
<title>Hello Bulma!</title>
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.8.2/css/bulma.min.css">
|
|
||||||
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{% csrf_token %}
|
{% block body %}
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
The Button
|
The Button
|
||||||
</h1>
|
</h1>
|
||||||
<button class="button" id="BUTTON">Press</button>
|
<button class="button is-primary" id="BUTTON">Press</button>
|
||||||
</div>
|
|
||||||
<div><br></div>
|
|
||||||
<div>
|
|
||||||
<h1 class="title" id="COUNT">{{ pressed }}</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<div><br></div>
|
||||||
<script src="{% static 'ui/button.js' %}"></script>
|
<div>
|
||||||
</body>
|
<h1 class="title" id="COUNT">{{ pressed }}</h1>
|
||||||
|
</div>
|
||||||
</html>
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user