diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..cf904db --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,52 @@ +name: Create and publish a Docker image + +on: + push: + branches: ['release'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6d8c709 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM nginx:latest + +COPY nginx.conf /etc/nginx/conf.d/default.conf + +COPY . /usr/share/nginx/html + +WORKDIR /app +RUN chown -R nginx:nginx /app && chmod -R 755 /app && \ + chown -R nginx:nginx /var/cache/nginx && \ + chown -R nginx:nginx /var/log/nginx && \ + chown -R nginx:nginx /etc/nginx/conf.d +RUN touch /var/run/nginx.pid && \ + chown -R nginx:nginx /var/run/nginx.pid + +USER nginx + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] + diff --git a/download.js b/download.js new file mode 100644 index 0000000..2b3f3d7 --- /dev/null +++ b/download.js @@ -0,0 +1,12 @@ +function download(filename, text) { + var element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + element.setAttribute('download', filename); + + element.style.display = 'none'; + document.body.appendChild(element); + + element.click(); + + document.body.removeChild(element); + } \ No newline at end of file diff --git a/index.css b/index.css index f63f58f..e001cca 100644 --- a/index.css +++ b/index.css @@ -1,9 +1,28 @@ +.container { + display: flex; + flex-direction: row; + justify-content: flex-start; + + width: 100%; + + max-width: 1700px; +} + +.right { + width: 400px; + + display: flex; + flex-direction: column; + align-items: center; +} + .buttons { display: flex; flex-direction: row; + justify-content: flex-start; flex-wrap: wrap; - width: 100%; + width: calc(100% - 400px); } .btn { @@ -26,6 +45,7 @@ width: 250px; height: 250px; font-size: 1.5rem; + cursor: pointer; } .btn label { @@ -33,11 +53,64 @@ font-size: 1.5rem; } -.btn.reccomended { - justify-self: flex-end; +.btn.disabled { + opacity: 0.3; + pointer-events: none; } .btn.reccomended button { opacity: 0.7; pointer-events: none; + + border-color: blue; + color: blue; +} + +.btn.reccomended label { + color: blue; +} + +.log { + display: flex; + flex-direction: column; + align-items: flex-start; + + padding: 10px; + + margin: 20px; + + height: 230px; + width: 230px; + + overflow-y: scroll; + overflow-x: hidden; + + border: solid 1px gray; + border-radius: 2px; +} + +.log p { + margin: 0; + padding: 3px; + font-size: 1rem; + + width: 100%; +} + +.log p:nth-child(even) { + background-color: whitesmoke; +} + +#DOWNLOAD { + margin-top: -5px; + padding: 3px; + font-size: 1rem; + + cursor: pointer; +} + +.name { + font-style: italic; + opacity: 50%; + margin: 2px; } \ No newline at end of file diff --git a/index.html b/index.html index c5b6e15..caa635b 100644 --- a/index.html +++ b/index.html @@ -3,55 +3,65 @@
-