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:
|
||||
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 }}
|
||||
|
|
11
index.html
11
index.html
|
@ -1,17 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link 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="/vite.svg" />
|
||||
<link
|
||||
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" />
|
||||
<title>Vite + React</title>
|
||||
<title>Do Tech Bro</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
|
||||
</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 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('');
|
||||
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',
|
||||
u: "aaf43cf1740b320b738dade27",
|
||||
id: "344e2f39e6",
|
||||
MERGE1: name,
|
||||
MERGE0: email,
|
||||
};
|
||||
|
||||
Object.keys(hiddenFields).forEach((key) => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
const input = document.createElement("input");
|
||||
input.type = "hidden";
|
||||
input.name = key;
|
||||
input.value = hiddenFields[key];
|
||||
form.appendChild(input);
|
||||
|
@ -42,9 +42,10 @@ const MailingListDialog = ({ open, onClose }) => {
|
|||
form.submit();
|
||||
document.body.removeChild(form);
|
||||
|
||||
setSuccess('Thank you for subscribing!');
|
||||
setName('');
|
||||
setEmail('');
|
||||
setSuccess("Thank you for subscribing!");
|
||||
setName("");
|
||||
setEmail("");
|
||||
onClose();
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -76,10 +77,19 @@ const MailingListDialog = ({ open, onClose }) => {
|
|||
onChange={(e) => setEmail(e.target.value)}
|
||||
/>
|
||||
<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>
|
||||
{error && <DialogContentText className="mt-2 text-xs text-red-600">{error}</DialogContentText>}
|
||||
{success && <DialogContentText className="mt-2 text-xs text-green-600">{success}</DialogContentText>}
|
||||
{error && (
|
||||
<DialogContentText className="mt-2 text-xs text-red-600">
|
||||
{error}
|
||||
</DialogContentText>
|
||||
)}
|
||||
{success && (
|
||||
<DialogContentText className="mt-2 text-xs text-green-600">
|
||||
{success}
|
||||
</DialogContentText>
|
||||
)}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={onClose} color="primary">
|
||||
|
@ -94,3 +104,4 @@ const MailingListDialog = ({ open, onClose }) => {
|
|||
};
|
||||
|
||||
export default MailingListDialog;
|
||||
|
||||
|
|
Loading…
Reference in a new issue