.gitignore upgedated

This commit is contained in:
Andreas Hnida 2024-02-27 14:51:32 +00:00
commit 3943e68460
17 changed files with 15 additions and 637 deletions

View file

@ -1,33 +0,0 @@
# Update the arg in docker-compose.yml or devcontainer.json to switch arg versions
ARG NODE_VERSION=18
# main image
FROM mcr.microsoft.com/devcontainers/javascript-node:${NODE_VERSION}
# Update the arg in docker-compose.yml or devcontainer.json to switch arg versions
ARG GO_VERSION=latest
ARG HUGO_VERSION=latest
# Download necessary tools
RUN apt-get update && apt-get install -y \
ca-certificates openssl git curl && \
rm -rf /var/lib/apt/lists/* && \
# set architecture
case $(uname -m) in \
aarch64) \
export ARCH=arm64 ;; \
*) \
export ARCH=amd64 ;; \
esac && \
# install Hugo
wget -O hugo_extended_${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${ARCH}.tar.gz && \
tar xf hugo_extended_${HUGO_VERSION}.tar.gz && \
mv hugo /usr/bin/hugo && \
rm hugo_extended_${HUGO_VERSION}.tar.gz && \
# install Go
wget -O go${GO_VERSION}.linux-${ARCH}.tar.gz https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
rm go${GO_VERSION}.linux-${ARCH}.tar.gz
# Export Go path
ENV PATH=$PATH:/usr/local/go/bin

View file

@ -1,24 +0,0 @@
{
"name": "Hugo",
"build": {
"dockerfile": "Dockerfile",
"args": {
"NODE_VERSION": "20",
"GO_VERSION": "1.21.4",
"HUGO_VERSION": "0.120.4"
}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"bradlc.vscode-tailwindcss",
"budparr.language-hugo-vscode",
"tamasfe.even-better-toml"
]
}
},
"remoteUser": "node",
"postCreateCommand": "npm install && npm run dev:example",
"forwardPorts": [1313]
}

View file

@ -1,14 +0,0 @@
; https://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

10
.gitignore vendored
View file

@ -15,6 +15,16 @@ jsconfig.json
hugo_stats.json
go.sum
yarn.lock
.devcontainer
.vscode
.editorconfig
.jshintrc
.markdownlint.json
.prettierrc
netlify.toml
vercel.json
vercel-build.sh
# don't ignore public/php
!public/php

View file

@ -1,59 +0,0 @@
{
"maxerr": 50,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": false,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"undef": true,
"unused": false,
"strict": true,
"maxparams": false,
"maxdepth": 4,
"maxstatements": false,
"maxcomplexity": false,
"maxlen": 400,
"browser": true,
"devel": true,
"asi": false,
"boss": false,
"debug": false,
"eqnull": false,
"es3": false,
"es5": false,
"esversion": 12,
"moz": false,
"evil": true,
"expr": true,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": true,
"multistr": true,
"noyield": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"shadow": false,
"sub": false,
"supernew": false,
"validthis": false,
"globals": {
"jQuery": false,
"google": false,
"$": false
}
}

View file

@ -1,5 +0,0 @@
{
"MD033": false,
"MD034": false,
"MD013": false
}

View file

@ -1,13 +0,0 @@
{
"plugins": ["prettier-plugin-go-template"],
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
}
}
]
}

View file

@ -1,7 +0,0 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"budparr.language-hugo-vscode",
"tamasfe.even-better-toml"
]
}

25
.vscode/tasks.json vendored
View file

@ -1,25 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"label": "Development",
"type": "shell",
"command": "yarn dev:example",
"isBackground": true,
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "Build",
"type": "shell",
"command": "yarn build:example",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View file

@ -1,84 +0,0 @@
{
// Place your verua.dev-1.andreashnida.de workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Insert Shortcode Columns": {
"scope": "markdown, md",
"prefix": "columns",
"body": [
"{{% columns %}}",
" $1",
"{{% /columns %}}",
],
"description": "Insert Shortcode Columns"
},
"Insert Shortcode Slider": {
"scope": "markdown, md",
"prefix": "slider",
"body": [
"{{% veruaslider %}}",
"{{% slide image=\"$1\" ${2:title=\"$4 \"} ${3:title=\"true \"} %}}",
"{{% /veruaslider %}}",
],
"description": "Insert Shortcode Slider"
},
"Insert Shortcode AclignCenter": {
"scope": "markdown, md",
"prefix": "AlignCenter",
"body": [
"{{% aligncenter %}}",
"$1",
"{{% /aligncenter %}}",
],
"description": "Insert Shortcode AlignCenter"
},
"Insert Shortcode Section": {
"scope": "markdown, md",
"prefix": "section",
"body": [
"{{% section %}}",
"$1",
"{{% /section %}}",
],
"description": "Insert Shortcode Section"
},
"Insert Shortcode card": {
"scope": "markdown, md",
"prefix": "card",
"body": [
"{{% card %}}",
"$1",
"{{% /card %}}",
],
"description": "Insert Shortcode Card"
},
"Insert Shortcode icon": {
"scope": "markdown, md",
"prefix": "icon",
"body": [
"{{% icon name=\"$1\" %}}",
],
"description": "Insert Shortcode Icon"
},
"Insert Shortcode Button": {
"scope": "markdown, md",
"prefix": "Button",
"body": [
"{{< button label=\"$1\" link=\"/\" style=\"solid\" >}}",
],
"description": "Insert Shortcode Button"
},
}

View file

@ -1,7 +0,0 @@
[build]
publish = "public"
command = "yarn project-setup; yarn build"
[build.environment]
HUGO_VERSION = "0.121.2"
GO_VERSION = "1.20.5"

View file

@ -1,109 +0,0 @@
<?php
header('Access-Control-Allow-Origin: *'); // Allow access from any origin
header('Content-Type: application/json'); // Set the response content type to JSON
header('Access-Control-Allow-Methods: POST'); // Allow only POST requests
require '../vendor/autoload.php'; // Adjust the path to Composer autoload.php
require 'message.php'; // Include the message.php file
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;
$mail = new PHPMailer(true);
mb_internal_encoding("UTF-8");
try {
// Receive and validate input data using filter_input()
$name = strip_tags(trim(filter_input(INPUT_POST, 'name') . ' ' . filter_input(INPUT_POST, 'vorname'))); // Add filter_input(INPUT_POST, 'nachname') to $name
$email = filter_var(trim(filter_input(INPUT_POST, 'email')), FILTER_SANITIZE_EMAIL);
$subject = strip_tags(trim(filter_input(INPUT_POST, 'formularart')));
// Construct the message using the function from message.php
$message = constructMessage();
$bot = false;
if (!empty(filter_input(INPUT_POST, 'verify_email'))) {
// Es handelt sich wahrscheinlich um einen Bot
$bot = true;
}
// Überprüfe die Zeit, die für das Ausfüllen des Formulars benötigt wurde
$timeSpent = filter_input(INPUT_POST, 'age', FILTER_VALIDATE_FLOAT);
// Setze plausiblen Mindestwert für die Zeit auf der Seite
$minimumTime = 5.0;
if ($timeSpent !== null && $timeSpent < $minimumTime) {
$subject = '$time: ' . $timeSpent . ' ' . $subject;
$bot = true;
}
// Überprüfe, ob der Nutzer mit der Seite interagiert hat
$userInteracted = filter_input(INPUT_POST, 'userInteracted');
if ($userInteracted === 'false') {
$subject = '$userInteracted: ' . $userInteracted . ' ' . $subject;
$bot = true;
}
if ($bot) {
// Es handelt sich wahrscheinlich um einen Bot
$subject = 'Botverdacht - ' . $subject;
}
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
// Invalid input
throw new Exception('Ungültige Eingabedaten.');
}
// Server settings
//$mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable this for detailed debugging
$mail->isSMTP(); // Use SMTP
$mail->Host = 'sslout.de'; // Set SMTP server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'ah@mediendesign-hnida.de'; // SMTP username
$mail->Password = 'jrd9h7RnVjf/'; // SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Enable encryption
$mail->Port = 465; // TCP port for the connection
// Recipients
$mail->setFrom($email, $name); // Sender address
$mail->addAddress('ah@mediendesign-hnida.de', 'Andreas Hnida'); // Add recipient
$mail->addReplyTo($email, $name); // Set reply address
$mail->addBCC('ah@mediendesign-hnida.de'); // Add bounce email address as BCC
// Content
$mail->isHTML(true); // Email in HTML format
$mail->CharSet = 'UTF-8';
$encodedSubject = mb_encode_mimeheader($subject, "UTF-8", "Q");
$mail->Subject = $encodedSubject;
$mail->Body = nl2br(htmlspecialchars($message));
$mail->AltBody = htmlspecialchars($message);
// Send email
if ($mail->send()) {
// Success response
echo json_encode(['success' => true, 'message' => 'Nachricht wurde gesendet.']);
http_response_code(200);
// Send a second email to the customer
$customerEmail = $email;
$customerSubject = 'Danke für Ihre Bestellung - Verua RaBe Websolutions';
$encodedSubject = mb_encode_mimeheader($customerSubject, "UTF-8", "Q");
$customerMessage = constructCustomerMessageDE($message);
$mail->clearAddresses();
$mail->addAddress($customerEmail);
$mail->Subject = $encodedSubject;
$mail->Body = nl2br(htmlspecialchars($customerMessage));
$mail->AltBody = htmlspecialchars($customerMessage);
$mail->send();
}
} catch (Exception $e) {
// Error response if an exception occurs
echo json_encode(['success' => false, 'message' => "Nachricht konnte nicht gesendet werden. Mailer Error: {$mail->ErrorInfo}"]);
}
?>

View file

@ -1,47 +0,0 @@
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php'; // Pfad zum Composer autoload.php anpassen
$mail = new PHPMailer(true);
try {
// Eingabedaten empfangen und validieren
$name = strip_tags(trim($_POST['name']));
$email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL);
$message = trim($_POST['message']);
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
// Ungültige Eingabe
throw new Exception('Ungültige Eingabedaten.');
}
// Servereinstellungen
//$mail->SMTPDebug = SMTP::DEBUG_SERVER; // Aktivieren Sie dies für detailliertes Debugging
$mail->isSMTP(); // SMTP verwenden
$mail->Host = 'sslout.de'; // SMTP-Server setzen
$mail->SMTPAuth = true; // SMTP-Authentifizierung aktivieren
$mail->Username = 'ah@mediendesign-hnida.de'; // SMTP-Benutzernamen angeben
$mail->Password = 'jrd9h7RnVjf/'; // SMTP-Passwort angeben
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Verschlüsselung aktivieren
$mail->Port = 465; // TCP-Port für die Verbindung
// Empfänger
$mail->setFrom($email, $name); // Absenderadresse
$mail->addAddress('ah@mediendesign-hnida.de', 'Andreas Hnida'); // Empfänger hinzufügen
$mail->addReplyTo($email, $name); // Antwortadresse setzen
$mail->addBCC('ah@mediendesign-hnida.de'); // Bounce-E-Mail-Adresse als BCC hinzufügen
// Inhalt
$mail->isHTML(true); // E-Mail im HTML-Format
$mail->Subject = 'Neue Nachricht vom Bestellformular der Website';
$mail->Body = nl2br(htmlspecialchars($message));
$mail->AltBody = htmlspecialchars($message);
$mail->send();
echo 'Nachricht wurde gesendet';
} catch (Exception $e) {
echo "Nachricht konnte nicht gesendet werden. Fehler: {$mail->ErrorInfo}";
}
?>

View file

@ -1,117 +0,0 @@
<?php
header('Access-Control-Allow-Origin: *'); // Erlaubt Zugriffe von jedem Ursprung
header('Content-Type: application/json'); // Setzt den Content-Type der Antwort auf JSON
function constructMessage() {
$message = "Formular: " . "\n" . filter_input(INPUT_POST, 'formularart') . "\n\n\n\n";
$organisation = filter_input(INPUT_POST, 'organisation');
if (isset($organisation)) {
$message .= "Organisation: " . "\n" . $organisation . "\n\n";
}
$message .= "ZSR Nummer: " . "\n" . filter_input(INPUT_POST, 'zsr_nummer') . "\n\n";
$message .= "EAN / GLN-Nr: " . "\n" . filter_input(INPUT_POST, 'ean_nummer') . "\n\n";
$message .= "Telefon: " . "\n" . filter_input(INPUT_POST, 'telefon') . "\n\n";
$message .= "Email: " . "\n" . filter_input(INPUT_POST, 'email') . "\n\n\n";
$message .= "Strasse: " . "\n" . filter_input(INPUT_POST, 'strasse') . "\n\n";
$message .= "PLZ Ort: " . "\n" . filter_input(INPUT_POST, 'plz_ort') . "\n\n";
$message .= "Geschlecht: " . "\n" . filter_input(INPUT_POST, 'gender') . "\n\n";
$message .= "Sprache: " . "\n" . filter_input(INPUT_POST, 'sprache') . "\n\n\n";
$message .= "Nachname: " . "\n" . filter_input(INPUT_POST, 'name') . "\n\n";
$message .= "Vorname: " . "\n" . filter_input(INPUT_POST, 'vorname') . "\n\n";
$message .= "Ansprechpartner Telefon: " . "\n" . filter_input(INPUT_POST, 'ansprechpartner_telefon') . "\n\n";
$message .= "Ansprechpartner Email: " . "\n" . filter_input(INPUT_POST, 'ansprechpartner_email') . "\n\n";
// Form inputs von Organisation
$organisationPaket = filter_input(INPUT_POST, 'organisation-paket');
if (isset($organisationPaket)) {
$message .= "Organisation Paket: " . "\n" . $organisationPaket . "\n\n";
}
// Form inputs von Organisation Zusatzmodule
$zusatzmodulDienstplan = filter_input(INPUT_POST, 'zusatzmodul-dienstplan');
if (isset($zusatzmodulDienstplan)) {
$message .= "Zusatzmodul Dienstplan: " . "\n" . $zusatzmodulDienstplan . "\n\n";
}
$zusatzmodulTourenplan = filter_input(INPUT_POST, 'zusatzmodul-tourenplan');
if (isset($zusatzmodulTourenplan)) {
$message .= "Zusatzmodul Tourenplan: " . "\n" . $zusatzmodulTourenplan . "\n\n";
}
// Form inputs von Erstbestellung
$bestehend = filter_input(INPUT_POST, 'bestehend');
if (isset($bestehend)) {
$message .= "Wünschen Sie einen neuer Server oder den Zugang zu einem bestehenden Team-Server?: " . "\n" . $bestehend . "\n\n";
}
$servername = filter_input(INPUT_POST, 'servername');
if (isset($servername)) {
$message .= "Bitte geben Sie den Namen des Servers an. Der Zugriff erfolgt immer über die Web-Adresse: https://wunschname.verua.ch: " . "\n" . $servername . "\n\n";
}
$modulpop2 = filter_input(INPUT_POST, 'modulpop2');
if (isset($modulpop2)) {
$message .= "Wünschen Sie die Erweiterung um das Modul POP2?: " . "\n" . $modulpop2 . "\n\n";
}
$materialverwaltung = filter_input(INPUT_POST, 'materialverwaltung');
if (isset($materialverwaltung)) {
$message .= "Benötigen Sie das Zusatzmodul Materialverwaltung?: " . "\n" . $materialverwaltung . "\n\n";
}
$qrcode = filter_input(INPUT_POST, 'qrcode');
if (isset($qrcode)) {
$message .= "Wünschen Sie die Erweiterung um das Modul QR-Code?: " . "\n" . $qrcode . "\n\n";
}
$wochenbett = filter_input(INPUT_POST, 'wochenbett');
if (isset($wochenbett)) {
$message .= "Benötigen Sie das Programm für Wochenbett-Betreuung?: " . "\n" . $wochenbett . "\n\n";
}
// Form inputs von Zusatzmodule Freiberufliche
$zusatzmodulPop2 = filter_input(INPUT_POST, 'zusatzmodul-pop2');
if (isset($zusatzmodulPop2)) {
$message .= "Zusatzmodul POP2" . "\n";
}
$zusatzmodulMaterialverwaltung = filter_input(INPUT_POST, 'zusatzmodul-materialverwaltung');
if (isset($zusatzmodulMaterialverwaltung)) {
$message .= "Zusatzmodul Materialverwaltung" . "\n";
}
$zusatzmodulQrCode = filter_input(INPUT_POST, 'zusatzmodul-qr-code');
if (isset($zusatzmodulQrCode)) {
$message .= "Zusatzmodul QR-Code" . "\n";
}
$zusatzmodulPerigon = filter_input(INPUT_POST, 'zusatzmodul-perigon');
if (isset($zusatzmodulPerigon)) {
$message .= "Zusatzmodul Perigon" . "\n";
}
$anmerkung = filter_input(INPUT_POST, 'anmerkung');
if (!empty($anmerkung)) {
$message .= "\n\n" . "Anmerkung: " . "\n" . $anmerkung . "\n\n";
}
return $message;
}
function constructCustomerMessageDE($bestellMessage) {
$message = "Sehr geehrte Damen und Herren" . "\n";
$message .= "Vielen Dank für Ihre Bestellung. Wir werden uns so schnell wie möglich bei Ihnen melden." . "\n\n";
$message .= "Freundliche Grüsse" . "\n";
$message .= "Ihr Verua Team" . "\n";
$message .= "RaBe Websolutions" . "\n";
$message .= "B. Rasberger" . "\n";
$message .= "Hauptstrasse 1" . "\n";
$message .= "CH-4417 Ziefen" . "\n\n";
$message .= "Telefon: +41 61 901 90 90" . "\n";
$message .= "E-Mail: support@verua.ch" . "\n";
$message .= "Web: www.verua.ch" . "\n\n";
$message .= "------------------------------------------------------------" . "\n\n";
$message .= "Hier noch einmal Ihre Angaben für Sie zur Überprüfung. Sollten Sie noch einen Fehler finden, informieren Sie uns bitte:" . "\n\n";
$message .= $bestellMessage;
return $message;
}

View file

@ -1,36 +1,12 @@
name = "Hugoplate"
name = "Verua.ch"
license = "MIT"
licenselink = "https://github.com/zeon-studio/hugoplate/blob/main/LICENSE"
description = "Hugoplate is a free starter template built with Hugo, and TailwindCSS, providing everything you need to jumpstart your Hugo project and save valuable time."
homepage = "https://github.com/zeon-studio/hugoplate"
demosite = "https://zeon.studio/preview?project=hugoplate"
description = "Theme for Hugo, a fast and modern static website engine. Used for Verua.ch. It is based on hugoplate. It is a fork of the themeplate theme by Zeon Studio."
homepage = "https://verua.ch"
min_version = "0.121.2"
tags = [
"blog",
"responsive",
"minimal",
"personal",
"light",
"dark",
"multilingual",
"landing",
"contact",
"dark mode",
"tailwindcss",
]
features = [
"Multi-Authors",
"Search",
"Multilingual",
"Dark Mode",
"Taxonomies",
]
[author]
name = "Zeon Studio"
homepage = "https://zeon.studio"
name = "Andreas Hnida"
homepage = "https://andreashnida.de "
[original]
author = "Zeon Studio"

View file

@ -1,43 +0,0 @@
#!/bin/bash
# default versions
NODE_VERSION='18.16.1';
GO_VERSION='1.20.5';
HUGO_VERSION='0.121.2';
# install Node.js
# echo "Installing Node.js $NODE_VERSION..."
# curl -sSOL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
# tar -xzf node-v${NODE_VERSION}.tar.gz
# export PATH=$PATH:/usr/local/bin
# rm -rf node-v${NODE_VERSION}.tar.gz
echo "USING NODE VERSION: $(node -v)"
# install Go
echo "Installing Go $GO_VERSION..."
curl -sSOL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
rm -rf go${GO_VERSION}.linux-amd64.tar.gz
go version
# install Hugo
echo "Installing Hugo $HUGO_VERSION..."
curl -sSOL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
tar -xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
mv hugo /usr/local/bin/
rm -rf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
hugo version
# project setup
echo "Project setting up..."
npm run project-setup
# install dependencies
echo "Installing project dependencies..."
npm install
# run the build command
echo "Running the build command..."
npm run build

View file

@ -1,21 +0,0 @@
{
"builds": [
{
"src": "vercel-build.sh",
"use": "@vercel/static-build",
"config": {
"distDir": "public"
}
}
],
"routes": [
{
"handle": "filesystem"
},
{
"src": "/(.*)",
"status": 404,
"dest": "/404.html"
}
]
}