diff --git a/.env b/.env index 3e4b531..56afd7f 100644 --- a/.env +++ b/.env @@ -5,12 +5,14 @@ REACT_APP_YEAR=2023 REACT_APP_ANDROID_URL="https://play.google.com/store/apps/details?id=com.mermsemr.myfit" REACT_APP_IOS_URL="https://play.google.com/store/apps/details?id=com.mermsemr.myfit" -REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" -REACT_APP_TWITTER="https://twitter.com/fluxtra" REACT_APP_APPSITE=" https://myfitapp.mermsemr.com" #REACT_APP_APPSITE="http://localhost:7012" +# Social Media Links +REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" +REACT_APP_TWITTER="https://twitter.com/fluxtra" + REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit" REACT_APP_FORM_TIMEOUT = 10000 diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 1b8caf4..bea1a8b 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -3008,11 +3008,17 @@ header.fix_style.white_header { margin-bottom: 15px; } -.blog_detail_section .blog_inner_pannel .review span { +.blog_detail_section .blog_inner_pannel span.blog_date { line-height: 1; + color: var(--purple); + display: flex; + font-weight: 700; + text-align: center; + justify-content: center; + align-items: center; } -.blog_detail_section .blog_inner_pannel .review span:first-child { +/* .blog_detail_section .blog_inner_pannel .review span:first-child { color: var(--purple); display: inline-block; font-weight: 700; @@ -3024,7 +3030,7 @@ header.fix_style.white_header { margin-left: 15px; padding-left: 15px; border-left: 1px solid var(--dark-purple); -} +} */ .blog_detail_section .blog_inner_pannel .section_title { margin-bottom: 40px; @@ -3043,29 +3049,29 @@ header.fix_style.white_header { } .blog_detail_section .blog_inner_pannel .info h3 { - font-weight: 700; - color: var(--dark-purple); - margin-top: 30px; - font-size: 25px; - margin-bottom: 15px; + font-weight: 700; + color: var(--dark-purple); + margin-top: 30px; + font-size: 25px; + margin-bottom: 15px; } /* To highlight the link in the terms section */ -.blog_detail_section .blog_inner_pannel .info p span a{ - color: var(--dark-purple); - text-decoration: underline; +.blog_detail_section .blog_inner_pannel .info p span a { + color: var(--dark-purple); + text-decoration: underline; } /* To reduce the fonts for sub-headers */ .blog_detail_section .blog_inner_pannel .info h4 { - font-weight: 700; - color: var(--dark-purple); - margin-top: 30px; - font-size: 20px; - margin-bottom: 15px; - } + font-weight: 700; + color: var(--dark-purple); + margin-top: 30px; + font-size: 20px; + margin-bottom: 15px; +} - /* To align the text for proper readability */ +/* To align the text for proper readability */ .blog_detail_section .blog_inner_pannel .info p { text-align: justify; } @@ -3526,39 +3532,71 @@ header.fix_style.white_header { } /* Textarea scrollbar */ -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar { +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar { width: 12px; cursor: pointer; } -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); border-radius: 10px; background-color: var(--light-bg); } -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar-thumb { +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar-thumb { border-radius: 10px; - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); background-color: var(--body-text-purple); } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn { display: flex !important; align-items: center; justify-content: center; } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn p{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn + p { margin: 0 !important; } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn > span{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn + > span { width: 24px; height: 24px; } -#contact_body{ +#contact_body { min-height: 48rem; display: flex; flex-direction: column; @@ -3567,7 +3605,7 @@ header.fix_style.white_header { gap: 10px; } -.contact_body{ +.contact_body { display: flex; flex-direction: column; align-content: center; @@ -3598,28 +3636,44 @@ header.fix_style.white_header { } /* For the err msg */ -#errText{ +#errText { text-align: center; color: tomato; font-weight: 600; } -.contact_page_section .contact_inner .contact_form form .form-group span{ +.contact_page_section .contact_inner .contact_form form .form-group span { font-size: 12px; color: tomato; padding: 3px; display: none; } -.contact_page_section .contact_inner .contact_form form .form-group input:valid[focused="true"]{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:valid[focused="true"] { border: 1px solid var(--dark-purple); } -.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"]{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:invalid[focused="true"] { border: 1px solid tomato; } -.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"] ~ span{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:invalid[focused="true"] + ~ span { display: block; } @@ -4689,19 +4743,20 @@ header.fix_style.white_header { /* Loader */ -.loader{ +.loader { border-radius: 100%; position: relative; } -.loader-sm{ +.loader-sm { width: 24px; height: 24px; } /* LOADER 1 */ -#loader-1:before, #loader-1:after{ +#loader-1:before, +#loader-1:after { content: ""; position: absolute; width: 100%; @@ -4711,24 +4766,24 @@ header.fix_style.white_header { border-top-color: var(--body-text-purple); } -#loader-1:before{ +#loader-1:before { z-index: 100; animation: spin 1.5s infinite; } -#loader-1:after{ +#loader-1:after { border: 3.5px solid #ccc; } -@keyframes spin{ - 0%{ +@keyframes spin { + 0% { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); } - 100%{ + 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); -o-transform: rotate(360deg); diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index ad83a2f..43a4623 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -1,47 +1,74 @@ +/** @format */ + import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import BGImg from "../../../assets/images/bread_crumb_bg.png"; -import BGImg1 from "../../../assets/images/bread_crumb_bg_one.png"; -import BGImg2 from "../../../assets/images/bread_crumb_bg_two.png"; import SiteService from "../../../vendors/service/siteService"; + const Main = ({ brdcum, bgimg }) => { const [blogData, setBlogData] = useState([]); - console.log(blogData); - const api = new SiteService(); + let api = new SiteService(); useEffect(() => { getBlogData(); }, []); const getBlogData = async () => { - try { - const res = await api.blogData(); + /* + The reason for this, is because of the breaking I had when building the blog + I decided to save to the local storage for an hour so that it won't need to be going to the server again but I can change this + */ + // Saving it locally to avoid interfering with server + if (localStorage.getItem("myFit--blogData") == null) { + try { + let res = await api.blogData(); - setBlogData(res.data); - - // console.log(res.data); - - - } catch (error) { - console.log("Error from blog data ", error); + // Set the blog data to local storage + localStorage.setItem("myFit--blogData", JSON.stringify(res.data)); + setBlogData(res.data); + // Set a time out for the blog data to be deleted from local storage + setTimeout(() => { + localStorage.removeItem("myFit--blogData"); + }, 3600); + } catch (error) { + console.log("Error from blog data ", error); + } + } else { + try { + let data = JSON.parse(localStorage.getItem("myFit--blogData")); + setBlogData(data); + } catch (error) { + console.error("Error parsing JSON data: ", error); + } } }; - + return ( <> -
{" "}
+
{" "}
{" "}
-
{" "}
+
{" "}
{" "}
-
{" "}
+
{" "}
Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.
-Printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unnown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys centuries, but also the leap into electronic.
-Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic.
-Lorem Ipsum is simply dummy text of the printing and typesetting in
Dustry lorem Ipsum has been the industrys standard dummy text ev er since the when
Unknown printer took a galley of type and scrambled it to make.
Type specimen book. It has survived not only five centuries, but also the leap into electronic.
Lorem Ipsum is simply dummy text of the printing.
Dustry lorem Ipsum has been the industrys standard dummy text ev er since.
Unknown printer took a galley of type and scrambled it to make.
Type specimen book. It has survived not only.
-
- Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.
-Mr. John Doe, Apper Inc
-Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic industry.
*/} -
- Tags:
- Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the in - dustrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
-
- Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the when.
-
- Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the in - dustrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.
-Your email address will not be published. Required fields are marked *
-Lorem Ipsum is simply dummy text of the printing and typese tting
indus orem Ipsum has beenthe standard dummy.
- 45 min ago
- Simply dummy text of the printing and typesetting industry lorem Ipsum has Lorem Ipsum is.
- READ MORE -
- 45 min ago
- Printing and typesetting industry lorem Ipsum has Lorem simply dummy text of the.
- READ MORE -