Skip to content

Commit

Permalink
chore: Added the main website from Weather.io
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed Jan 4, 2024
1 parent 1468667 commit de2bd14
Show file tree
Hide file tree
Showing 107 changed files with 1,808,332 additions and 951 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"extends": ["config:base"],
"packageRules": [
{
"matchPackagePatterns": ["^@acme/"],
"matchPackagePatterns": ["^@weatherio/"],
"enabled": false
}
],
Expand Down
7 changes: 7 additions & 0 deletions apps/web/next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('next-i18next').UserConfig} */
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'de']
}
}
17 changes: 0 additions & 17 deletions apps/web/next.config.js

This file was deleted.

39 changes: 39 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Importing env files here to validate on build
import "./src/env.mjs";
import withBundleAnalyzer from '@next/bundle-analyzer'
import pkg from './next-i18next.config.js'
import withPWAInit from "@ducanh2912/next-pwa";
import {withAxiom} from "next-axiom";

const withPWA = withPWAInit({
dest: 'public',
fallbacks: {
document: '/_offline',
}
});

const { i18n } = pkg

// create the bundle analyzer config
const withMyBundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true'
})

/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
*/
!process.env.SKIP_ENV_VALIDATION && (await import('./src/env.mjs'))


/** @type {import("next").NextConfig} */
const config = withMyBundleAnalyzer(withPWA(
withAxiom({
reactStrictMode: true,

/** Enables hot reloading for local packages without a build step */
transpilePackages: ["@weatherio/api", "@weatherio/ui", "@weatherio/types"],
}))
)

export default config;
44 changes: 28 additions & 16 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@acme/nextjs",
"name": "@weatherio/web",
"version": "0.1.0",
"private": true,
"type": "module",
Expand All @@ -14,31 +14,43 @@
"with-env": "dotenv -e ../../.env --"
},
"dependencies": {
"@acme/api": "workspace:^0.1.0",
"@acme/ui": "workspace:^0.1.0",
"@ducanh2912/next-pwa": "^10.1.0",
"@hookform/resolvers": "^3.3.4",
"@legendapp/state": "^2.1.4",
"@next/bundle-analyzer": "^14.0.4",
"@t3-oss/env-nextjs": "^0.7.1",
"@tanstack/react-query": "^5.8.7",
"@tanstack/react-query-devtools": "^5.8.7",
"@tanstack/react-query-next-experimental": "5.8.7",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"geist": "^1.2.0",
"@trpc/client": "^10.45.0",
"@trpc/next": "^10.45.0",
"@trpc/react-query": "^10.45.0",
"@trpc/server": "^10.45.0",
"@weatherio/api": "workspace:^0.1.0",
"@weatherio/types": "workspace:^0.1.0",
"@weatherio/ui": "workspace:^0.1.0",
"classnames": "^2.5.1",
"next": "^14.0.4",
"next-i18next": "^15.1.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.49.2",
"react-html-parser": "^2.0.2",
"react-icons": "^4.12.0",
"react-spinners": "^0.13.8",
"sonner": "^1.3.1",
"superjson": "2.2.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@acme/eslint-config": "workspace:^0.2.0",
"@acme/prettier-config": "workspace:^0.1.0",
"@acme/tailwind-config": "workspace:^0.1.0",
"@acme/tsconfig": "workspace:^0.1.0",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/react-html-parser": "^2.0.6",
"@weatherio/eslint-config": "workspace:^0.2.0",
"@weatherio/prettier-config": "workspace:^0.1.0",
"@weatherio/tailwind-config": "workspace:^0.1.0",
"@weatherio/tsconfig": "workspace:^0.1.0",
"dotenv-cli": "^7.3.0",
"eslint": "^8.56.0",
"prettier": "^3.1.1",
Expand All @@ -48,10 +60,10 @@
"eslintConfig": {
"root": true,
"extends": [
"@acme/eslint-config/base",
"@acme/eslint-config/nextjs",
"@acme/eslint-config/react"
"@weatherio/eslint-config/base",
"@weatherio/eslint-config/nextjs",
"@weatherio/eslint-config/react"
]
},
"prettier": "@acme/prettier-config"
"prettier": "@weatherio/prettier-config"
}
Binary file modified apps/web/public/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/web/public/locales/de/404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"title": "404 - Seite nicht gefunden"
}
26 changes: 26 additions & 0 deletions apps/web/public/locales/de/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"title": "Weather.io",
"location": "Deutschland",

"start button": "Suche deinen Standort",
"share button": "Teilen",
"menu home": "Start",
"menu locations": "Orte",
"menu settings": "Einstellungen",
"menu contact": "Kontakt",
"footer legal": "Rechtliches",
"footer contributors": "Mitwirkende",

"search page title": "Suche - Weather.io",

"miles per hour": "Meilen pro Stunde",
"kilometers per hour": "Kilometer pro Stunde",
"knots": "Knoten",
"meters per second": "Meter pro Sekunde",
"beaufort": "Beaufort",

"share text": "Checke doch mal diese Seite aus: ",

"title 404 page": "404: Seite nicht gefunden",
"title offline page": "Offline"
}
15 changes: 15 additions & 0 deletions apps/web/public/locales/de/contact.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"send button": "Senden",
"sent button": "Gesendet",
"first name": "Vorname",
"last name": "Nachname",
"email": "Email",
"message": "Nachricht",

"sent toast": "Nachricht gesendet",
"sending email loading toast": "Email wird gesendet...",

"invalid email": "Ungültige Email",
"at least 2 characters": "Dieses Feld muss mindestens 2 Zeichen enthalten",
"at least 10 characters": "Dieses Feld muss mindestens 10 Zeichen enthalten"
}
6 changes: 6 additions & 0 deletions apps/web/public/locales/de/contributors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"made with love text": "Mit <span <span class=\"text-4xl\" style=\"color: rgb(239 68 68)\">♥️</span> gemacht von",
"founder": "Gründer",
"engineer": "Entwickler",
"designer": "Designer"
}
72 changes: 72 additions & 0 deletions apps/web/public/locales/de/home.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"today": "Heute",
"9 day forecast": "9 Tage Vorhersage",
"precipitation": "Niederschlag",
"feels like": "Gefühlte Temperatur",
"visibility": "Sicht",
"wind pressure": "Wind",
"air quality": "Luftqualität",
"pressure": "Luftdruck",
"speed": "Geschwindigkeit",
"moon phase": "Mondphase",

"early morning": "Früh",
"morning": "Morgen",
"noon": "Mittag",
"afternoon": "Nachmittag",
"night": "Nacht",

"feels like phrase very warm": "Die Sonne probiert sich abzukühlen!",
"feels like phrase warm": "Dein Eis schmilzt dir davon!",
"feels like phrase moderate": "Perfektes Wetter für einen Spaziergang!",
"feels like phrase cold": "Sogar Pinguine bestellen sich eine heiße Schokolade!",
"feels like phrase very cold": "Auch die Schneemänner frieren!",

"air quality text very poor": "Sehr schlecht",
"air quality text poor": "Schlecht",
"air quality text fair": "Mäßig",
"air quality text moderate": "Mittel",
"air quality text good": "Gut",
"air quality text excellent": "Sehr gut",

"sunset": "Sonnenuntergang",
"sunrise": "Sonnenaufgang",

"weather state stormy": "Stürmisch",
"weather state snowy": "Schnee",
"weather state rainy": "Regen",
"weather state very cloudy": "Stark bewölkt",
"weather state cloudy": "Bewölkt",
"weather state windy": "Windig",
"weather state sunny": "Sonnig",

"this hour": "Diese Stunde",
"early hour time ending": ":00",
"late hour time ending": ":00",

"9 day forecast card content": "Die Vorhersage für die nächsten 9 Tage. <br />Die <span class=\"font-semibold\">Temperaturen</span> sind die durchschnittlichen Temperaturen des Tages. Eine für den Tag, eine für die Nacht.",

"precipitation card title": "Derzeitige Niederschlagswahrscheinlichkeit",

"feels like card content": "Die gefühlte Temperatur ist die Temperatur, die du spürst, wenn du draußen bist.<br /> Sie wird durch die Temperatur, die Luftfeuchtigkeit und den Wind beeinflusst.",

"visibility card title": "Derzeitige Sichtweite",

"wind pressure card title": "Derzeitiger Wind",

"not available": "Nicht verfügbar",

"moon phase card title": "Derzeitige Mondphase",
"moon phase card content": "Die Mondphase ist die Form des Mondes, die wir von der Erde aus sehen können.",

"moon phase new moon": "Neumond",
"moon phase waxing crescent": "Zunehmende Sichel",
"moon phase first quarter": "Erstes Viertel",
"moon phase waxing gibbous": "Zunehmender Mond",
"moon phase full moon": "Vollmond",
"moon phase waning gibbous": "Abnehmender Mond",
"moon phase last quarter": "Letztes Viertel",

"more information": "Mehr Informationen",
"sun hours": "Sonnenstunden"
}
5 changes: 5 additions & 0 deletions apps/web/public/locales/de/legal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main text": "Die Inhalte dieser Website wurden sorgfältig geprüft und erstellt. Wir übernehmen jedoch keine Gewähr für die Richtigkeit, Vollständigkeit und Aktualität der bereitgestellten Informationen. Wir haften nicht für Schäden oder Verluste, die durch die Nutzung dieser Website entstehen. Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich. Jegliche Haftung für fremde Inhalte wird ausdrücklich ausgeschlossen.",
"germany": "Deutschland",
"information disclaimer": "Informationen gemäß § 5 TMG"
}
13 changes: 13 additions & 0 deletions apps/web/public/locales/de/locationsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"add new location": "Füge einen Ort hinzu",
"add new location button": "Hinzufügen",
"search input placeholder": "Suche deinen Standort",

"at least one city toast": "Du musst mindestens eine Stadt haben",
"switched to city toast": "Stadt gewechselt!",
"added city toast": "Neue Stadt hinzugefügt!",
"city not found toast": "Stadt nicht gefunden!",
"try again toast": "Versuche es erneut!",

"my location button": "Meinen Standort auswählen"
}
4 changes: 4 additions & 0 deletions apps/web/public/locales/de/offline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Du bist offline",
"message": "Bitte überprüfe deine Internetverbindung und versuche es erneut."
}
6 changes: 6 additions & 0 deletions apps/web/public/locales/de/search.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"search input placeholder": "Suche deinen Standort",
"continue button": "Weiter -->",

"my location button": "Meinen Standort auswählen"
}
8 changes: 8 additions & 0 deletions apps/web/public/locales/de/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"temperature units": "Temperatureinheit",
"wind speed units": "Windgeschwindigkeitseinheit",
"language": "Sprache",

"english": "Englisch",
"german": "Deutsch"
}
3 changes: 3 additions & 0 deletions apps/web/public/locales/en/404.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"title": "404 - Page Not Found"
}
26 changes: 26 additions & 0 deletions apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"title": "Weather.io",
"location": "Global",

"start button": "Find your location",
"share button": "Share",
"menu home": "Home",
"menu locations": "Locations",
"menu settings": "Settings",
"menu contact": "Contact Us",
"footer legal": "Legal",
"footer contributors": "Contributors",

"search page title": "Search - Weather.io",

"miles per hour": "Miles per hour",
"kilometers per hour": "Kilometers per hour",
"knots": "Knots",
"meters per second": "Meters per second",
"beaufort": "Beaufort",

"share text": "Check out this page: ",

"title 404 page": "404: This page could not be found",
"title offline page": "Offline"
}
15 changes: 15 additions & 0 deletions apps/web/public/locales/en/contact.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"send button": "Send",
"sent button": "Sent",
"first name": "First name",
"last name": "Last name",
"email": "Email",
"message": "Message",

"sent toast": "Message sent!",
"sending email loading toast": "Sending email...",

"invalid email": "Invalid email address",
"at least 2 characters": "This field must contain at least 2 characters",
"at least 10 characters": "This field must contain at least 10 characters"
}
6 changes: 6 additions & 0 deletions apps/web/public/locales/en/contributors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"made with love text": "Made with <span class=\"text-4xl\" style=\"color: rgb(239 68 68)\">♥\uFE0F</span> by",
"founder": "Founder",
"engineer": "Engineer",
"designer": "Designer"
}
Loading

0 comments on commit de2bd14

Please sign in to comment.