From 4a0e1e614d5847a48cb19aec8918f416e1d88f43 Mon Sep 17 00:00:00 2001 From: 112Nisha <127508325+112Nisha@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:53:48 +0530 Subject: [PATCH 001/103] Outreach issue fixed --- src/about_data.json | 41 + src/analytics_data.json | 20 +- src/components/Card.jsx | 21 + src/components/Devcontent.jsx | 11 +- src/components/ExpComponent.jsx | 184 +++++ src/components/ExperimentCard.jsx | 3 +- src/components/ExperimentLoader.jsx | 781 +++++++++++++++++++ src/components/Footer.astro | 2 +- src/components/Navbar.astro | 990 +++++++++++++------------ src/components/OrderTable.jsx | 73 +- src/components/Role.astro | 56 +- src/components/chart.jsx | 80 +- src/components/exp.jsx | 5 + src/components/faqs.jsx | 241 +++--- src/components/flask.jsx | 17 + src/components/gears.jsx | 21 + src/components/landing-card1-image.jsx | 43 ++ src/components/landing-card1.jsx | 39 + src/components/landing-card2.jsx | 59 ++ src/components/landing-card3.jsx | 49 ++ src/components/loader.jsx | 4 +- src/components/outreach.jsx | 73 ++ src/components/people_card.jsx | 238 +----- src/components/random_experiment.jsx | 70 +- src/components/role.jsx | 2 +- src/components/search_filters.jsx | 42 +- src/components/testimonials.jsx | 11 +- src/components/timeline.jsx | 24 + src/css/Devcontent.css | 4 +- src/css/exp.css | 27 + src/css/faq.css | 24 +- src/css/gears.css | 176 +++++ src/css/landing-card1.css | 76 ++ src/css/landing-card2.css | 56 ++ src/css/landing-card3.css | 56 ++ src/css/linkcard.css | 59 ++ src/css/outreach.css | 59 ++ src/css/theme.css | 105 ++- src/css/timeline.css | 76 ++ src/devprocess_docs.json | 58 +- src/home_data.json | 16 +- src/layouts/Base.astro | 60 +- src/outreach.json | 26 +- src/pages/404.astro | 14 +- src/pages/VLEAD.astro | 141 ++++ src/pages/Vlabs.astro | 93 +++ src/pages/analytics.astro | 38 +- src/pages/development.astro | 208 ++++++ src/pages/experiments.astro | 28 +- src/pages/faq_page.astro | 9 +- src/pages/index.astro | 252 ++----- src/pages/outreach.astro | 561 ++++---------- src/pages/research.astro | 150 ++++ src/pages/virtual-box.astro | 31 + src/particlesjs-config.json | 110 +++ src/research_docs.json | 33 + 56 files changed, 4021 insertions(+), 1725 deletions(-) create mode 100644 src/about_data.json create mode 100644 src/components/Card.jsx create mode 100644 src/components/ExpComponent.jsx create mode 100644 src/components/ExperimentLoader.jsx create mode 100644 src/components/exp.jsx create mode 100644 src/components/flask.jsx create mode 100644 src/components/gears.jsx create mode 100644 src/components/landing-card1-image.jsx create mode 100644 src/components/landing-card1.jsx create mode 100644 src/components/landing-card2.jsx create mode 100644 src/components/landing-card3.jsx create mode 100644 src/components/outreach.jsx create mode 100644 src/components/timeline.jsx create mode 100644 src/css/exp.css create mode 100644 src/css/gears.css create mode 100644 src/css/landing-card1.css create mode 100644 src/css/landing-card2.css create mode 100644 src/css/landing-card3.css create mode 100644 src/css/linkcard.css create mode 100644 src/css/outreach.css create mode 100644 src/css/timeline.css create mode 100644 src/pages/VLEAD.astro create mode 100644 src/pages/Vlabs.astro create mode 100644 src/pages/development.astro create mode 100644 src/pages/research.astro create mode 100644 src/pages/virtual-box.astro create mode 100644 src/particlesjs-config.json create mode 100644 src/research_docs.json diff --git a/src/about_data.json b/src/about_data.json new file mode 100644 index 0000000..d659358 --- /dev/null +++ b/src/about_data.json @@ -0,0 +1,41 @@ +{ + "vlabs": { + "title": "Virtual Labs", + "description": "Making Engineering Education Engaging, Enjoyable, Immersive and Online", + "content": "The Virtual Labs project, which was established in 2009, represents a significant initiative of the Ministry of Education, Government of India. This innovative program, poised to drive a meaningful change in education and research in India, provides a platform for interactive learning through experiments.\n\nAmong the key groups targeted are students and faculty members of science and engineering colleges, who may lack access to high-quality laboratory facilities and equipment. Additionally, high school students are encouraged to explore their curiosity through the program, potentially inspiring them to pursue further studies in these fields.\n\nThe Virtual Labs project also seeks to create a network of researchers across different institutes, who can collaborate and share resources, thereby promoting the exchange of knowledge and ideas. Importantly, the project's content and teaching resources are designed to benefit engineering colleges and other institutions, making it a highly inclusive and impactful initiative.\n" + }, + "vlead": { + "title": "Virtual Labs Engineering and Architecture Design", + "description": "A Platform for Hands-On Learning in Engineering and Architecture", + "content": "The Virtual Labs Engineering and Architecture Design (VLEAD) project is an extension of the Virtual Labs initiative, aimed at providing a platform for hands-on learning in engineering and architecture. This project, which was launched in 2019, seeks to enhance the practical skills and knowledge of students and faculty members in these disciplines.\n\nVLEAD offers a range of virtual experiments and simulations in various engineering and architecture domains, allowing users to explore and understand complex concepts through interactive modules. The project covers a wide spectrum of topics, including civil engineering, mechanical engineering, electrical engineering, and architecture, among others.\n\nBy providing a virtual environment for experimentation and learning, VLEAD enables users to engage with real-world scenarios and challenges, thereby enhancing their problem-solving abilities and critical thinking skills. The project also aims to foster collaboration and knowledge sharing among students, faculty members, and researchers, creating a vibrant community of learners in the engineering and architecture domains.\n" + }, + "stats": { + "time": "Jan 2020 - Feb 2024", + "labs": 176, + "disciplines": 15, + "pageviews": "93.5 million", + "users": "14.6 million" + }, + "phases": [ + { + "phase": "Phase-1", + "years": "2009 - 2013", + "description": "Development of 27 Labs\n260 experiments across 4 domains\nOutreach Workshops" + }, + { + "phase": "Phase-2", + "years": "2014 - 2017", + "description": "Virtual Labs Platform on Open edX\nFOSS Conversion Methodology\nCentralized Integration Platform\nLab Hosting on Central Cloud\nPerformance Enhancements\nVersion Control on GitHub\nSecurity Enhancements\nIntegration Workshops\nLab Development Kits\nMaintenance of Labs\nOutreach Portal" + }, + { + "phase": "Phase-3", + "years": "2018 - 2020", + "description": "Centralized Analytics Reporting\nDevelopment of 2 CS Labs - 23 Data Structures experiments\nFOSS Conversion of 26 Labs\nAutomated Network Clusters\nPerformance Enhancements\nSecurity Enhancements\nPilot Translation of 2 Labs - Translated into Hindi & Telugu\nSummer/Winter/Remote Internships\nUniform UI across labs\nDeveloper Workshops\nMaintenance of Labs" + }, + { + "phase": "Ext-Phase-3", + "years": "2021 - 2026", + "description": "Development of 16 Labs - Year 1 & 2\n140 experiments across 4 domains\nAutomated Lab Deployment Tool\nEnhanced Cloud Architecture\nCommon Developer Tools\nVirtual Labs Mobile App" + } + ] +} diff --git a/src/analytics_data.json b/src/analytics_data.json index 644a48d..b1e7fe0 100644 --- a/src/analytics_data.json +++ b/src/analytics_data.json @@ -12,52 +12,52 @@ }, { "heading": "IITB", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_kgv1t9wy0c", "image": "https://cdn.vlabs.ac.in/logo/iitb.png" }, { "heading": "IITR", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_43b31nxy0c", "image": "https://cdn.vlabs.ac.in/logo/iitr.png" }, { "heading": "IITG", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_gx2abgxy0c", "image": "https://cdn.vlabs.ac.in/logo/iitg.png" }, { "heading": "IIITH", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_vg67w6wy0c", "image": "https://cdn.vlabs.ac.in/logo/iiith.png" }, { "heading": "IITD", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_e13vjdxy0c", "image": "https://cdn.vlabs.ac.in/logo/iitd.png" }, { "heading": "NITK", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_etrfqrxy0c", "image": "https://cdn.vlabs.ac.in/logo/nitk.png" }, { "heading": "Amrita", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/M1UPB", "image": "https://cdn.vlabs.ac.in/logo/amrita.png" }, { "heading": "Dayalbagh", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_hazvfvun0c", "image": "https://cdn.vlabs.ac.in/logo/dayalbagh.png" }, { "heading": "COEP", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/p_k1d13trl0c", "image": "https://cdn.vlabs.ac.in/logo/coep.png" }, { "heading": "Experiments", - "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/5fLPB", + "iframe_src": "https://lookerstudio.google.com/embed/reporting/b40ac724-41f1-4b46-ba1b-c83f65284092/page/IKsQB", "image": "https://cdn.vlabs.ac.in/logo/experiments.jpg" } ] diff --git a/src/components/Card.jsx b/src/components/Card.jsx new file mode 100644 index 0000000..f2d1c00 --- /dev/null +++ b/src/components/Card.jsx @@ -0,0 +1,21 @@ +import React from 'react'; +import '../css/linkcard.css' + +const Card = ({ title, body, href, img }) => { + return ( +
  • + +

    + {title} + +

    +
    + image +
    +

    {body}

    +
    +
  • + ); +}; + +export default Card; \ No newline at end of file diff --git a/src/components/Devcontent.jsx b/src/components/Devcontent.jsx index 9b4b047..0f2ed41 100644 --- a/src/components/Devcontent.jsx +++ b/src/components/Devcontent.jsx @@ -84,7 +84,11 @@ export function Devcontent(props) { ); } + +// use this function for document without contents menu export function Outreach_devcontent(props) { + + // pass "page" as a prop - either "workshop", or "workshop_faq", or pass the required raw github content url const [content, setContent] = useState(""); const [loaded, setLoaded] = useState(false); const [change, setchange] = useState(false); @@ -102,17 +106,20 @@ export function Outreach_devcontent(props) { `https://raw.githubusercontent.com/virtual-labs/outreach-web-pages-iiith/main/workshop-process/workshop-process.md` ); } + else{ + setUrl(props.page); + } setchange(true); }, []); useEffect(() => { const abc1 = async () => { if (change) { - if (props.page === "workshop") { + if (props.page !== "workshop_faq") { const response = await fetch(url); const text = await response.text(); setContent(text); - } else { + } else{ let new_text = "\n"; for (let i = 1; i < 14; i++) { const new_url = url + i + "/index.mdx"; diff --git a/src/components/ExpComponent.jsx b/src/components/ExpComponent.jsx new file mode 100644 index 0000000..2cf8af3 --- /dev/null +++ b/src/components/ExpComponent.jsx @@ -0,0 +1,184 @@ +// not in use + +import 'bulma/css/bulma.min.css'; +import { FcSearch } from 'react-icons/fc'; +import { AiOutlineArrowLeft, AiOutlineArrowRight } from 'react-icons/ai' +import ExperimentLoader from './ExperimentLoader.jsx'; +import React, { useState } from 'react'; +import { HiFilter } from 'react-icons/hi' +import { RxCounterClockwiseClock } from 'react-icons/rx' +import { AiFillExperiment, AiFillStar } from 'react-icons/ai' +import { BsFillBookmarkStarFill } from 'react-icons/bs'; +import "../css/theme.css" +import "../css/exp.css" +import Loader from './loader.jsx'; +function ExpComponent() { + const [experiments, setExperiments] = React.useState([]); + const [nav, setNav] = useState(3); + const [word, setWord] = useState(""); + const [page, setPage] = useState(1); + const [totalPage, setTotal] = useState(1); + const [Pop, setPop] = useState([]); + const [fetched, setFetched] = useState(false); + const LoadRecents = () => { + setPage(1) + setNav(1); + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("pop-tab").className = "dropdown-item" + document.getElementById("all-tabs").className = "dropdown-item" + document.getElementById("save-tabs").className = "dropdown-item" + document.getElementById("rec-tab").className = "dropdown-item is-active" + } + const LoadAll = () => { + setPage(1) + setNav(0); + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("pop-tab").className = "dropdown-item" + document.getElementById("rec-tab").className = "dropdown-item" + document.getElementById("save-tabs").className = "dropdown-item" + document.getElementById("all-tabs").className = "dropdown-item is-active" + } + const LoadSaved = () => { + setPage(1) + setNav(2); + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("pop-tab").className = "dropdown-item" + document.getElementById("all-tabs").className = "dropdown-item" + document.getElementById("rec-tab").className = "dropdown-item" + document.getElementById("save-tabs").className = "dropdown-item is-active" + } + const LoadPop = () => { + setPage(1) + setNav(3); + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + document.getElementById("rec-tab").className = "dropdown-item" + document.getElementById("all-tabs").className = "dropdown-item" + document.getElementById("save-tabs").className = "dropdown-item" + document.getElementById("pop-tab").className = "dropdown-item is-active" + } + const PrevPage = () => { + setPage(page - 1) + } + const NextPage = () => { + setPage(page + 1) + } + React.useEffect(() => { + const navsearch = sessionStorage.getItem("search") + if(navsearch) + { + setWord(navsearch) + sessionStorage.removeItem("search") + } + fetch("https://8kne7udek3.execute-api.ap-southeast-2.amazonaws.com/items") + .then((resp) => resp.json()) + .then((data) => { + setExperiments(data); + setTotal(Math.ceil(data.length / 8)) + let copy = [...data] + setPop(copy.sort((a, b) => b["Pageviews"] - a["Pageviews"])) + setFetched(true) + }); + }, []); + const SearchExp = (e) => { + setWord(e.target.value) + } + const ToggleFilter = () => { + if (!document.getElementById("filter-set").className.includes("is-hidden-desktop is-hidden-tablet")) { + document.getElementById("filter-set").className = document.getElementById("filter-set").className + " is-hidden-desktop is-hidden-tablet"; + document.getElementById("divider").className = document.getElementById("divider").className + " is-hidden-desktop is-hidden-tablet"; + } + else { + document.getElementById("filter-set").className = 'column is-2 is-hidden-mobile is-hidden-tablet-only mr-4'; + document.getElementById("divider").className = 'is-divider-vertical is-white is-hidden-mobile is-hidden-tablet-only'; + } + document.getElementById("filter-model").className = document.getElementById("filter-model").className + " is-active" + } + const DropTabs = () => { + if (document.getElementById("tabs").className.includes("is-active")) { + document.getElementById("tabs").className = "dropdown is-hidden-desktop" + } + else document.getElementById("tabs").className = document.getElementById("tabs").className + " is-active" + } + return ( + <> + + +
    + {/*
    + +
    */} +
    +
    +
    +

    + + + + +

    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    + + { + totalPage != 0 ? + : + {/* {fetched ? +

    No Results Found

    + : + } */} +
    } + + ); +} + +export default ExpComponent; \ No newline at end of file diff --git a/src/components/ExperimentCard.jsx b/src/components/ExperimentCard.jsx index 935d1ca..8722405 100644 --- a/src/components/ExperimentCard.jsx +++ b/src/components/ExperimentCard.jsx @@ -1,3 +1,5 @@ +// not in use + import * as React from "react"; import Box from "@mui/joy/Box"; import AspectRatio from "@mui/joy/AspectRatio"; @@ -132,7 +134,6 @@ export const ExperimentCard = ({ data }) => { mb: "6px", }} > - {console.log(data["Tags"])} {(data["Tags"].split(",")).map((tag, i) => ( {tag} diff --git a/src/components/ExperimentLoader.jsx b/src/components/ExperimentLoader.jsx new file mode 100644 index 0000000..d633bb3 --- /dev/null +++ b/src/components/ExperimentLoader.jsx @@ -0,0 +1,781 @@ +// not in use + +import React, { useState } from 'react' +import 'bulma/css/bulma.min.css'; +import 'bulma-divider' +import '@fortawesome/fontawesome-free/css/all.min.css' +import 'bulma-switch' +import { RxCounterClockwiseClock } from 'react-icons/rx' +import { AiFillExperiment, AiFillStar, AiFillStepBackward, AiFillDelete, AiFillSave } from 'react-icons/ai' +import { BsFillSave2Fill, BsFillBookmarkStarFill, BsFillBookmarkPlusFill, BsFillStickyFill } from 'react-icons/bs'; +import {ExpComponent} from 'cmp-exp-browser' +import "../css/theme.css" +import Loader from './loader'; +export default function ExperimentLoader(props) { + const [Instis, setInstis] = useState(["option1-Insti", "option2-Insti"]) + const [Discipline, setDiscipline] = useState(["option1-discipline", "option2-dis"]) + const [Display, setDisplay] = useState([]) + const [SelectInstis, setSelectInstis] = useState([]) + const [SelectDisciplines, setSelectDiscipline] = useState([]) + const [History, setHistory] = useState([]) + const [saved, setSaved] = useState([]) + const [saved_filters, setSavedFilters] = useState(JSON.parse(localStorage.getItem("Saved_Filters"))) + const [apply, setApply] = useState(1); + const [rename1, setRename1] = useState(0); + const [rename2, setRename2] = useState(0); + const [rename3, setRename3] = useState(0); + const [Exp,setExp] = useState([]) + const [Word,setWord] = useState("") + const disc = { + "Civil Engineering": "CIVIL", + "Computer Science and Engineering": "CSE", + "Electronics and Communication Engineering": "ECE", + "Electrical Engineering": "ELECTRICAL", + "Mechanical Engineering": "MECHANICAL", + "Biotechnology and Biomedical Engineering": "BIO-TECH", + "Chemical Sciences": "CHEM-SCI", + "Physical Sciences": "PHY-SCI", + "Chemical Engineering": "CHEMICAL", + } + + const IncludeDis = (element) => { + let copy = [...SelectDisciplines] + copy.push(element) + setSelectDiscipline(copy) + } + const ExcludeDis = (element) => { + let copy = [...SelectDisciplines] + let idx = copy.indexOf(element) + copy.splice(idx, 1) + setSelectDiscipline(copy) + } + const IncludeInsti = (element) => { + let copy = [...SelectInstis] + copy.push(element) + setSelectInstis(copy) + } + const ExcludeInsti = (element) => { + let copy = [...SelectInstis] + let idx = copy.indexOf(element) + copy.splice(idx, 1) + setSelectInstis(copy) + } + const CloseModal = () => { + document.getElementById("filter-model").className = "modal is-hidden-desktop"; + } + const OpenLink = (link) => { + let name + for (let i of Display) { + if (i["Experiment URL"]===link) + name = i["Experiment Name"] + } + var a = localStorage.getItem("history"); + if (a === null) a = "" + else a += "," + a = a.replace(name, "") + a += name + let links = a.split(","); + links = links.filter((ele) => { + return ele !=="" + }) + links.reverse() + setHistory(links.slice(0, 8)) + localStorage.setItem("history", a); + var win = window.open("https://" + link, '_blank'); + win.focus(); + } + const LoadRecents = () => { + document.getElementById("recent-tab").className = document.getElementById("recent-tab").className.replace("primary", "info") + document.getElementById("save-tab").className = document.getElementById("save-tab").className.replace("info", "primary") + document.getElementById("all-tab").className = document.getElementById("all-tab").className.replace("info", "primary") + document.getElementById("popular-tab").className = document.getElementById("popular-tab").className.replace("info", "primary") + props.settp(Math.ceil(History.length / 8)) + props.setp(1) + props.setNav(1); + } + const LoadSaved = () => { + document.getElementById("save-tab").className = document.getElementById("save-tab").className.replace("primary", "info") + document.getElementById("all-tab").className = document.getElementById("all-tab").className.replace("info", "primary") + document.getElementById("popular-tab").className = document.getElementById("popular-tab").className.replace("info", "primary") + document.getElementById("recent-tab").className = document.getElementById("recent-tab").className.replace("info", "primary") + props.settp(Math.ceil(saved.length / 8)) + props.setp(1) + props.setNav(2); + } + const LoadAll = () => { + document.getElementById("all-tab").className = document.getElementById("all-tab").className.replace("primary", "info") + document.getElementById("save-tab").className = document.getElementById("save-tab").className.replace("info", "primary") + document.getElementById("popular-tab").className = document.getElementById("popular-tab").className.replace("info", "primary") + document.getElementById("recent-tab").className = document.getElementById("recent-tab").className.replace("info", "primary") + props.settp(Math.ceil(Display.length / 8)) + props.setp(1) + props.setNav(0); + } + const LoadPop = () => { + document.getElementById("popular-tab").className = document.getElementById("recent-tab").className.replace("primary", "info") + document.getElementById("save-tab").className = document.getElementById("save-tab").className.replace("info", "primary") + document.getElementById("all-tab").className = document.getElementById("all-tab").className.replace("info", "primary") + document.getElementById("recent-tab").className = document.getElementById("popular-tab").className.replace("info", "primary") + props.settp(Math.ceil(History.length / 8)) + props.setp(1) + props.setNav(3); + } + const SaveFilter = () => { + let a = {}; + if (saved_filters) a = JSON.parse(JSON.stringify(saved_filters)) + if (!a || !a["Filter1"]) { + a["Filter1"] = { + Instis: JSON.parse(JSON.stringify(SelectInstis)), + Discipline: JSON.parse(JSON.stringify(SelectDisciplines)), + AltName: "Filter1" + } + window.alert("Saved as Filter1") + localStorage.setItem("Saved_Filters", JSON.stringify(a)); + setSavedFilters(a); + } + else if (!a["Filter2"]) { + a["Filter2"] = { + Instis: JSON.parse(JSON.stringify(SelectInstis)), + Discipline: JSON.parse(JSON.stringify(SelectDisciplines)), + AltName: "Filter2" + } + window.alert("Saved as Filter2") + localStorage.setItem("Saved_Filters", JSON.stringify(a)); + setSavedFilters(a); + } + else if (!a["Filter3"]) { + a["Filter3"] = { + Instis: JSON.parse(JSON.stringify(SelectInstis)), + Discipline: JSON.parse(JSON.stringify(SelectDisciplines)), + AltName: "Filter3" + } + window.alert("Saved as Filter3") + localStorage.setItem("Saved_Filters", JSON.stringify(a)); + setSavedFilters(a); + } + else { + window.alert("3 filters already saved. Delete some first") + } + } + const ToggleSave = (exp) => { + if (saved.includes(exp)) { + let a = localStorage.getItem("saved"); + a = a.replace(exp, "") + let saves = a.split(","); + saves = saves.filter((ele) => { + return ele !=="" + }) + setSaved(saves) + localStorage.setItem("saved", saves.join(",")) + } + else { + let a = localStorage.getItem("saved"); + a += "," + exp + let saves = a.split(","); + saves = saves.filter((ele) => { + return ele !=="" + }) + setSaved(saves) + localStorage.setItem("saved", saves.join(",")) + } + } + const ClearFilter = () => { + setSelectDiscipline([]) + setSelectInstis([]) + } + const ApplyFilter = (name) => { + setSelectDiscipline(saved_filters[name]["Discipline"]); + setSelectInstis(saved_filters[name]["Instis"]) + window.alert(saved_filters[name]["AltName"] + " Applied") + setApply(1); + } + const RenameFilter = (name) => { + if (name==="Filter1") setRename1(1 - rename1); + else if (name==="Filter2") setRename2(1 - rename2); + else if (name==="Filter3") setRename3(1 - rename3); + } + const ChangeName = (name, val) => { + if (val && val !=="") { + let a = JSON.parse(JSON.stringify(saved_filters)) + a[name]["AltName"] = val; + setSavedFilters(a) + localStorage.setItem("Saved_Filters", JSON.stringify(a)); + RenameFilter(name) + } + } + const DeleteFilter = (name) => { + let a = JSON.parse(JSON.stringify(saved_filters)) + a[name] = null; + setSavedFilters(a) + localStorage.setItem("Saved_Filters", JSON.stringify(a)); + window.alert("Filter deleted") + } + React.useEffect(()=>{ + const card = sessionStorage.getItem("selectedCard") + if(card) + { + setSelectDiscipline([card]) + sessionStorage.removeItem("selectedCard") + } + },[]) + React.useEffect(() => { + setExp(props.experiments) + setWord(props.word) + }, [props]); + React.useEffect(() => { + let arr = [] + let arr_dis = [] + for (let i of Exp) { + if (!arr.includes(i["Insitute Name"])) + arr.push(i["Insitute Name"]) + if (!arr_dis.includes(i["Discipline Name"])) + arr_dis.push(i["Discipline Name"]) + } + let a = "" + if (localStorage.getItem("history") !== undefined && localStorage.getItem("history") !== null) { + a = localStorage.getItem("history") + } + let links = a.split(",") + links = links.filter((ele) => { + return ele !=="" + }) + links.reverse() + if (localStorage.getItem("saved") === null) { + localStorage.setItem("saved", "") + } + else { + setSaved(localStorage.getItem("saved").split(",").filter((ele) => { + return ele !==""; + })) + } + setInstis(arr) + setDiscipline(arr_dis) + setDisplay(Exp) + setHistory(links) + }, [Exp]); + + React.useEffect(() => { + let arr = [] + let arr_after_search = [] + if (Word === "") { + arr_after_search = [...Exp] + } + else { + for (let i of Exp) { + if (i["Experiment Name"].toLowerCase().includes(Word.toLowerCase()) || + i["Lab Name"].toLowerCase().includes(Word.toLowerCase())) { + arr_after_search.push(i) + } + else { + let flag = false + for (let j of i["Tags"].split()) { + if (j.toLowerCase().includes(Word.toLowerCase())) { + flag = true; + break; + } + } + if (flag) arr_after_search.push(i) + } + } + } + if (SelectDisciplines.length === 0 && SelectInstis.length === 0) { + setDisplay(arr_after_search) + props.setp(1); + props.settp(Math.ceil(arr_after_search.length / 8)) + return; + } + for (let i of arr_after_search) { + if ((SelectDisciplines.includes(i["Discipline Name"]) || SelectDisciplines.length===0) && + (SelectInstis.includes(i["Insitute Name"]) || SelectInstis.length===0)) { + arr.push(i) + } + } + setDisplay(arr) + props.setp(1); + props.settp(Math.ceil(arr.length / 8)) + }, [Exp,SelectDisciplines, SelectInstis, Word]);//eslint-disable-line + return ( +
    +
    +
    +
    +
    +
    +

    Filters

    + +
    +
    + {apply ? <>
    + + { + Instis.map((element) => { + if (SelectInstis.includes(element)) + return ( + <> + + + ) + else + return ( + <> + + + ) + }) + } +
    +
    +
    + + { + Discipline.map((element) => { + if (SelectDisciplines.includes(element)) + return ( + <> + + + + ) + else + return ( + <> + + + + ) + }) + } +
    : null} + { + apply===0 ? <> +
      + {saved_filters && saved_filters["Filter1"] ? +
    • + {saved_filters["Filter1"]["AltName"]} +
      + + + + { + rename1 ? <> + + + : null + } +
    • : null} + {saved_filters && saved_filters["Filter2"] ? +
    • + {saved_filters["Filter2"]["AltName"]} +
      + + + + { + rename2 ? <> + + + : null + } +
    • : null} + {saved_filters && saved_filters["Filter3"] ? +
    • + {saved_filters["Filter3"]["AltName"]} +
      + + + + { + rename3 ? <> + + + : null + } +
    • : null} +
    + : null + } +
    +
    + {apply ? + <> + + : null} + { + !apply ? <> + : null + } +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    + { + props.nav===0 ? ( +
    + { + props.settp(Math.ceil(Display.length / 8)) + } + { + Display.slice((props.pagenum - 1) * 8, (props.pagenum) * 8).map((exp) => { + return ( +
    + { OpenLink(exp["Experiment URL"]) }} onValueChange={() => { ToggleSave(exp["Experiment Name"]) }} UserData={{ + exp_name: exp["Experiment Name"], + institute: exp["Insitute Name"], + exp_link: exp["Experiment URL"], + exp_img: exp["Image"], + institute_img: "https://cdn.vlabs.ac.in/logo/" + exp["Insitute Name"].toLowerCase() + ".png", + card_content: exp["Description"], + rating: exp["Rating"], + domain: exp["Discipline Name"], + lab: exp["Lab Name"], + saved: saved.includes(exp["Experiment Name"]) + }} /> +
    + ) + }) + } +
    ) : null} + { + props.nav===1 ? ( +
    + { + props.settp(Math.ceil(History.filter((ele) => { + for (let i of Display) { + if (i["Experiment Name"] === ele) { + return true; + } + } + return false; + }).length / 8)) + } + { + History.filter((ele) => { + for (let i of Display) { + if (i["Experiment Name"] === ele) { + return true; + } + } + return false; + }).slice((props.pagenum - 1) * 8, (props.pagenum) * 8).map((exp) => { + let a = {} + for (let i of props.experiments) { + if (i["Experiment Name"] === exp) { + a = i; + break; + } + } + return ( +
    + { OpenLink(a["Experiment URL"]) }} onValueChange={() => { ToggleSave(a["Experiment Name"]) }} UserData={{ + exp_name: a["Experiment Name"], + institute: a["Insitute Name"], + exp_link: a["Experiment URL"], + exp_img: a["Image"], + institute_img: "https://cdn.vlabs.ac.in/logo/" + a["Insitute Name"].toLowerCase() + ".png", + card_content: a["Description"], + rating: a["Rating"], + domain: a["Discipline Name"], + lab: a["Lab Name"], + saved: saved.includes(a["Experiment Name"]) + }} /> +
    + ) + }) + } +
    ) : null} + { + props.nav===2 ? (
    + { + props.settp(Math.ceil(saved.filter((ele) => { + for (let i of Display) { + if (i["Experiment Name"] === ele) { + return true; + } + } + return false; + }).length / 8)) + + } + { + saved.filter((ele) => { + for (let i of Display) { + if (i["Experiment Name"] === ele) { + return true; + } + } + return false; + }).slice((props.pagenum - 1) * 8, (props.pagenum) * 8).map((exp) => { + let a = {} + for (let i of props.experiments) { + if (i["Experiment Name"] === exp) { + a = i; + break; + } + } + return ( +
    + { OpenLink(a["Experiment URL"]) }} onValueChange={() => { ToggleSave(a["Experiment Name"]) }} UserData={{ + exp_name: a["Experiment Name"], + institute: a["Insitute Name"], + exp_link: a["Experiment URL"], + exp_img: a["Image"], + institute_img: "https://cdn.vlabs.ac.in/logo/" + a["Insitute Name"].toLowerCase() + ".png", + card_content: a["Description"], + rating: a["Rating"], + domain: a["Discipline Name"], + lab: a["Lab Name"], + saved: saved.includes(a["Experiment Name"]) + }} /> +
    + ) + }) + } +
    ) : null} + { + props.nav===3 ? (
    + { + props.settp(Math.ceil(Math.min(8, Display.length) / 8)) + } + { + props.pop.filter((ele) => { + if (Display.includes(ele)) return true; + else return false; + }).slice(0, 8).slice((props.pagenum - 1) * 8, (props.pagenum) * 8).map((exp) => { + return ( +
    + { OpenLink(exp["Experiment URL"]) }} onValueChange={() => { ToggleSave(exp["Experiment Name"]) }} UserData={{ + exp_name: exp["Experiment Name"], + institute: exp["Insitute Name"], + exp_link: exp["Experiment URL"], + exp_img: exp["Image"], + institute_img: "https://cdn.vlabs.ac.in/logo/" + exp["Insitute Name"].toLowerCase() + ".png", + card_content: exp["Description"], + rating: exp["Rating"], + domain: exp["Discipline Name"], + lab: exp["Lab Name"], + saved: saved.includes(exp["Experiment Name"]) + }} /> +
    + ) + }) + } +
    ) : null} + { + props.pages===0?( + {props.fetched ? +

    No Results Found

    + : + } +
    ):(null) + } +
    +
    +
    +
    + + {apply ? <> + + + + + + + : null} + {!apply ? <> + + + + + + + : null} + +
    + {apply ? <> +
    + +
    + { + Instis.map((element) => { + if (SelectInstis.includes(element)) + return ( + <> + + + ) + else + return ( + <> + + + ) + }) + } +
    +
    +
    + +
    + { + Discipline.map((element) => { + if (SelectDisciplines.includes(element)) + return ( + <> + + + ) + else + return ( + <> + + + ) + }) + } +
    +
    +
    + + +
    + : null} + { + apply===0 ? <> +
      + {saved_filters && saved_filters["Filter1"] ? +
    • + {saved_filters["Filter1"]["AltName"]} +
      + + + + { + rename1 ? <> + + + : null + } +
    • : null} + {saved_filters && saved_filters["Filter2"] ? +
    • + {saved_filters["Filter2"]["AltName"]} +
      + + + + { + rename2 ? <> + + + : null + } +
    • : null} + {saved_filters && saved_filters["Filter3"] ? +
    • + {saved_filters["Filter3"]["AltName"]} +
      + + + + { + rename3 ? <> + + + : null + } +
    • : null} +
    + : null + } + +
    +
    +
    + ) +} \ No newline at end of file diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 614ab8e..52c0a43 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -3,7 +3,7 @@ import all from "../footer_data.json"; --- - diff --git a/src/css/timeline.css b/src/css/timeline.css index 2653997..9646cc0 100644 --- a/src/css/timeline.css +++ b/src/css/timeline.css @@ -227,7 +227,6 @@ img { font-family: 'ESL Legend', sans-serif; font-weight: bold; font-size: 28px; - color: #FF0; } .ag-timeline-card_desc { @@ -237,100 +236,53 @@ img { color: #FFF; } -@media only screen and (max-width: 979px) { +@media only screen and (max-width: 768px) { .ag-timeline_line { left: 30px; } - .ag-timeline_item:nth-child(2n) { - text-align: left; + .ag-timeline_item { + margin-bottom: 50px; } .ag-timeline-card_box, .ag-timeline_item:nth-child(2n) .ag-timeline-card_box { - padding: 0 0 20px; - } - - .ag-timeline-card_meta-box { - display: none; - } - - .ag-timeline-card_point-box, - .ag-timeline_item:nth-child(2n) .ag-timeline-card_point-box { - margin: 0 0 0 8px; - } - - .ag-timeline-card_point { - height: 40px; - line-height: 40px; - width: 40px; + padding: 0 0 20px 60px; } .ag-timeline-card_item { - width: auto; - margin: -65px 0 0 75px + width: calc(40% - 60px); + margin: 10px 0 0 60px; } - .ag-timeline_item:nth-child(2n+1) .ag-timeline-card_item, - .ag-timeline_item:nth-child(2n) .ag-timeline-card_item { - -webkit-transform: translateX(200%); - -moz-transform: translateX(200%); - -ms-transform: translateX(200%); - -o-transform: translateX(200%); - transform: translateX(200%); + .ag-timeline_item:nth-child(2n) { + text-align: left; } - .ag-timeline_item:nth-child(2n+1) .ag-timeline-card_arrow { - right: auto; - left: 0; + .ag-timeline_item:nth-child(2n) .ag-timeline-card_item { + margin-left: 60px; } - .ag-timeline-card_title { + .ag-timeline-card_meta-box { display: block; + margin-bottom: 10px; } - .ag-timeline-card_arrow { - margin-top: 12px; - } -} - -@media only screen and (max-width: 767px) { - .ag-format-container { - width: 96%; - } - - .ag-timeline-card_img { - height: auto; - width: auto; - } -} - -@media only screen and (max-width: 639px) { - .ag-timeline_title { - font-size: 60px; - } - - .ag-timeline-card_info { - padding: 10px 15px; + .ag-timeline-card_point-box, + .ag-timeline_item:nth-child(2n) .ag-timeline-card_point-box { + margin: 0 0 0 8px; } - .ag-timeline-card_desc { - font-size: 14px; + .ag-timeline_item:nth-child(2n+1) .ag-timeline-card_arrow, + .ag-timeline_item:nth-child(2n) .ag-timeline-card_arrow { + display: none; } -} - -@media only screen and (max-width: 479px) {} -@media (min-width: 768px) and (max-width: 979px) { - .ag-format-container { - width: 750px; + .ag-timeline-card_meta { + margin: 0; } -} - -@media (min-width: 980px) and (max-width: 1161px) { - .ag-format-container { - width: 960px; + .ag-timeline-card_point { + margin-top: 10px; } - } \ No newline at end of file From 7dcfa4e77594a79a2c9202774ec19d79c14be536 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Mon, 8 Jul 2024 10:29:04 +0530 Subject: [PATCH 046/103] Stats --- src/components/Navbar.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 605cf3f..bc97113 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -347,7 +347,7 @@ import Stats from "./stats"; - + From 33c240992bb095f79bda8a4210fe6f7e0259c310 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Mon, 8 Jul 2024 23:27:50 +0530 Subject: [PATCH 047/103] analysis --- src/pages/detailedAnalysis.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/detailedAnalysis.astro b/src/pages/detailedAnalysis.astro index 07f83fc..231256d 100644 --- a/src/pages/detailedAnalysis.astro +++ b/src/pages/detailedAnalysis.astro @@ -133,7 +133,7 @@ import "../css/theme.css"; -
    +

    Detailed Analysis

    From 1ab79f3a028aeffa2580481de385659f8fb7b04a Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Mon, 8 Jul 2024 23:41:55 +0530 Subject: [PATCH 048/103] detailed analysis fix --- src/pages/detailedAnalysis.astro | 97 +++++++++++++++++--------------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/src/pages/detailedAnalysis.astro b/src/pages/detailedAnalysis.astro index 51f93b1..188fd49 100644 --- a/src/pages/detailedAnalysis.astro +++ b/src/pages/detailedAnalysis.astro @@ -2,9 +2,10 @@ import Base from "../layouts/Base.astro"; import "../css/theme.css"; --- + -
    +
    -

    Detailed Analysis

    +

    + Detailed Analysis +

    - -
    -
    +
    + -
    - + + +
    + +
    - \ No newline at end of file + From 6a897a11e00851ae245e573c95b301043cacd458 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Tue, 9 Jul 2024 10:54:50 +0530 Subject: [PATCH 049/103] New Card, images for timeline --- src/about_data.json | 12 +++++--- src/components/Card.jsx | 23 ++++++++++++-- src/components/Navbar.astro | 13 +------- src/components/landing-card4.jsx | 53 ++++++++++++++++++++++++++++++++ src/components/timeline.jsx | 5 ++- src/css/landing-card3.css | 3 +- src/css/timeline.css | 2 +- src/home_data.json | 18 +++++++++-- src/pages/index.astro | 2 ++ 9 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 src/components/landing-card4.jsx diff --git a/src/about_data.json b/src/about_data.json index f8717c4..6ab3d58 100644 --- a/src/about_data.json +++ b/src/about_data.json @@ -12,7 +12,8 @@ "Enhanced Cloud Architecture", "Virtual Labs Mobile App", "Common Developer Tools" - ] + ], + "image": "https://i.imgur.com/zK3Q8KL.jpg" }, { "phase": "Phase-3", @@ -29,7 +30,8 @@ "Security Enhancements", "Developer Workshops", "Maintenance of Labs" - ] + ], + "image": "https://i.imgur.com/aIWtlu9.jpg" }, { "phase": "Phase-2", @@ -46,7 +48,8 @@ "Lab Development Kits", "Maintenance of Labs", "Outreach Portal" - ] + ], + "image": "https://i.imgur.com/ezE4kcT.jpg" }, { "phase": "Phase-1", @@ -55,7 +58,8 @@ "260 experiments across 4 domains", "Development of 27 Labs", "Outreach Workshops" - ] + ], + "image": "https://i.imgur.com/VNu9RrF.jpg" } ], "initiatives": { diff --git a/src/components/Card.jsx b/src/components/Card.jsx index f2d1c00..2bddea0 100644 --- a/src/components/Card.jsx +++ b/src/components/Card.jsx @@ -4,13 +4,30 @@ import '../css/linkcard.css' const Card = ({ title, body, href, img }) => { return (
  • - +

    {title}

    -
    - image +
    + image

    {body}

    diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index bc97113..1be2bcc 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -190,7 +190,7 @@ import Stats from "./stats"; @@ -354,7 +354,6 @@ import Stats from "./stats"; diff --git a/src/components/landing-card4.jsx b/src/components/landing-card4.jsx new file mode 100644 index 0000000..f425bb8 --- /dev/null +++ b/src/components/landing-card4.jsx @@ -0,0 +1,53 @@ +import React from 'react' +import '../css/landing-card3.css' +import all from '../home_data.json' +import Card from './Card' + +const services = all.faqs + +const Card4 = () => { + + return ( +
    +
    +
    + FAQ +
    + +
    +
    +
    + { + services.map((item, i) => { + return ( +
    + +
    + ); + }) + } +
    +
    + +
    + ) +} + +export default Card4 diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index c1db04f..6d30cea 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -88,13 +88,16 @@ function Timeline() {
    {phase.years}
    -
    +
    {phase.phase}
    +
    + +
    {phase.phase}
    diff --git a/src/css/landing-card3.css b/src/css/landing-card3.css index ce08ccd..b459ac8 100644 --- a/src/css/landing-card3.css +++ b/src/css/landing-card3.css @@ -3,13 +3,14 @@ display: flex; flex-direction: column; row-gap: 1rem; - background-image: linear-gradient(66.77deg,#d83333 0%,#f041ff 100%); + background-image: linear-gradient(66.77deg, #e442fd 0%,#ff7741 100%); padding: 15px; width: 80%; margin: auto; border-radius: 10px; box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; } +/* #e442fd 0%,#ff7741 */ .landing-card-3--header { display: flex; justify-content: space-between; diff --git a/src/css/timeline.css b/src/css/timeline.css index 9646cc0..5b79124 100644 --- a/src/css/timeline.css +++ b/src/css/timeline.css @@ -1,6 +1,6 @@ img { max-width: 100%; - display: none; + /* display: none; */ } .ag-format-container { diff --git a/src/home_data.json b/src/home_data.json index 702e35d..52da0db 100644 --- a/src/home_data.json +++ b/src/home_data.json @@ -82,9 +82,23 @@ "body":"" }, { - "title":"FAQ", + "title": "Research", + "href": "/app-vlead-web/research/", + "img": "cards/research.webp", + "body": "" + } + ], + "faqs" : [ + { + "title":"Virtual Labs FAQ", "href":"/app-vlead-web/faq_page/", - "img":"cards/FAQs.webp", + "img":"https://i.imgur.com/ZhFf5SE.jpg", + "body":"" + }, + { + "title":"Workshop FAQ", + "href":"/app-vlead-web/outreach/#faq", + "img":"https://i.imgur.com/on7M1R7.jpg", "body":"" } ], diff --git a/src/pages/index.astro b/src/pages/index.astro index 3114b19..e58f3b8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -10,6 +10,7 @@ import { google } from "googleapis"; import Card1 from '../components/landing-card1-image.jsx' import Card2 from '../components/landing-card2.jsx' import Card3 from '../components/landing-card3.jsx' +import Card4 from "../components/landing-card4.jsx" import Gears from '../components/gears.jsx' const sheets = google.sheets("v4"); @@ -142,6 +143,7 @@ const short_about = all.shorty; +
  • From 0f8ab4d632d66d274611bc865fa9704071042dcc Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Tue, 9 Jul 2024 10:58:28 +0530 Subject: [PATCH 050/103] about data update --- src/about_data.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/about_data.json b/src/about_data.json index 6ab3d58..52e30db 100644 --- a/src/about_data.json +++ b/src/about_data.json @@ -1,17 +1,17 @@ { "phases": [ { - "phase": "Ext-Phase-3", + "phase": "Extended Phase-3", "years": "2021 - 2026", "description": [ + "Development of a National Question Bank", "Creation of an Outreach Tracker Tool", "Development of 16 Labs - Year 1 & 2", - "Development of a Centralized Question Bank", "140 experiments across 4 domains", "Automated Lab Deployment Tool", "Enhanced Cloud Architecture", - "Virtual Labs Mobile App", - "Common Developer Tools" + "Common Developer Tools", + "Virtual Labs PWA" ], "image": "https://i.imgur.com/zK3Q8KL.jpg" }, From 2fc4f7fa7c081807f724f8bd0c38118004d2da44 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Mon, 15 Jul 2024 22:52:39 +0530 Subject: [PATCH 051/103] Proof of concept for the pop up --- src/components/landing-card2.jsx | 125 ++++++++++++++++++++----------- src/css/landing-card2.css | 65 +++++++++++++++- src/home_data.json | 18 ++--- src/pages/index.astro | 2 +- 4 files changed, 153 insertions(+), 57 deletions(-) diff --git a/src/components/landing-card2.jsx b/src/components/landing-card2.jsx index 0f22f37..29ca9a1 100644 --- a/src/components/landing-card2.jsx +++ b/src/components/landing-card2.jsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { useEffect, useState } from 'react' import '../css/landing-card2.css' import all from '../home_data.json' import Card from './Card' @@ -6,54 +6,93 @@ import Card from './Card' const data = all.domains const Card2 = () => { - + const [showPopup, setShowPopup] = useState(false) + const [popupContent, setPopupContent] = useState(null) + + useEffect(() => { + const checkUrlFragment = () => { + const fragment = window.location.hash.slice(1) + if (fragment) { + const matchedDomain = data.find(item => item.frag === fragment) + if (matchedDomain) { + setPopupContent(matchedDomain) + setShowPopup(true) + } + } + } + + checkUrlFragment() + window.addEventListener('hashchange', checkUrlFragment) + + return () => { + window.removeEventListener('hashchange', checkUrlFragment) + } + }, []) + + const closePopup = () => { + setShowPopup(false) + setPopupContent(null) + window.history.pushState("", document.title, window.location.pathname + window.location.search) + } + return (
    -
    -
    - Our Domains -
    - +
    +
    + Our Domains
    -
    + + + +
    +
    - { - data.map((item, i) => { - return ( - -
    - -
    -
    - ); - }) - } -
    + class="mySwiper" + navigation="true" + pagination="true" + effect="coverflow" + grab-cursor="true" + centered-slides="true" + slides-per-view="4" + coverflow-effect-rotate="25" + coverflow-effect-stretch="0" + coverflow-effect-depth="50" + coverflow-effect-modifier="1" + pagination-dynamic-bullets="true" + keyboard="true" + loop="true" + id="domains" + > + { + data.map((item, i) => { + return ( + +
    + +
    +
    + ); + }) + } + +
    + {showPopup && popupContent && ( +
    +
    + +

    {popupContent.title}

    + {popupContent.title} +

    {popupContent.description}

    +
    - + )}
    ) } -export default Card2 +export default Card2 \ No newline at end of file diff --git a/src/css/landing-card2.css b/src/css/landing-card2.css index a6c52f5..2652c9c 100644 --- a/src/css/landing-card2.css +++ b/src/css/landing-card2.css @@ -3,33 +3,37 @@ display: flex; flex-direction: column; row-gap: 1rem; - background-image: linear-gradient(83.21deg,#3245ff 0%,#b845ed 100%); + background-image: linear-gradient(83.21deg, #3245ff 0%, #b845ed 100%); padding: 15px; width: 80%; margin: auto; border-radius: 10px; box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px; } + .landing-card-2--header { display: flex; justify-content: space-between; } + .landing-card-2--heading { color: white; align-self: flex-end; - font-family: MDIO,md-io-fallback,monospace; + font-family: MDIO, md-io-fallback, monospace; font-weight: bold; font-size: 3rem; animation: drop-in 1s ease 200ms backwards; margin-left: 1rem; } + .landing-card-2--body { max-width: 97%; margin: auto; } + .landing-card-2--body span { color: white; - font-family: MDIO,md-io-fallback,monospace; + font-family: MDIO, md-io-fallback, monospace; font-weight: 150; animation: drop-in 1200ms ease 500ms backwards; text-wrap: wrap; @@ -40,6 +44,7 @@ opacity: 0; transform: translateY(-100px); } + to { opacity: 1; transform: translate(0px); @@ -53,4 +58,56 @@ flex-wrap: wrap; padding-top: 0; padding-bottom: 0; - } \ No newline at end of file +} + +.popup { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + /* Ensure it's above other content */ +} + +.popup-content { + background-color: white; + padding: 20px; + border-radius: 10px; + max-width: 80%; + max-height: 80%; + overflow: auto; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + position: relative; +} + +.popup-close { + position: absolute; + top: 10px; + right: 10px; + font-size: 24px; + cursor: pointer; + background: none; + border: none; + color: #333; +} + +.popup h2 { + margin-top: 0; + color: #333; +} + +.popup img { + max-width: 100%; + height: auto; + margin-bottom: 15px; +} + +.popup p { + color: #666; + line-height: 1.6; +} \ No newline at end of file diff --git a/src/home_data.json b/src/home_data.json index 52da0db..a495a1d 100644 --- a/src/home_data.json +++ b/src/home_data.json @@ -25,47 +25,47 @@ { "title":"Computer Science and Engineering", "img":"cards/Comp.png", - "href":"" + "frag":"comp" }, { "title":"Mechanical", "img":"cards/Mech.png", - "href":"" + "frag":"mech" }, { "title":"Chemical Engineering", "img":"cards/ChemEngg.png", - "href":"" + "frag":"chem" }, { "title":"Electronics and Comm. Engineering", "img":"cards/ElCom.png", - "href":"" + "frag":"el-com" }, { "title":"Biotechnology", "img":"cards/Biotech.png", - "href":"" + "frag":"bio-tech" }, { "title":"Electrical Engineering", "img":"cards/Elec.png", - "href":"" + "frag":"elec" }, { "title":"Chemical Science", "img":"cards/Chem.png", - "href":"" + "frag":"chem-sci" }, { "title":"Physical Sciences", "img":"cards/Phys.png", - "href":"" + "frag":"phy" }, { "title":"Civil Engineering", "img":"cards/Civil.png", - "href":"" + "frag":"civil" } ], "services":[ diff --git a/src/pages/index.astro b/src/pages/index.astro index e58f3b8..b079852 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -141,7 +141,7 @@ const short_about = all.shorty; padding-top: 5rem" > - +
    From 75260c9a6812dce4620d5f11d6c94dbeb3f3bc8d Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Mon, 15 Jul 2024 22:57:14 +0530 Subject: [PATCH 052/103] Devprocs doc update --- src/devprocess_docs.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devprocess_docs.json b/src/devprocess_docs.json index 4a1aaf4..ee0470e 100644 --- a/src/devprocess_docs.json +++ b/src/devprocess_docs.json @@ -23,6 +23,11 @@ "url": "https://raw.githubusercontent.com/virtual-labs/ph3-exp-dev-process/main/dev-process/README.md", "fragment": "development-process" }, + { + "title": "Web Authoring Environment", + "url": "https://raw.githubusercontent.com/virtual-labs/tool-web-ext-vscode/dev/docs/USER_README.md", + "fragment": "web-authoring-environment" + }, { "title": "Authoring Environment", "url": "https://raw.githubusercontent.com/virtual-labs/tool-vscode-plugin/main/README.md", From 1abf998b66b946764dc2c36a42e7a866b3c81173 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Tue, 16 Jul 2024 10:43:13 +0530 Subject: [PATCH 053/103] Pop up for labs using script --- src/components/landing-card2.jsx | 80 +++++++++++++++++++++++++------- src/css/landing-card2.css | 64 ++++++++++++++++++++++++- 2 files changed, 124 insertions(+), 20 deletions(-) diff --git a/src/components/landing-card2.jsx b/src/components/landing-card2.jsx index 29ca9a1..33b08a8 100644 --- a/src/components/landing-card2.jsx +++ b/src/components/landing-card2.jsx @@ -5,35 +5,64 @@ import Card from './Card' const data = all.domains +const fetchLabData = async (disciplineFrag) => { + try { + const url = `https://script.google.com/macros/s/AKfycbyL1gSoDNCqVPEkKqduWqU0FCi4amEtQ4c3LubjfnG9qhdAhqY9Vy2ijV39qht2H27hjg/exec?discipline=${disciplineFrag}`; + const response = await fetch(url); + const data = await response.json(); + return data; + } catch (error) { + console.error("Error fetching lab data:", error); + return []; + } +}; + const Card2 = () => { - const [showPopup, setShowPopup] = useState(false) - const [popupContent, setPopupContent] = useState(null) + const [showPopup, setShowPopup] = useState(false); + const [popupContent, setPopupContent] = useState(null); + const [labData, setLabData] = useState([]); + const [isLoading, setIsLoading] = useState(false); useEffect(() => { - const checkUrlFragment = () => { - const fragment = window.location.hash.slice(1) + const checkUrlFragment = async () => { + const fragment = window.location.hash.slice(1); if (fragment) { - const matchedDomain = data.find(item => item.frag === fragment) + const matchedDomain = data.find(item => item.frag === fragment); if (matchedDomain) { - setPopupContent(matchedDomain) - setShowPopup(true) + setPopupContent(matchedDomain); + setShowPopup(true); + setIsLoading(true); + try { + const labs = await fetchLabData(fragment); + setLabData(labs); + } catch (error) { + console.error("Error in checkUrlFragment:", error); + setLabData([]); + } finally { + setIsLoading(false); + } } } - } + }; - checkUrlFragment() - window.addEventListener('hashchange', checkUrlFragment) + checkUrlFragment(); + window.addEventListener('hashchange', checkUrlFragment); return () => { - window.removeEventListener('hashchange', checkUrlFragment) - } - }, []) + window.removeEventListener('hashchange', checkUrlFragment); + }; + }, []); const closePopup = () => { - setShowPopup(false) - setPopupContent(null) - window.history.pushState("", document.title, window.location.pathname + window.location.search) - } + setShowPopup(false); + setPopupContent(null); + setLabData([]); + window.history.pushState("", document.title, window.location.pathname + window.location.search); + }; + + const openLabLink = (hostname) => { + window.open(`http://${hostname}`, '_blank'); + }; return (
    @@ -86,8 +115,23 @@ const Card2 = () => {

    {popupContent.title}

    - {popupContent.title}

    {popupContent.description}

    +

    Labs:

    + {isLoading ? ( +
    Loading...
    + ) : labData.length > 0 ? ( + + ) : ( +

    No labs found for this discipline.

    + )}
    )} diff --git a/src/css/landing-card2.css b/src/css/landing-card2.css index 2652c9c..09e472f 100644 --- a/src/css/landing-card2.css +++ b/src/css/landing-card2.css @@ -71,14 +71,13 @@ justify-content: center; align-items: center; z-index: 1000; - /* Ensure it's above other content */ } .popup-content { background-color: white; padding: 20px; border-radius: 10px; - max-width: 80%; + width: 80%; max-height: 80%; overflow: auto; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); @@ -110,4 +109,65 @@ .popup p { color: #666; line-height: 1.6; +} + +.popup-content ul { + list-style-type: none; + padding: 0; +} + +.popup-content li { + margin-bottom: 10px; +} + +.popup-content a { + color: #0066cc; + text-decoration: none; +} + +.popup-content a:hover { + text-decoration: underline; +} + +.loading { + display: flex; + justify-content: center; + align-items: center; + height: 50px; +} + +.loading::after { + content: "..."; + animation: dots 1s steps(5, end) infinite; +} + +@keyframes dots { + + 0%, + 20% { + color: rgba(0, 0, 0, 0); + text-shadow: + .25em 0 0 rgba(0, 0, 0, 0), + .5em 0 0 rgba(0, 0, 0, 0); + } + + 40% { + color: black; + text-shadow: + .25em 0 0 rgba(0, 0, 0, 0), + .5em 0 0 rgba(0, 0, 0, 0); + } + + 60% { + text-shadow: + .25em 0 0 black, + .5em 0 0 rgba(0, 0, 0, 0); + } + + 80%, + 100% { + text-shadow: + .25em 0 0 black, + .5em 0 0 black; + } } \ No newline at end of file From 6b72a74513e5bb48705693b2ec4fff5d19febc0d Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Tue, 16 Jul 2024 17:52:43 +0530 Subject: [PATCH 054/103] Rating stars added --- src/components/landing-card2.jsx | 31 ++++++++++++++++++++------ src/css/landing-card2.css | 37 ++++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/src/components/landing-card2.jsx b/src/components/landing-card2.jsx index 33b08a8..93a9eee 100644 --- a/src/components/landing-card2.jsx +++ b/src/components/landing-card2.jsx @@ -7,7 +7,7 @@ const data = all.domains const fetchLabData = async (disciplineFrag) => { try { - const url = `https://script.google.com/macros/s/AKfycbyL1gSoDNCqVPEkKqduWqU0FCi4amEtQ4c3LubjfnG9qhdAhqY9Vy2ijV39qht2H27hjg/exec?discipline=${disciplineFrag}`; + const url = `https://script.google.com/macros/s/AKfycbyl96rvk7ar9OhqOc-BDM6YcjVdbGUuBaMZQqwDB3x6A87jPiqaIW6sZ9n-vAKqZ3yMjQ/exec?discipline=${disciplineFrag}`; const response = await fetch(url); const data = await response.json(); return data; @@ -17,6 +17,24 @@ const fetchLabData = async (disciplineFrag) => { } }; +const StarRating = ({ rating }) => { + const fullStars = Math.round(rating); + + return ( +
    + {rating === 0 ? ( + No rating + ) : ( + [...Array(5)].map((_, index) => ( + + ★ + + )) + )} +
    + ); +}; + const Card2 = () => { const [showPopup, setShowPopup] = useState(false); const [popupContent, setPopupContent] = useState(null); @@ -35,6 +53,7 @@ const Card2 = () => { try { const labs = await fetchLabData(fragment); setLabData(labs); + console.log(labs) } catch (error) { console.error("Error in checkUrlFragment:", error); setLabData([]); @@ -114,24 +133,24 @@ const Card2 = () => {
    -

    {popupContent.title}

    -

    {popupContent.description}

    -

    Labs:

    +

    {popupContent.title} Labs

    +
    {isLoading ? (
    Loading...
    ) : labData.length > 0 ? ( ) : (

    No labs found for this discipline.

    - )} + )}
    )} diff --git a/src/css/landing-card2.css b/src/css/landing-card2.css index 09e472f..0c00dcb 100644 --- a/src/css/landing-card2.css +++ b/src/css/landing-card2.css @@ -74,10 +74,10 @@ } .popup-content { - background-color: white; + background-color: rgb(188, 234, 244); padding: 20px; border-radius: 10px; - width: 80%; + width: auto; max-height: 80%; overflow: auto; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); @@ -170,4 +170,37 @@ .25em 0 0 black, .5em 0 0 black; } +} + +.star-rating { + font-size: 24px; + display: inline-block; +} + +.star { + color: #ccc; + text-shadow: 0 0 1px #000; + display: inline-block; + margin-right: 2px; +} + +.star.full { + color: #ffd700; +} + +.no-rating { + color: #888; + font-size: 18px; +} + +.justify-space { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; +} + +.justify-space a { + flex-grow: 1; + margin-right: 10px; } \ No newline at end of file From 9081121e61ec4136646ed8119c8441fed1b326a8 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 09:00:57 +0530 Subject: [PATCH 055/103] Summary modifed --- src/pages/summary.astro | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/pages/summary.astro b/src/pages/summary.astro index 9450b49..cc78098 100644 --- a/src/pages/summary.astro +++ b/src/pages/summary.astro @@ -138,36 +138,56 @@ import "../css/theme.css";

    - No. of Users v/s Time +

    - + +

    - Cumulative Pageviews v/s Colleges +

    - + +

    - Top 5 Labs by Cumulative Pageviews +

    - + +

    - Pageviews of domains (in %) +

    - + +
    +
    +

    + +

    +
    + +
    +
    +
    +

    + +

    +
    + +
    +
    \ No newline at end of file From 4ae6ec9a400c8cf6e146b502cab7d0e421cd9ff8 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 11:01:38 +0530 Subject: [PATCH 056/103] Small modifs to home page --- src/components/Navbar.astro | 6 +- src/components/landing-card2.jsx | 2 +- src/components/landing-card3.jsx | 2 +- src/components/landing-card4.jsx | 4 +- src/home_data.json | 8 +- src/pages/summary.astro | 267 +++++++++++-------------------- 6 files changed, 107 insertions(+), 182 deletions(-) diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 1be2bcc..c5109a1 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -268,7 +268,7 @@ import Stats from "./stats"; id="drop-learner" href="/app-vlead-web/experiments/" > - Learner + a Learner - Educator + an Educator - Creator + a Creator diff --git a/src/components/landing-card2.jsx b/src/components/landing-card2.jsx index 93a9eee..98ee896 100644 --- a/src/components/landing-card2.jsx +++ b/src/components/landing-card2.jsx @@ -87,7 +87,7 @@ const Card2 = () => {
    - Our Domains + Learning Spheres
    diff --git a/src/components/landing-card3.jsx b/src/components/landing-card3.jsx index 9f071d5..2601669 100644 --- a/src/components/landing-card3.jsx +++ b/src/components/landing-card3.jsx @@ -11,7 +11,7 @@ const Card3 = () => {
    - Our Support + Our Activities
    diff --git a/src/components/landing-card4.jsx b/src/components/landing-card4.jsx index f425bb8..c4ce439 100644 --- a/src/components/landing-card4.jsx +++ b/src/components/landing-card4.jsx @@ -3,7 +3,7 @@ import '../css/landing-card3.css' import all from '../home_data.json' import Card from './Card' -const services = all.faqs +const services = all.explore const Card4 = () => { @@ -16,7 +16,7 @@ const Card4 = () => { >
    - FAQ + Explore Further
    diff --git a/src/home_data.json b/src/home_data.json index a495a1d..552f88b 100644 --- a/src/home_data.json +++ b/src/home_data.json @@ -88,7 +88,7 @@ "body": "" } ], - "faqs" : [ + "explore" : [ { "title":"Virtual Labs FAQ", "href":"/app-vlead-web/faq_page/", @@ -100,6 +100,12 @@ "href":"/app-vlead-web/outreach/#faq", "img":"https://i.imgur.com/on7M1R7.jpg", "body":"" + }, + { + "title":"Analytics", + "href":"http://localhost:3000/app-vlead-web/summary/", + "img":"https://i.imgur.com/j0UDVdv.jpg", + "body":"" } ], "shorty": "The Virtual Labs Engineering, Architecture, and Design (VLEAD) Team at IIIT Hyderabad optimizes Virtual Labs operations, including infrastructure management, system administration, user interface design, process coordination, analytics, automation, performance, security enhancements, content authoring tool development, and technology research. Their efforts ensure efficiency and a seamless learning experience." diff --git a/src/pages/summary.astro b/src/pages/summary.astro index cc78098..a477d71 100644 --- a/src/pages/summary.astro +++ b/src/pages/summary.astro @@ -1,193 +1,112 @@ --- -import { - Pageviews_per_month, - Cummalative_pageviews_all_collages, - Top5_Labs, - Cummalative_pageviews_for_domains, -} from "../components/chart"; import Base from "../layouts/Base.astro"; import "../css/theme.css"; --- - - - + iframe { + max-width: 100%; + height: 20vh; + } + } + -
    -

    Summary

    +
    +

    Summary

    +

    (2020-till date)

    +
    -
    -

    - -

    -
    - - -
    +
    +

    +
    +
    -
    -

    - -

    -
    - - -
    +
    +
    +

    +
    +
    -
    -

    - -

    -
    - - -
    +
    +
    +

    +
    +
    -
    -

    - -

    -
    - - -
    +
    +
    +

    +
    +
    -
    -

    - -

    -
    - -
    +
    +
    +

    +
    +
    -
    -

    - -

    -
    - -
    +
    +
    +

    +
    +
    +
    - \ No newline at end of file + From 7022d5344034e43c4f4c828da8e6b37339f9c677 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 11:58:29 +0530 Subject: [PATCH 057/103] Loading all at once from scripts --- src/components/landing-card2.jsx | 81 ++++++++++++++++++++------------ src/pages/index.astro | 2 +- 2 files changed, 51 insertions(+), 32 deletions(-) diff --git a/src/components/landing-card2.jsx b/src/components/landing-card2.jsx index 98ee896..9df82e3 100644 --- a/src/components/landing-card2.jsx +++ b/src/components/landing-card2.jsx @@ -5,25 +5,26 @@ import Card from './Card' const data = all.domains -const fetchLabData = async (disciplineFrag) => { - try { - const url = `https://script.google.com/macros/s/AKfycbyl96rvk7ar9OhqOc-BDM6YcjVdbGUuBaMZQqwDB3x6A87jPiqaIW6sZ9n-vAKqZ3yMjQ/exec?discipline=${disciplineFrag}`; - const response = await fetch(url); - const data = await response.json(); - return data; - } catch (error) { - console.error("Error fetching lab data:", error); - return []; - } +const disciplineMap = { + 'comp': 'Computer Science and Engineering', + 'mech': 'Mechanical Engineering', + 'chem': 'Chemical Engineering', + 'el-com': 'Electronics and Communication Engineering', + 'bio-tech': 'Biotechnology and Biomedical Engineering', + 'elec': 'Electrical Engineering', + 'chem-sci': 'Chemical Science', + 'phy': 'Physical Sciences', + 'civil': 'Civil Engineering' }; + const StarRating = ({ rating }) => { const fullStars = Math.round(rating); return (
    {rating === 0 ? ( - No rating + Unrated ) : ( [...Array(5)].map((_, index) => ( @@ -38,28 +39,46 @@ const StarRating = ({ rating }) => { const Card2 = () => { const [showPopup, setShowPopup] = useState(false); const [popupContent, setPopupContent] = useState(null); - const [labData, setLabData] = useState([]); - const [isLoading, setIsLoading] = useState(false); + const [allLabData, setAllLabData] = useState([]); + const [filteredLabData, setFilteredLabData] = useState([]); + const [isLoading, setIsLoading] = useState(true); + + const fetchAllLabData = async () => { + try { + const url = 'https://script.google.com/macros/s/AKfycbyjvMe0h-Mr3dC_Yx5muP0rgSlha1akTG5mo_vUSUi2o9DdbGycFTLCq2NKEShN7jZbhw/exec'; + const response = await fetch(url); + const data = await response.json(); + return data; + } catch (error) { + console.error("Error fetching lab data:", error); + return []; + } + }; + + useEffect(() => { + const loadData = async () => { + setIsLoading(true); + const data = await fetchAllLabData(); + setAllLabData(data); + setIsLoading(false); + }; + + loadData(); + }, []); useEffect(() => { - const checkUrlFragment = async () => { + const checkUrlFragment = () => { const fragment = window.location.hash.slice(1); - if (fragment) { + if (fragment && allLabData.length > 0) { const matchedDomain = data.find(item => item.frag === fragment); if (matchedDomain) { setPopupContent(matchedDomain); setShowPopup(true); - setIsLoading(true); - try { - const labs = await fetchLabData(fragment); - setLabData(labs); - console.log(labs) - } catch (error) { - console.error("Error in checkUrlFragment:", error); - setLabData([]); - } finally { - setIsLoading(false); - } + + const fullDiscipline = disciplineMap[fragment]; + const filteredLabs = allLabData.filter(lab => lab.discipline === fullDiscipline); + + setFilteredLabData(filteredLabs); } } }; @@ -70,12 +89,12 @@ const Card2 = () => { return () => { window.removeEventListener('hashchange', checkUrlFragment); }; - }, []); + }, [allLabData]); const closePopup = () => { setShowPopup(false); setPopupContent(null); - setLabData([]); + setFilteredLabData([]); window.history.pushState("", document.title, window.location.pathname + window.location.search); }; @@ -136,10 +155,10 @@ const Card2 = () => {

    {popupContent.title} Labs


    {isLoading ? ( -
    Loading...
    - ) : labData.length > 0 ? ( +

    Loading labs...

    + ) : filteredLabData.length > 0 ? (
    From 89be92610cf56183040038ba9bbf991981b3284f Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 12:41:07 +0530 Subject: [PATCH 058/103] Timeline modifications --- src/about_data.json | 8 +++--- src/components/timeline.jsx | 24 +++++++++------- src/css/timeline.css | 57 +++++++++++++++++++++++++++++-------- 3 files changed, 62 insertions(+), 27 deletions(-) diff --git a/src/about_data.json b/src/about_data.json index 52e30db..9171bef 100644 --- a/src/about_data.json +++ b/src/about_data.json @@ -13,7 +13,7 @@ "Common Developer Tools", "Virtual Labs PWA" ], - "image": "https://i.imgur.com/zK3Q8KL.jpg" + "image": "https://i.imgur.com/32JWmdl.jpg" }, { "phase": "Phase-3", @@ -31,7 +31,7 @@ "Developer Workshops", "Maintenance of Labs" ], - "image": "https://i.imgur.com/aIWtlu9.jpg" + "image": "https://i.imgur.com/en2PcMg.jpg" }, { "phase": "Phase-2", @@ -49,7 +49,7 @@ "Maintenance of Labs", "Outreach Portal" ], - "image": "https://i.imgur.com/ezE4kcT.jpg" + "image": "https://i.imgur.com/xjUKea1.jpg" }, { "phase": "Phase-1", @@ -59,7 +59,7 @@ "Development of 27 Labs", "Outreach Workshops" ], - "image": "https://i.imgur.com/VNu9RrF.jpg" + "image": "https://i.imgur.com/xPmNbZD.jpg" } ], "initiatives": { diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 6d30cea..7e577d1 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -95,17 +95,19 @@ function Timeline() {
    -
    - -
    -
    -
    {phase.phase}
    -
    -
      - {phase.description.map((point, i) => ( -
    • {point}
    • - ))} -
    +
    +
    + {phase.phase} +
    +
    +
    {phase.phase}
    +
    +
      + {phase.description.map((point, i) => ( +
    • {point}
    • + ))} +
    +
    diff --git a/src/css/timeline.css b/src/css/timeline.css index 5b79124..801bd01 100644 --- a/src/css/timeline.css +++ b/src/css/timeline.css @@ -212,17 +212,10 @@ img { left: 0; } -.ag-timeline-card_img { - width: 100%; -} - -.ag-timeline-card_info { - padding: 20px 30px; -} - .ag-timeline-card_title { display: none; margin: 10px 0 0; + margin-bottom: 15px; font-family: 'ESL Legend', sans-serif; font-weight: bold; @@ -230,10 +223,8 @@ img { } .ag-timeline-card_desc { - line-height: 1.45; - - font-size: 16px; - color: #FFF; + padding: 0 10px; + width: 100%; } @media only screen and (max-width: 768px) { @@ -285,4 +276,46 @@ img { .ag-timeline-card_point { margin-top: 10px; } +} + +.ag-timeline-card_content { + display: flex; + align-items: center; + justify-content: center; + gap: 20px; +} + +.ag-timeline-card_img-box { + flex-shrink: 0; + width: 200px; + height: 200px; +} + +.ag-timeline-card_img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.ag-timeline-card_info { + flex-grow: 1; +} + +.ag-timeline-card_desc ul { + /* margin: 0; */ + margin-top: 10px; + margin-bottom: 10px; +} + +@media (max-width: 768px) { + .ag-timeline-card_content { + flex-direction: column; + } + + .ag-timeline-card_img-box { + width: 100%; + max-width: 300px; + height: auto; + aspect-ratio: 1 / 1; + } } \ No newline at end of file From 81fabdae87ad9b7cf9fc0d4bd94692aead4213f7 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 12:44:50 +0530 Subject: [PATCH 059/103] jQuery resolution --- package-lock.json | 14 +++++++++----- package.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index c04751a..a3c9da8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "font-awesome": "^4.7.0", "fuse.js": "^6.6.2", "googleapis": "^118.0.0", - "jquery": "^3.7.1", + "jquery": "npm:jQuery@^1.7.4", "jQuery": "^1.7.4", "pwa-vlabs": "^1.0.6", "react": "^18.2.0", @@ -6561,10 +6561,14 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + "node_modules/jQuery": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/jQuery/-/jQuery-1.7.4.tgz", + "integrity": "sha512-hf/hWBnkFhu4FzP96tBjZNPF9qTcUaOKFA8hpVJX0Cb/892JefRzoVGCe/vkmry/pOhZiK6VnQvnuV8CoHf1rA==", + "deprecated": "This is deprecated. Please use 'jquery' (all lowercase).", + "engines": { + "node": ">=0.6" + } }, "node_modules/js-tokens": { "version": "4.0.0", diff --git a/package.json b/package.json index d4750a2..dab7ba8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "font-awesome": "^4.7.0", "fuse.js": "^6.6.2", "googleapis": "^118.0.0", - "jquery": "^3.7.1", + "jquery": "npm:jQuery@^1.7.4", "jQuery": "^1.7.4", "pwa-vlabs": "^1.0.6", "react": "^18.2.0", From 66de191b6d95a6271d80172a0e2a996aa6d144b1 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 12:49:55 +0530 Subject: [PATCH 060/103] jQuery resolution --- src/components/timeline.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 7e577d1..17b8a93 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -1,9 +1,10 @@ import data from "../about_data.json"; import '../css/timeline.css'; import React, { useEffect } from 'react'; -import $ from 'jquery'; +// import $ from 'jquery'; function Timeline() { + const $ = window.jQuery; useEffect(() => { $(function () { $(window).on('scroll', function () { From d2bfcb341017369578711611e8d78c5c63ceb5b5 Mon Sep 17 00:00:00 2001 From: 112Nisha Date: Thu, 18 Jul 2024 12:56:02 +0530 Subject: [PATCH 061/103] Detailed Analysis fix --- src/components/timeline.jsx | 1 - src/pages/detailedAnalysis.astro | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 17b8a93..0718e2a 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -1,7 +1,6 @@ import data from "../about_data.json"; import '../css/timeline.css'; import React, { useEffect } from 'react'; -// import $ from 'jquery'; function Timeline() { const $ = window.jQuery; diff --git a/src/pages/detailedAnalysis.astro b/src/pages/detailedAnalysis.astro index 188fd49..1f5e276 100644 --- a/src/pages/detailedAnalysis.astro +++ b/src/pages/detailedAnalysis.astro @@ -133,7 +133,7 @@ import "../css/theme.css"; Detailed Analysis

    -
    +