diff --git a/.gitea/workflows/pipeline.yml b/.gitea/workflows/pipeline.yml index 58cb12c..0aaa14e 100644 --- a/.gitea/workflows/pipeline.yml +++ b/.gitea/workflows/pipeline.yml @@ -7,24 +7,26 @@ on: jobs: build: - runs-on: ubuntu-latest - + runs-on: ubuntu-docker steps: + - name: Checkout code uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log in to Gitea Container Registry - run: echo "${{ secrets.GITEA_PASSWORD }}" | docker login ${{ secrets.GITEA_REGISTRY }} -u ${{ secrets.GITEA_USERNAME }} --password-stdin + uses: docker/login-action@v3 + with: + password: ${{ secrets.PASSWORD }} + username: ${{ secrets.USERNAME }} + registry: git.thecodedom.com - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: context: . push: true - tags: ${{ secrets.GITEA_REGISTRY }}/smig/dotechbro-website:latest + tags: git.thecodedom.com/dotechbro/dotechbro-website:latest - - name: Log out from Gitea Container Registry - run: docker logout ${{ secrets.GITEA_REGISTRY }} diff --git a/index.html b/index.html index fc21b25..9e81bd6 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,18 @@ + + + + + + Do Tech Bro + - - - - - - Vite + React - - - -
- - - - \ No newline at end of file + +
+ + + diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..2ddef46 Binary files /dev/null and b/public/favicon.png differ diff --git a/src/components/MailingListDialog.jsx b/src/components/MailingListDialog.jsx index eafc16f..b1340c8 100644 --- a/src/components/MailingListDialog.jsx +++ b/src/components/MailingListDialog.jsx @@ -1,96 +1,107 @@ -import React, { useState } from 'react'; -import Dialog from '@mui/material/Dialog'; -import DialogActions from '@mui/material/DialogActions'; -import DialogContent from '@mui/material/DialogContent'; -import DialogContentText from '@mui/material/DialogContentText'; -import DialogTitle from '@mui/material/DialogTitle'; -import Button from '@mui/material/Button'; -import TextField from '@mui/material/TextField'; +import React, { useState } from "react"; +import Dialog from "@mui/material/Dialog"; +import DialogActions from "@mui/material/DialogActions"; +import DialogContent from "@mui/material/DialogContent"; +import DialogContentText from "@mui/material/DialogContentText"; +import DialogTitle from "@mui/material/DialogTitle"; +import Button from "@mui/material/Button"; +import TextField from "@mui/material/TextField"; const MailingListDialog = ({ open, onClose }) => { - const [name, setName] = useState(''); - const [email, setEmail] = useState(''); - const [error, setError] = useState(''); - const [success, setSuccess] = useState(''); + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [error, setError] = useState(""); + const [success, setSuccess] = useState(""); - const handleSubmit = (e) => { - e.preventDefault(); - setError(''); - setSuccess(''); + const handleSubmit = (e) => { + e.preventDefault(); + setError(""); + setSuccess(""); - const form = document.createElement('form'); - form.action = 'https://tech.us9.list-manage.com/subscribe/post'; - form.method = 'POST'; - form.target = '_blank'; + const form = document.createElement("form"); + form.action = "https://tech.us9.list-manage.com/subscribe/post"; + form.method = "POST"; + form.target = "_blank"; - const hiddenFields = { - u: 'aaf43cf1740b320b738dade27', - id: '344e2f39e6', - MERGE1: name, - MERGE0: email, - }; - - Object.keys(hiddenFields).forEach((key) => { - const input = document.createElement('input'); - input.type = 'hidden'; - input.name = key; - input.value = hiddenFields[key]; - form.appendChild(input); - }); - - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); - - setSuccess('Thank you for subscribing!'); - setName(''); - setEmail(''); + const hiddenFields = { + u: "aaf43cf1740b320b738dade27", + id: "344e2f39e6", + MERGE1: name, + MERGE0: email, }; - return ( - - Join Our Mailing List - - - Stay updated with the latest news and updates from Do Tech Bro. - - setName(e.target.value)} - /> - setEmail(e.target.value)} - /> - - We promise not to sell your information or email you more than once or twice a month. - - {error && {error}} - {success && {success}} - - - - - - - ); + Object.keys(hiddenFields).forEach((key) => { + const input = document.createElement("input"); + input.type = "hidden"; + input.name = key; + input.value = hiddenFields[key]; + form.appendChild(input); + }); + + document.body.appendChild(form); + form.submit(); + document.body.removeChild(form); + + setSuccess("Thank you for subscribing!"); + setName(""); + setEmail(""); + onClose(); + }; + + return ( + + Join Our Mailing List + + + Stay updated with the latest news and updates from Do Tech Bro. + + setName(e.target.value)} + /> + setEmail(e.target.value)} + /> + + We promise not to sell your information or email you more than once or + twice a month. + + {error && ( + + {error} + + )} + {success && ( + + {success} + + )} + + + + + + + ); }; -export default MailingListDialog; \ No newline at end of file +export default MailingListDialog; +