From a419b9f6357f3c4c5e3efc0f7f791aa71630d9b4 Mon Sep 17 00:00:00 2001
From: Lars Weiser <22wela1bdi@hft-stuttgart.de>
Date: Sun, 12 May 2024 16:31:06 +0200
Subject: [PATCH 1/3] link
---
frontend/package.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/frontend/package.json b/frontend/package.json
index 3863d81..b13b18d 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,5 +1,4 @@
{
- "homepage": "https://transfer.hft-stuttgart.de/pages/22kaen1bdi/swp_ss24_wetterdaten_sammeln",
"name": "weather-app",
"version": "1.0.0",
"private": true,
--
GitLab
From 2fcf6e381a73461514cf2bd79600dad75a0c2d76 Mon Sep 17 00:00:00 2001
From: Lars Weiser <22wela1bdi@hft-stuttgart.de>
Date: Sun, 12 May 2024 17:31:26 +0200
Subject: [PATCH 2/3] Updates
---
frontend/old/indexold.html | 42 ---------
frontend/old/script.js | 29 -------
frontend/old/styles.css | 50 -----------
frontend/src/components/contact4.js | 26 ++----
frontend/src/components/cta1.js | 6 +-
frontend/src/components/faq1.css | 101 ----------------------
frontend/src/components/faq1.js | 105 -----------------------
frontend/src/components/footer15.js | 9 +-
frontend/src/components/navbar4.js | 13 +--
frontend/src/index.js | 6 ++
frontend/src/views/about.css | 0
frontend/src/views/about.js | 23 +++++
frontend/src/views/contact.css | 0
frontend/src/views/contact.js | 23 +++++
frontend/src/views/historicalweather.css | 0
frontend/src/views/historicalweather.js | 23 +++++
frontend/src/views/home.js | 4 -
17 files changed, 98 insertions(+), 362 deletions(-)
delete mode 100644 frontend/old/indexold.html
delete mode 100644 frontend/old/script.js
delete mode 100644 frontend/old/styles.css
delete mode 100644 frontend/src/components/faq1.css
delete mode 100644 frontend/src/components/faq1.js
create mode 100644 frontend/src/views/about.css
create mode 100644 frontend/src/views/about.js
create mode 100644 frontend/src/views/contact.css
create mode 100644 frontend/src/views/contact.js
create mode 100644 frontend/src/views/historicalweather.css
create mode 100644 frontend/src/views/historicalweather.js
diff --git a/frontend/old/indexold.html b/frontend/old/indexold.html
deleted file mode 100644
index 7c83159..0000000
--- a/frontend/old/indexold.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Wetter App
-
-
-
-
-
-
-
diff --git a/frontend/old/script.js b/frontend/old/script.js
deleted file mode 100644
index b8e1290..0000000
--- a/frontend/old/script.js
+++ /dev/null
@@ -1,29 +0,0 @@
-function getData() {
- const city = document.getElementById("city").value;
- const start = document.getElementById("start").value;
- const end = document.getElementById("end").value;
- const storageOption = document.getElementById("storage").value;
- const formatOption = document.getElementById("format").value;
-
- const apiKey = "1244099aeaee4b179e6111803241304";
- const apiUrl = `https://api.weatherapi.com/v1/current.json?key=${apiKey}&q=${city}&aqi=no`;
-
- fetch(apiUrl)
- .then((response) => {
- if (!response.ok) {
- throw new Error("Network response was not ok");
- }
- return response.json();
- })
- .then((data) => {
- // Wetterdaten anzeigen
- document.getElementById("weatherData").innerText = JSON.stringify(
- data,
- null,
- 2
- );
- })
- .catch((error) => {
- console.error("There was a problem with the fetch operation:", error);
- });
-}
diff --git a/frontend/old/styles.css b/frontend/old/styles.css
deleted file mode 100644
index 2e678f4..0000000
--- a/frontend/old/styles.css
+++ /dev/null
@@ -1,50 +0,0 @@
-body {
- font-family: Arial, sans-serif;
- margin: 0;
- padding: 0;
-}
-
-.container {
- max-width: 800px;
- margin: 20px auto;
- padding: 20px;
- border: 1px solid #ccc;
- border-radius: 5px;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-}
-
-.box {
- margin-bottom: 20px;
-}
-
-.filter label {
- display: block;
- margin-bottom: 5px;
-}
-
-.filter input[type="text"],
-.filter select {
- width: 100%;
- padding: 8px;
- margin-bottom: 10px;
- border: 1px solid #ccc;
- border-radius: 5px;
-}
-
-.filter button {
- padding: 10px 20px;
- background-color: #007bff;
- color: #fff;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- transition: background-color 0.3s;
-}
-
-.filter button:hover {
- background-color: #0056b3;
-}
-
-#weatherData {
- white-space: pre-wrap; /* Umbruch von langen Zeilen */
-}
diff --git a/frontend/src/components/contact4.js b/frontend/src/components/contact4.js
index 4a02157..1f9c86e 100644
--- a/frontend/src/components/contact4.js
+++ b/frontend/src/components/contact4.js
@@ -23,9 +23,6 @@ const Contact4 = (props) => {
Email
-
- {props.content3}
-
{props.email1}
@@ -42,9 +39,6 @@ const Contact4 = (props) => {
Phone
-
- {props.content4}
-
{props.phone1}
@@ -61,9 +55,6 @@ const Contact4 = (props) => {
Office
-
- {props.content5}
-
{props.address1}
@@ -77,18 +68,13 @@ const Contact4 = (props) => {
}
Contact4.defaultProps = {
- email1: 'info@weatherapp.com',
+ email1: '22kaen1bdi@hft-stuttgart.de',
content2: 'Get in touch with us today!',
- address1: '123 Weather Street, City, Country',
+ address1: 'Schellingstraße 24, 70174 Stuttgart, Germany',
heading1: 'Contact Us',
- content1: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ',
+ content1: 'Contact our dear founder directly!',
phone1: '+123-456-7890',
- content3:
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.',
- content4:
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.',
- content5:
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.',
+
}
Contact4.propTypes = {
@@ -98,9 +84,7 @@ Contact4.propTypes = {
heading1: PropTypes.string,
content1: PropTypes.string,
phone1: PropTypes.string,
- content3: PropTypes.string,
- content4: PropTypes.string,
- content5: PropTypes.string,
+
}
export default Contact4
diff --git a/frontend/src/components/cta1.js b/frontend/src/components/cta1.js
index fa13744..d018a56 100644
--- a/frontend/src/components/cta1.js
+++ b/frontend/src/components/cta1.js
@@ -30,10 +30,10 @@ const CTA1 = (props) => {
}
CTA1.defaultProps = {
- action1: 'Get Weather Updates',
- heading1: 'Plan Your Day with Accurate Weather Forecasts',
+ action1: 'Weather history',
+ heading1: 'What was the Weather like yesterday?',
content1:
- 'Stay informed about the weather conditions in your city or any location worldwide.',
+ 'You can Download Historical Weather Data as far as 1940!',
action2: 'Try Now',
}
diff --git a/frontend/src/components/faq1.css b/frontend/src/components/faq1.css
deleted file mode 100644
index fa215dd..0000000
--- a/frontend/src/components/faq1.css
+++ /dev/null
@@ -1,101 +0,0 @@
-.faq1-faq7 {
- display: flex;
- overflow: hidden;
- position: relative;
- align-items: center;
- flex-direction: column;
-}
-.faq1-max-width {
- gap: var(--dl-space-space-fiveunits);
- display: flex;
- align-items: center;
- flex-direction: column;
-}
-.faq1-text1 {
- text-align: center;
-}
-.faq1-list-item1 {
- display: flex;
- align-self: stretch;
- align-items: flex-start;
- flex-direction: column;
-}
-.faq1-faq1-question {
- font-style: normal;
- text-align: center;
- font-weight: 600;
-}
-.faq1-list-item2 {
- display: flex;
- align-self: stretch;
- align-items: flex-start;
- flex-direction: column;
-}
-.faq1-faq2-question {
- font-style: normal;
- text-align: center;
- font-weight: 600;
-}
-.faq1-list-item3 {
- display: flex;
- align-self: stretch;
- align-items: flex-start;
- flex-direction: column;
-}
-.faq1-faq3-question {
- font-style: normal;
- text-align: center;
- font-weight: 600;
-}
-.faq1-list-item4 {
- display: flex;
- align-self: stretch;
- align-items: flex-start;
- flex-direction: column;
-}
-.faq1-faq4-question {
- font-style: normal;
- text-align: center;
- font-weight: 600;
-}
-.faq1-list-item5 {
- display: flex;
- align-self: stretch;
- align-items: flex-start;
- flex-direction: column;
-}
-.faq1-faq5-question {
- font-style: normal;
- text-align: center;
- font-weight: 600;
-}
-.faq1-content1 {
- gap: 16px;
- display: flex;
- align-self: stretch;
- align-items: center;
- flex-direction: column;
-}
-.faq1-text3 {
- text-align: center;
-}
-.faq1-container {
- display: flex;
- position: relative;
-}
-@media(max-width: 991px) {
- .faq1-max-width {
- gap: var(--dl-space-space-oneandhalfunits);
- }
-}
-@media(max-width: 767px) {
- .faq1-text1 {
- text-align: left;
- }
- .faq1-list {
- gap: var(--dl-space-space-twounits);
- }
- .faq1-button {
- width: 100%;
- }
-}
diff --git a/frontend/src/components/faq1.js b/frontend/src/components/faq1.js
deleted file mode 100644
index d38add5..0000000
--- a/frontend/src/components/faq1.js
+++ /dev/null
@@ -1,105 +0,0 @@
-import React from 'react'
-
-import PropTypes from 'prop-types'
-
-import './faq1.css'
-
-const FAQ1 = (props) => {
- return (
-
-
-
-
{props.heading1}
-
{props.content1}
-
-
-
-
- {props.faq1Question}
-
-
{props.faq1Answer}
-
-
-
- {props.faq2Question}
-
-
{props.faq2Answer}
-
-
-
- {props.faq3Question}
-
-
{props.faq3Answer}
-
-
-
- {props.faq4Question}
-
-
{props.faq4Answer}
-
-
-
- {props.faq5Question}
-
-
{props.faq5Answer}
-
-
-
-
-
{props.heading2}
-
{props.content2}
-
-
-
- {props.action1}
-
-
-
-
-
- )
-}
-
-FAQ1.defaultProps = {
- faq4Answer:
- 'Yes, you can view the weather forecast for the upcoming days to plan ahead.',
- faq5Question: 'How accurate is the weather data provided?',
- action1: 'Contact',
- faq1Question: 'How do I search for weather information?',
- faq4Question: 'Can I view the weather forecast for multiple days?',
- faq3Answer:
- 'Yes, the weather information is updated in real-time to provide you with the most accurate data.',
- faq3Question: 'Is the weather information updated in real-time?',
- content1:
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.',
- content2: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ',
- heading2: 'Still have a question?',
- heading1: 'FAQs',
- faq5Answer:
- 'The weather data is sourced from reliable sources to provide accurate and up-to-date information.',
- faq1Answer:
- 'You can input the city and country, or the latitude and longitude of the city in the search bar to get weather information.',
- faq2Answer:
- 'Yes, you can create an account and save your favorite cities for quick access to their weather information.',
- faq2Question: 'Can I save my favorite cities for quick access?',
-}
-
-FAQ1.propTypes = {
- faq4Answer: PropTypes.string,
- faq5Question: PropTypes.string,
- action1: PropTypes.string,
- faq1Question: PropTypes.string,
- faq4Question: PropTypes.string,
- faq3Answer: PropTypes.string,
- faq3Question: PropTypes.string,
- content1: PropTypes.string,
- content2: PropTypes.string,
- heading2: PropTypes.string,
- heading1: PropTypes.string,
- faq5Answer: PropTypes.string,
- faq1Answer: PropTypes.string,
- faq2Answer: PropTypes.string,
- faq2Question: PropTypes.string,
-}
-
-export default FAQ1
diff --git a/frontend/src/components/footer15.js b/frontend/src/components/footer15.js
index 334ab85..cd0b7ed 100644
--- a/frontend/src/components/footer15.js
+++ b/frontend/src/components/footer15.js
@@ -39,28 +39,33 @@ const Footer15 = (props) => {
window.open("https://www.facebook.com/HFTStuttgart/?locale=de_DE", "_blank")}
>
window.open("https://www.instagram.com/hft_stuttgart/", "_blank")}
>
window.open("https://twitter.com/Hftonline", "_blank")}
>
window.open("https://www.linkedin.com/school/hochschule-f%C3%BCr-technik-stuttgart-%E2%80%93-university-of-applied-sciences/", "_blank")}
>
-
+ window.open("https://www.youtube.com/channel/UCi0_JfF2qMZbOhOnNH5PyHA", "_blank")}>
@@ -91,7 +96,7 @@ Footer15.defaultProps = {
copyright: "© 2024 Weather Applikation. All rights reserved.",
privacyLink: "Privacy Policy",
termsLink: "Terms of Use",
- logoSrc: "../frontend/public/external/HFT-Logo.png",
+ logoSrc: "/public/external/HFT-Logo.png",
content2: "Stay updated with the latest weather information.",
logoAlt: "HFT-Logo",
content1: "Get accurate weather forecasts for any location.",
diff --git a/frontend/src/components/navbar4.js b/frontend/src/components/navbar4.js
index 28ed99d..f465fef 100644
--- a/frontend/src/components/navbar4.js
+++ b/frontend/src/components/navbar4.js
@@ -21,15 +21,18 @@ const Navbar4 = (props) => {
>
{props.link1}
-
{props.link2}
-
{props.link3}
+
(window.location.href = "/about")}>{props.link2}
+
(window.location.href = "/contact")}>{props.link3}
(window.location.href = "/data")}
>
{props.link4}
-
{props.link5}
+
(window.location.href = "/historicalweather")}>{props.link5}
{props.action1}
@@ -42,8 +45,8 @@ const Navbar4 = (props) => {
};
Navbar4.defaultProps = {
- link5: "Link5",
- link4: "Data",
+ link5: "Historical weather",
+ link4: "Current Weather",
link3: "Contact",
link2: "About",
link1: "Home",
diff --git a/frontend/src/index.js b/frontend/src/index.js
index 2558b7b..3578f5a 100644
--- a/frontend/src/index.js
+++ b/frontend/src/index.js
@@ -10,14 +10,20 @@ import {
import "./style.css";
import Home from "./views/home";
import Data from "./views/data";
+import About from "./views/about";
+import Contact from "./views/contact";
import NotFound from "./views/not-found";
+import Historicalweather from "./views/historicalweather";
const App = () => {
return (
+
+
+
diff --git a/frontend/src/views/about.css b/frontend/src/views/about.css
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/views/about.js b/frontend/src/views/about.js
new file mode 100644
index 0000000..9686191
--- /dev/null
+++ b/frontend/src/views/about.js
@@ -0,0 +1,23 @@
+import React from "react";
+
+import Navbar4 from "../components/navbar4";
+import Footer15 from "../components/footer15";
+import "./home.css";
+
+const About = (props) => {
+ //JS Code
+
+ return (
+
+ );
+};
+
+export default About;
\ No newline at end of file
diff --git a/frontend/src/views/contact.css b/frontend/src/views/contact.css
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/views/contact.js b/frontend/src/views/contact.js
new file mode 100644
index 0000000..67d8527
--- /dev/null
+++ b/frontend/src/views/contact.js
@@ -0,0 +1,23 @@
+import React from "react";
+
+import Navbar4 from "../components/navbar4";
+import Footer15 from "../components/footer15";
+import "./home.css";
+
+const Contact = (props) => {
+ //JS Code
+
+ return (
+
+ );
+};
+
+export default Contact;
\ No newline at end of file
diff --git a/frontend/src/views/historicalweather.css b/frontend/src/views/historicalweather.css
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/views/historicalweather.js b/frontend/src/views/historicalweather.js
new file mode 100644
index 0000000..9184d7b
--- /dev/null
+++ b/frontend/src/views/historicalweather.js
@@ -0,0 +1,23 @@
+import React from "react";
+
+import Navbar4 from "../components/navbar4";
+import Footer15 from "../components/footer15";
+import "./home.css";
+
+const Historicalweather = (props) => {
+ //JS Code
+
+ return (
+
+ );
+};
+
+export default Historicalweather;
\ No newline at end of file
diff --git a/frontend/src/views/home.js b/frontend/src/views/home.js
index a4e0520..245409a 100644
--- a/frontend/src/views/home.js
+++ b/frontend/src/views/home.js
@@ -10,7 +10,6 @@ import Features17 from "../components/features17";
import Features18 from "../components/features18";
import Features171 from "../components/features171";
import CTA1 from "../components/cta1";
-import FAQ1 from "../components/faq1";
import Contact4 from "../components/contact4";
import Footer15 from "../components/footer15";
import "./home.css";
@@ -46,9 +45,6 @@ const Home = (props) => {
-
-
-
--
GitLab
From 5bc2baeb28024bba6e4212ba04da19efb8cc1dc1 Mon Sep 17 00:00:00 2001
From: Lars Weiser <22wela1bdi@hft-stuttgart.de>
Date: Sun, 12 May 2024 17:45:45 +0200
Subject: [PATCH 3/3] newest
---
.../public/external/{HFT-Logo.png => HFT-Logo.jpg} | Bin
frontend/src/components/footer15.css | 2 +-
frontend/src/components/footer15.js | 3 +--
3 files changed, 2 insertions(+), 3 deletions(-)
rename frontend/public/external/{HFT-Logo.png => HFT-Logo.jpg} (100%)
diff --git a/frontend/public/external/HFT-Logo.png b/frontend/public/external/HFT-Logo.jpg
similarity index 100%
rename from frontend/public/external/HFT-Logo.png
rename to frontend/public/external/HFT-Logo.jpg
diff --git a/frontend/src/components/footer15.css b/frontend/src/components/footer15.css
index e996d8e..d9b1b5a 100644
--- a/frontend/src/components/footer15.css
+++ b/frontend/src/components/footer15.css
@@ -76,7 +76,7 @@
flex-direction: column;
}
.footer15-image1 {
- height: 4rem;
+ height: 6rem;
}
.footer15-social-links {
gap: var(--dl-space-space-twounits);
diff --git a/frontend/src/components/footer15.js b/frontend/src/components/footer15.js
index cd0b7ed..7b72f34 100644
--- a/frontend/src/components/footer15.js
+++ b/frontend/src/components/footer15.js
@@ -32,7 +32,7 @@ const Footer15 = (props) => {
@@ -96,7 +96,6 @@ Footer15.defaultProps = {
copyright: "© 2024 Weather Applikation. All rights reserved.",
privacyLink: "Privacy Policy",
termsLink: "Terms of Use",
- logoSrc: "/public/external/HFT-Logo.png",
content2: "Stay updated with the latest weather information.",
logoAlt: "HFT-Logo",
content1: "Get accurate weather forecasts for any location.",
--
GitLab