make it make sense now
All checks were successful
Build and Deploy Docker Image / build (push) Successful in 53s
All checks were successful
Build and Deploy Docker Image / build (push) Successful in 53s
close dialog after someone clicks subscribe fix: adjust v adjust revision adjustments adjustments adjusting fix testing testing testing testing testing tag may work now testing testing testing testing fix: owner feat: favicon and title fix
This commit is contained in:
parent
8c06947ebe
commit
88d1556f78
4 changed files with 123 additions and 109 deletions
|
@ -7,24 +7,26 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- 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
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
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 }}
|
|
||||||
|
|
19
index.html
19
index.html
|
@ -1,17 +1,18 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
|
<link
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
||||||
|
/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React</title>
|
<title>Do Tech Bro</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
<script type="module" src="/src/main.jsx"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
BIN
public/favicon.png
Normal file
BIN
public/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
|
@ -1,38 +1,38 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from "react";
|
||||||
import Dialog from '@mui/material/Dialog';
|
import Dialog from "@mui/material/Dialog";
|
||||||
import DialogActions from '@mui/material/DialogActions';
|
import DialogActions from "@mui/material/DialogActions";
|
||||||
import DialogContent from '@mui/material/DialogContent';
|
import DialogContent from "@mui/material/DialogContent";
|
||||||
import DialogContentText from '@mui/material/DialogContentText';
|
import DialogContentText from "@mui/material/DialogContentText";
|
||||||
import DialogTitle from '@mui/material/DialogTitle';
|
import DialogTitle from "@mui/material/DialogTitle";
|
||||||
import Button from '@mui/material/Button';
|
import Button from "@mui/material/Button";
|
||||||
import TextField from '@mui/material/TextField';
|
import TextField from "@mui/material/TextField";
|
||||||
|
|
||||||
const MailingListDialog = ({ open, onClose }) => {
|
const MailingListDialog = ({ open, onClose }) => {
|
||||||
const [name, setName] = useState('');
|
const [name, setName] = useState("");
|
||||||
const [email, setEmail] = useState('');
|
const [email, setEmail] = useState("");
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState("");
|
||||||
const [success, setSuccess] = useState('');
|
const [success, setSuccess] = useState("");
|
||||||
|
|
||||||
const handleSubmit = (e) => {
|
const handleSubmit = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setError('');
|
setError("");
|
||||||
setSuccess('');
|
setSuccess("");
|
||||||
|
|
||||||
const form = document.createElement('form');
|
const form = document.createElement("form");
|
||||||
form.action = 'https://tech.us9.list-manage.com/subscribe/post';
|
form.action = "https://tech.us9.list-manage.com/subscribe/post";
|
||||||
form.method = 'POST';
|
form.method = "POST";
|
||||||
form.target = '_blank';
|
form.target = "_blank";
|
||||||
|
|
||||||
const hiddenFields = {
|
const hiddenFields = {
|
||||||
u: 'aaf43cf1740b320b738dade27',
|
u: "aaf43cf1740b320b738dade27",
|
||||||
id: '344e2f39e6',
|
id: "344e2f39e6",
|
||||||
MERGE1: name,
|
MERGE1: name,
|
||||||
MERGE0: email,
|
MERGE0: email,
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(hiddenFields).forEach((key) => {
|
Object.keys(hiddenFields).forEach((key) => {
|
||||||
const input = document.createElement('input');
|
const input = document.createElement("input");
|
||||||
input.type = 'hidden';
|
input.type = "hidden";
|
||||||
input.name = key;
|
input.name = key;
|
||||||
input.value = hiddenFields[key];
|
input.value = hiddenFields[key];
|
||||||
form.appendChild(input);
|
form.appendChild(input);
|
||||||
|
@ -42,9 +42,10 @@ const MailingListDialog = ({ open, onClose }) => {
|
||||||
form.submit();
|
form.submit();
|
||||||
document.body.removeChild(form);
|
document.body.removeChild(form);
|
||||||
|
|
||||||
setSuccess('Thank you for subscribing!');
|
setSuccess("Thank you for subscribing!");
|
||||||
setName('');
|
setName("");
|
||||||
setEmail('');
|
setEmail("");
|
||||||
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -76,10 +77,19 @@ const MailingListDialog = ({ open, onClose }) => {
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<DialogContentText className="mt-2 text-xs text-gray-600">
|
<DialogContentText className="mt-2 text-xs text-gray-600">
|
||||||
We promise not to sell your information or email you more than once or twice a month.
|
We promise not to sell your information or email you more than once or
|
||||||
|
twice a month.
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
{error && <DialogContentText className="mt-2 text-xs text-red-600">{error}</DialogContentText>}
|
{error && (
|
||||||
{success && <DialogContentText className="mt-2 text-xs text-green-600">{success}</DialogContentText>}
|
<DialogContentText className="mt-2 text-xs text-red-600">
|
||||||
|
{error}
|
||||||
|
</DialogContentText>
|
||||||
|
)}
|
||||||
|
{success && (
|
||||||
|
<DialogContentText className="mt-2 text-xs text-green-600">
|
||||||
|
{success}
|
||||||
|
</DialogContentText>
|
||||||
|
)}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button onClick={onClose} color="primary">
|
<Button onClick={onClose} color="primary">
|
||||||
|
@ -94,3 +104,4 @@ const MailingListDialog = ({ open, onClose }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MailingListDialog;
|
export default MailingListDialog;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue