From 43eb8c95fe6a3a910f122d8a3ac221ccca6c7fa1 Mon Sep 17 00:00:00 2001 From: Enrique Date: Fri, 2 Feb 2024 00:43:17 +0100 Subject: [PATCH] new version with all pages --- .github/workflows/deploy.yml | 10 +++- app/about/page.js | 60 ++++++++++++++++++++++++ app/research/page.js | 89 ++++++++++++++++++++++++++++++++++++ app/team/page.js | 60 ++++++++++++++++++++++++ components/Filters.js | 44 ++++++++++++++++++ mybuild/_events.json | 1 + next.config.mjs | 1 - public/sitemap.xml | 33 +++++++++++++ 8 files changed, 296 insertions(+), 2 deletions(-) create mode 100644 app/about/page.js create mode 100644 app/research/page.js create mode 100644 app/team/page.js create mode 100644 components/Filters.js create mode 100644 mybuild/_events.json create mode 100644 public/sitemap.xml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87b992a..039f011 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -53,6 +53,14 @@ jobs: with: node-version: "20" cache: ${{ steps.detect-package-manager.outputs.manager }} + #- name: Setup Pages + # uses: actions/configure-pages@v4 + # with: + # Automatically inject basePath in your Next.js configuration file and disable + # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). + # + # You may remove this line if you want to manage the configuration yourself. + # static_site_generator: next - name: Restore cache uses: actions/cache@v4 with: @@ -74,7 +82,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ./mybuild + path: ./out # Deployment job deploy: diff --git a/app/about/page.js b/app/about/page.js new file mode 100644 index 0000000..4b60e5d --- /dev/null +++ b/app/about/page.js @@ -0,0 +1,60 @@ +"use client" + +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; + +export default function About (props) { + + return ( +
+
+
+
+ +

We have gathered a long teaching experience at the University. Our main research interests are focused + on the last technologies in Internet and the WWW, such as HTML5. We have extensive experience in + video-conferencing systems, social networks websites and e-Learning. Our latest participation in + research projects include ongoing EU-founded projects such as Global Excursions and FI-WARE

+ +
+ +

Where are we?

+
+ +
+
+ +
+
+
+
+

E.T.S. DE INGENIEROS DE TELECOMUNICACIÓN

+

Av. Complutense, 30, 28040 Madrid + Edificio B

+
+
+

Contact

+
    +
  • +

    E-mail

    gi.internetng@upm.es

    +
  • +
  • +

    Phone

    91 336 73 31

    +
  • +
  • +

    Fax

    91 336 73 33

    +
  • +
+
+
+ +
+ +
+
+
+ ); + +} \ No newline at end of file diff --git a/app/research/page.js b/app/research/page.js new file mode 100644 index 0000000..6676077 --- /dev/null +++ b/app/research/page.js @@ -0,0 +1,89 @@ +"use client" + +import { useEffect, useState } from "react"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; +import Filters from "@/components/Filters"; +import Link from 'next/link'; +import { mypublications } from '@/constants/publications'; + + +export default function Research() { + const [state, setState] = useState({papers: mypublications, search: "", year: undefined, type: undefined}); + + useEffect(() => { + window.scrollTo(0,0); + }, []); + + const {papers, search, year, type } = state; + + let papersFiltered = null; + + papersFiltered=papers.filter(paper => { + return (!search || search.toLowerCase() + .replace(new RegExp(/\s/g),"") + .replace(new RegExp(/[àáâãäå]/g),"a") + .replace(new RegExp(/æ/g),"ae") + .replace(new RegExp(/ç/g),"c") + .replace(new RegExp(/[èéêë]/g),"e") + .replace(new RegExp(/[ìíîï]/g),"i") + .replace(new RegExp(/ñ/g),"n") + .replace(new RegExp(/[òóôõö]/g),"o") + .replace(new RegExp(/œ/g),"oe") + .replace(new RegExp(/[ùúûü]/g),"u") + .replace(new RegExp(/[ýÿ]/g),"y") + .replace(new RegExp(/\W/g),"") + .split(" ").every(item => paper.content.toLowerCase() + .replace(new RegExp(/\s/g),"") + .replace(new RegExp(/[àáâãäå]/g),"a") + .replace(new RegExp(/æ/g),"ae") + .replace(new RegExp(/ç/g),"c") + .replace(new RegExp(/[èéêë]/g),"e") + .replace(new RegExp(/[ìíîï]/g),"i") + .replace(new RegExp(/ñ/g),"n") + .replace(new RegExp(/[òóôõö]/g),"o") + .replace(new RegExp(/œ/g),"oe") + .replace(new RegExp(/[ùúûü]/g),"u") + .replace(new RegExp(/[ýÿ]/g),"y") + .replace(new RegExp(/\W/g),"") + .includes(item))) + && (!year || (paper.date && paper.date[0] && paper.date[0].toString() === year)) + && (!type || (paper.type && paper.type === type)); + }); + + + + return ( +
+
+
+
+ setState({...state, search: search})} changeYear={year=>setState({...state, year: year})} changeType={type=>setState({...state, type: type})} results={papersFiltered instanceof Array ? papersFiltered.length : 0}/> + { + papersFiltered.map(({date,doi,content},ind)=>{ + return ( +
+
+

{date ? date[0] : ""}

+
+ + +
+ ); + }) + } +
+
+
+
+ ) + +} \ No newline at end of file diff --git a/app/team/page.js b/app/team/page.js new file mode 100644 index 0000000..9c0e5a4 --- /dev/null +++ b/app/team/page.js @@ -0,0 +1,60 @@ +"use client" + +import { useEffect, useState } from "react"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; +import Filters from "@/components/Filters"; +import Link from 'next/link'; +import { myteam } from '@/constants/team'; + + +export default function Team (props){ + const [team, setTeam] = useState(myteam); + + useEffect(() => { + window.scrollTo(0,0); + }, []); + + return ( +
+
+
+
+ { + Object.values(team).map(({title,members})=>{ + return (

{title}

+ {members.map(({name, description, photo, github, email})=>{ + const emailAddress = email ? email.split("@"):null; + return ( +
+
+ + {"Team + +
+ +
+
+

{name}

+
+
+

{description}

+

{emailAddress ? + ({emailAddress[0]} at + {emailAddress[1]} + ):""}

+
+
+
+ )})} +
) + }) + } + +
+
+
+
+ ) + +} \ No newline at end of file diff --git a/components/Filters.js b/components/Filters.js new file mode 100644 index 0000000..7c2bec2 --- /dev/null +++ b/components/Filters.js @@ -0,0 +1,44 @@ +import React from 'react'; + +export default function Filters (props) { + + function getYears(papers) { + let yearSet = new Set() + for (let i in papers) { + try { + const date = papers[i].date[0]; + yearSet.add(date.toString()) + } catch(e) { + } + } + return Array.from(yearSet); + } + + let years = getYears(props.papers); + + return (
+
+ + props.changeSearch(e.target.value === "" ? undefined: e.target.value)} + /> +
+
+ + +
+
+ + +
+ {props.results === undefined ? null:
} +
) + +} \ No newline at end of file diff --git a/mybuild/_events.json b/mybuild/_events.json new file mode 100644 index 0000000..b609be4 --- /dev/null +++ b/mybuild/_events.json @@ -0,0 +1 @@ +[{"eventName":"NEXT_CLI_SESSION_STOPPED","payload":{"nextVersion":"14.1.0","nodeVersion":"v18.17.1","cliCommand":"dev","durationMilliseconds":841839,"turboFlag":false,"pagesDir":false,"appDir":true}}] \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index 6fe008e..efe2246 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -24,7 +24,6 @@ const nextConfig = { unoptimized: true, }, - distDir: 'mybuild', }; export default nextConfig; \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..c6560e4 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,33 @@ + + + + https://cyberaula.github.io + 2024-01-12 + monthly + 1 + + + https://cyberaula.github.io/projects + 2024-01-12 + monthly + 1 + + + https://cyberaula.github.io/research + 2024-01-12 + monthly + 1 + + + https://cyberaula.github.io/team + 2024-01-12 + monthly + 1 + + + https://cyberaula.github.io/about + 2024-01-12 + monthly + 1 + + \ No newline at end of file