This commit is contained in:
41
.gitea/workflows/build.yaml
Normal file
41
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
name: build-image
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
jobs:
|
||||
brs-api:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
DOCKER_ORG: bissendorf
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.bissendorf.co
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get Meta
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: "{{defaultContext}}"
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
git.bissendorf.co/${{ env.DOCKER_ORG }}/louisa/louisas-website:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
git.bissendorf.co/${{ env.DOCKER_ORG }}/louisa/louisas-website:latest
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM busybox:1.36
|
||||
|
||||
# Create a non-root user to own the files and run our server
|
||||
RUN adduser -D web
|
||||
USER web
|
||||
WORKDIR /home/web
|
||||
|
||||
# Copy the static website
|
||||
COPY src/* .
|
||||
|
||||
# Run BusyBox httpd
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT [ "busybox", "httpd", "-f", "-v" ]
|
||||
CMD ["-p", "8080"]
|
||||
29
LICENSE
29
LICENSE
@ -1,18 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 bissendorf
|
||||
Copyright (c) 2025 Airbus
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
||||
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@ -1,3 +1 @@
|
||||
# louisas-website
|
||||
|
||||
Eine Webseite, in der der Nutzer eine zufällige Zahl erraten muss.
|
||||
# louisas-website
|
||||
81
src/index.html
Normal file
81
src/index.html
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Rate mal!</title>
|
||||
</head>
|
||||
|
||||
<body id="Seite">
|
||||
Rate meine
|
||||
<span style="color: rgb(4, 0, 255)">
|
||||
<strong>
|
||||
Zahl
|
||||
</strong>
|
||||
</span>
|
||||
<div class="center" style="margin-top: 20vh;">
|
||||
<div>
|
||||
<strong>
|
||||
Rate mal nh Zahl zwischen 1 und 10..!
|
||||
</strong>
|
||||
</div>
|
||||
<input type="number" id="InpZahl" min="1" max="10" autofocus />
|
||||
<button id="BtnRate" onclick="Raten()">Rate</button>
|
||||
|
||||
<div>
|
||||
<label id="lblRichtig"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<label id="lblZaehler" style="position: absolute; bottom: 5px; z-index: 0;">Zähler: 0</label>
|
||||
|
||||
<img src="https://i.gifer.com/4M57.gif" style="width: 100vw; position: absolute; top: 0; display: none;" id="ImgWin">
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<style>
|
||||
.center {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const MAXZAHL=10
|
||||
|
||||
let Zahl=Math.ceil(
|
||||
Math.random()*MAXZAHL
|
||||
)
|
||||
let Zaehler=0
|
||||
|
||||
function Raten() {
|
||||
let InpZahl=document.getElementById("InpZahl")
|
||||
let Geraten=+InpZahl.value
|
||||
console.log("Geraten: ", Geraten)
|
||||
|
||||
let lblRichtig=document.getElementById("lblRichtig")
|
||||
let BtnRate=document.getElementById("BtnRate")
|
||||
let ImgWin=document.getElementById("ImgWin")
|
||||
let Seite=document.getElementById("Seite")
|
||||
|
||||
if (Geraten==Zahl) {
|
||||
lblRichtig.innerHTML="Richtig"
|
||||
lblRichtig.style.color="black"
|
||||
BtnRate.disabled=true
|
||||
Seite.style.backgroundColor="green"
|
||||
ImgWin.style.display="block"
|
||||
} else {
|
||||
lblRichtig.innerHTML="Falsch"
|
||||
lblRichtig.style.color="black"
|
||||
Seite.style.backgroundColor="red"
|
||||
}
|
||||
|
||||
let lblZaehler=document.getElementById("lblZaehler")
|
||||
Zaehler=Zaehler+1
|
||||
lblZaehler.innerHTML="Zähler: "+Zaehler
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user