Skip to content

Commit

Permalink
new version with all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarra committed Feb 1, 2024
1 parent 2b0fc1d commit 43eb8c9
Show file tree
Hide file tree
Showing 8 changed files with 296 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -74,7 +82,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./mybuild
path: ./out

# Deployment job
deploy:
Expand Down
60 changes: 60 additions & 0 deletions app/about/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"use client"

import Header from "@/components/Header";
import Footer from "@/components/Footer";

export default function About (props) {

return (
<div className="about">
<Header route={"/about"}/>
<main>
<section className="about_description">

<p>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</p>

</section>

<h2>Where are we?</h2>
<section className="location">

<div className="col1">
<div className="location_map map-responsive">
<iframe title="maps"
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3036.0248536844406!2d-3.7286225846430923!3d40.45258687936105!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xd422834b7a8fb4d%3A0x2a3c66a12ada73f9!2sUPM+Escuela+T%C3%A9cnica+Superior+de+Ingenieros+de+Telecomunicaci%C3%B3n!5e0!3m2!1ses!2ses!4v1561459882911!5m2!1ses!2ses"
width="600" height="450" frameBorder="0" style={{border:0}} allowfullscreen></iframe>
</div>
</div>
<div className="col2">
<div className="location_info">
<h2>E.T.S. DE INGENIEROS DE TELECOMUNICACIÓN</h2>
<h3>Av. Complutense, 30, 28040 Madrid
Edificio B</h3>
</div>
<div className="contact">
<h2>Contact</h2>
<ul>
<li>
<h3>E-mail</h3><p>[email protected]</p>
</li>
<li>
<h3>Phone</h3><p>91 336 73 31</p>
</li>
<li>
<h3>Fax</h3><p>91 336 73 33</p>
</li>
</ul>
</div>
</div>

</section>

</main>
<Footer/>
</div>
);

}
89 changes: 89 additions & 0 deletions app/research/page.js
Original file line number Diff line number Diff line change
@@ -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 (
<div className="research">
<Header route={"/research"}/>
<main>
<section className="research">
<Filters search = {search} year={year} type={type} papers={papers} changeSearch={search=>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 (
<div key={ind} className="paper">
<div className="paper_date">
<h4>{date ? date[0] : ""}</h4>
</div>

<div className="paper_main">
<a rel="noopener noreferrer" target="_blank" href={doi}>
<div className="paper_content">
<div className="paper_title">
<h2 dangerouslySetInnerHTML={{__html: content}}></h2>
</div>
</div>
</a>
</div>
</div>
);
})
}
</section>
</main>
<Footer/>
</div>
)

}
60 changes: 60 additions & 0 deletions app/team/page.js
Original file line number Diff line number Diff line change
@@ -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 (
<div className="team">
<Header route={"/team"}/>
<main>
<section className="teammates">
{
Object.values(team).map(({title,members})=>{
return (<div className="teamgrouptitle" key={title}><h2>{title}</h2>
{members.map(({name, description, photo, github, email})=>{
const emailAddress = email ? email.split("@"):null;
return (
<div className="teammate" key={name}>
<div className="mate_img">
<a href={github} target="_blank" rel="noopener noreferrer">
<img alt={"Team member"} src={process.env.PUBLIC_URL + photo} className="grayscale"/>
</a>
</div>

<div className="mate_info">
<div className="mate_name">
<h3>{name}</h3>
</div>
<div className="mate_description">
<p>{description}</p>
<p><b>{emailAddress ?
(<span>{emailAddress[0]} <img alt="at" className="at" src={process.env.PUBLIC_URL + "/assets/img/arroba-symbol.svg"}/>
{emailAddress[1]}</span>
):""}</b></p>
</div>
</div>
</div>
)})}
</div>)
})
}

</section>
</main>
<Footer/>
</div>
)

}
44 changes: 44 additions & 0 deletions components/Filters.js
Original file line number Diff line number Diff line change
@@ -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 (<div className="filters">
<div className="filter">
<label htmlFor="search">Search</label>
<input key={" "} type={"text"} value ={props.search}
onChange={e => props.changeSearch(e.target.value === "" ? undefined: e.target.value)}
/>
</div>
<div className="filter">
<label htmlFor="publication">Publication type</label>
<select id="publication" name="publication" onChange={(e)=>props.changeType(e.target.value === "all" ? undefined: e.target.value)}>
<option key={"all"} value={"all"}>All</option>
<option key={"journal"} value={"article-journal"}>Journal article</option>
<option key={"conference"} value={"paper-conference"}>Conference proceedings</option>
</select>
</div>
<div className="filter">
<label htmlFor="year">Year</label>
<select id="year" name="year" onChange={(e)=>props.changeYear(e.target.value === "all" ? undefined: e.target.value)}>
<option key={"all"} value={"all"}>All</option>
{years.map(y=><option key={y} value={y}>{y}</option>)}
</select>
</div>
{props.results === undefined ? null:<div><label>Results: {props.results} </label></div>}
</div>)

}
1 change: 1 addition & 0 deletions mybuild/_events.json
Original file line number Diff line number Diff line change
@@ -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}}]
1 change: 0 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const nextConfig = {
unoptimized: true,
},

distDir: 'mybuild',
};

export default nextConfig;
33 changes: 33 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://cyberaula.github.io</loc>
<lastmod>2024-01-12</lastmod>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://cyberaula.github.io/projects</loc>
<lastmod>2024-01-12</lastmod>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://cyberaula.github.io/research</loc>
<lastmod>2024-01-12</lastmod>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://cyberaula.github.io/team</loc>
<lastmod>2024-01-12</lastmod>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://cyberaula.github.io/about</loc>
<lastmod>2024-01-12</lastmod>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
</urlset>

0 comments on commit 43eb8c9

Please sign in to comment.