diff --git a/frontend/old/indexold.html b/frontend/old/indexold.html deleted file mode 100644 index 7c8315961df42b3a8dfc6cbec2b8976859118415..0000000000000000000000000000000000000000 --- a/frontend/old/indexold.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - Wetter App - - -
-
-

Wetterdaten abrufen

-
- -
- -
- -
- -
- -
- -
-
- -
-

Wetterdaten

-

-      
-
- - - - diff --git a/frontend/old/script.js b/frontend/old/script.js deleted file mode 100644 index b8e1290f36e16b9d2b74b7a7c50dfb39975f2765..0000000000000000000000000000000000000000 --- 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 2e678f46cc74724909597007eef25e776a12c70b..0000000000000000000000000000000000000000 --- 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/package.json b/frontend/package.json index 3863d81d573034a5fc6ca7420892a77eb08eb8ed..b13b18d047a8fc72e0c635ed02b61bee9ea35a3a 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, 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/contact4.js b/frontend/src/components/contact4.js index 4a02157dc9776fc4218f628ccccb7ff1f57476bd..1f9c86e2f65919d918d6d87079fb67c72a049a43 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 fa137443ccb8fd7c84cbceae41c4744777829ff8..d018a567b8dec5960f9ac44b80aef5389ac1bf80 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 fa215ddde81e43f47812568b2c90999c27c952f5..0000000000000000000000000000000000000000 --- 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 d38add54474ba4fad6d53ec7bb965dd871ac0792..0000000000000000000000000000000000000000 --- 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}

-
-
- -
-
-
-
- ) -} - -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.css b/frontend/src/components/footer15.css index e996d8e0c94c9d5ccb25644d46a2a7aaf4c364a0..d9b1b5a1c32a160328415a36d25e5b269032c817 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 334ab85511e718c328af67a05570b47f1819069d..7b72f34b5a92fa42f4efd80570f8d81d71571ff4 100644 --- a/frontend/src/components/footer15.js +++ b/frontend/src/components/footer15.js @@ -32,35 +32,40 @@ const Footer15 = (props) => {
{props.logoAlt}
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,6 @@ Footer15.defaultProps = { copyright: "© 2024 Weather Applikation. All rights reserved.", privacyLink: "Privacy Policy", termsLink: "Terms of Use", - logoSrc: "../frontend/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 28ed99d46fecebb1071ff06129478c600858ba4a..f465fef399baf88f25dd96a32b158ded4c660803 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}
@@ -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 2558b7b2e645b65d632e7d722eddc31a6e47e9ce..3578f5a1af8be82a0e4dd8e5f32d3f5fe832527d 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/frontend/src/views/about.js b/frontend/src/views/about.js new file mode 100644 index 0000000000000000000000000000000000000000..9686191d15d0f58a0c4663403d62f683a39983e5 --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/frontend/src/views/contact.js b/frontend/src/views/contact.js new file mode 100644 index 0000000000000000000000000000000000000000..67d852754a3c5e12dcd31fd819a20105c0eb187c --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/frontend/src/views/historicalweather.js b/frontend/src/views/historicalweather.js new file mode 100644 index 0000000000000000000000000000000000000000..9184d7b74819eefc8110199e6b958ad3b1d58b26 --- /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 a4e0520b556143b9b5a360f8508303fa84ffdb67..245409a37a1ddb4a6fc7e2c6367c1205e2714bda 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) => {
-
- -