From 9a066421aa6761d7542222a8eac90baa7cd01427 Mon Sep 17 00:00:00 2001 From: Oleksandr Zaitsev Date: Wed, 19 Jun 2024 03:17:35 +0200 Subject: [PATCH] Trying out routing --- website/index.html | 152 ++++------------------------------- website/pages/404.html | 1 + website/pages/home.html | 130 ++++++++++++++++++++++++++++++ website/pages/program.html | 1 + website/pages/resources.html | 1 + website/pages/venue.html | 1 + website/script.js | 77 +++++++++++++++++- 7 files changed, 225 insertions(+), 138 deletions(-) create mode 100644 website/pages/404.html create mode 100644 website/pages/home.html create mode 100644 website/pages/program.html create mode 100644 website/pages/resources.html create mode 100644 website/pages/venue.html diff --git a/website/index.html b/website/index.html index ebc7a82..ab42105 100644 --- a/website/index.html +++ b/website/index.html @@ -80,10 +80,10 @@
-

isLoop 2024: International School on Live - Object-Oriented Programming

- -

Dear students,

-

We are happy to announce that once again, Pharo Consortium is - organizing an international cost-free summer school.

-

Pay attention the places are limited because this is a cool summer - school in a cool place.

-

- If you have any additional questions, feel free to contact us at - - - - - rf.daric@vestiaz.rdnaskelo - - - -  or - - - - - rf.airni@essacud.enahpets - - -

- -

Registration

- - To register, please fill the following - Form. - The deadline for applications is July 20, 2024. - -

Timeline

- - - -

Summer School Teachers

- -
- - -
-

Stéphane Ducasse

- -

I'm an expert in object design, object language design, reflective - programming, and the maintenance and evolution of large applications - (visualization, metrics, meta-modeling). My work on traits has been - introduced in AmbientTalk, Slate, Pharo, Perl-6, PHP 5.4 and Squeak. - They have been ported to JavaScript. It has influenced the Scala an - Fortress languages.

- -

I'm one of the founders of Pharo. - I head its industry consortium http://consortium.pharo.org. I'm one - of the designers of Moose, an - analysis platform. I regularly work with companies such as Arolla, - Berger-Levrault, Thales, Framatome, Siemens, CIM, Worldline to solve - their challenges.

-
-
- -
- - -
-

Guillermo Polito

- -

Coding enthusiast. Mad hatter. Software engineer and researcher. - I am currently an Inria Researcher at the CRIStAL laboratory, where - I am expert in software engineering and language implementations, - with a particular focus on test generation. I work in the Evref - team from Inria Lille-Nord Europe.

- -

I actively participate in the development of the open source Pharo - programming language and environment since 2010, and I am a member - of its technical board since 2018.

-
-
- -
- - -
-

Sebastian Jordan-Montaño

- -

I am a PhD student working on memory profilers. I work at Inria, - France in the Evref team.

- -

I was one of the main developers of the pharo-ai project contributing - and building different libraries for machine learning algorithms, - statistical metrics, data preprocessing, and AI in general. At Inria, - I also worked for 5 months as a Moose engineer mostly developing tools - for Moose IDE project.

-
-
- -
- - -
-

Oleksandr Zaitsev

- -

I am a computer science researcher at CIRAD - a French agricultural - research and international cooperation organization working for the - sustainable development of tropical and Mediterranean regions. - I work on software engineering and AI techniques for participatory - agent-based modelling and serious games. In 2022, I defended my PhD at - Inria Lille; my thesis was about data mining-based tools to support - software evolution.

- -

I contribute to many open-source projecs (Pharo, DataFrame, - PolyMath, pharo-ai). I am currently the lead developer of the Cormas - modelling platform.

-
-
- +
diff --git a/website/pages/404.html b/website/pages/404.html new file mode 100644 index 0000000..98b8502 --- /dev/null +++ b/website/pages/404.html @@ -0,0 +1 @@ +Page not found \ No newline at end of file diff --git a/website/pages/home.html b/website/pages/home.html new file mode 100644 index 0000000..edb26e0 --- /dev/null +++ b/website/pages/home.html @@ -0,0 +1,130 @@ +

isLoop 2024: International School on Live + Object-Oriented Programming

+ +

Dear students,

+

We are happy to announce that once again, Pharo Consortium is + organizing an international cost-free summer school.

+

Pay attention the places are limited because this is a cool summer + school in a cool place.

+

+ If you have any additional questions, feel free to contact us at + + + + + rf.daric@vestiaz.rdnaskelo + + + +  or + + + + + rf.airni@essacud.enahpets + + +

+ +

Registration

+ +To register, please fill the following +Form. +The deadline for applications is July 20, 2024. + +

Timeline

+ + + +

Summer School Teachers

+ +
+ + +
+

Stéphane Ducasse

+ +

I'm an expert in object design, object language design, reflective + programming, and the maintenance and evolution of large applications + (visualization, metrics, meta-modeling). My work on traits has been + introduced in AmbientTalk, Slate, Pharo, Perl-6, PHP 5.4 and Squeak. + They have been ported to JavaScript. It has influenced the Scala an + Fortress languages.

+ +

I'm one of the founders of Pharo. + I head its industry consortium http://consortium.pharo.org. I'm one + of the designers of Moose, an + analysis platform. I regularly work with companies such as Arolla, + Berger-Levrault, Thales, Framatome, Siemens, CIM, Worldline to solve + their challenges.

+
+
+ +
+ + +
+

Guillermo Polito

+ +

Coding enthusiast. Mad hatter. Software engineer and researcher. + I am currently an Inria Researcher at the CRIStAL laboratory, where + I am expert in software engineering and language implementations, + with a particular focus on test generation. I work in the Evref + team from Inria Lille-Nord Europe.

+ +

I actively participate in the development of the open source Pharo + programming language and environment since 2010, and I am a member + of its technical board since 2018.

+
+
+ +
+ + +
+

Sebastian Jordan-Montaño

+ +

I am a PhD student working on memory profilers. I work at Inria, + France in the Evref team.

+ +

I was one of the main developers of the pharo-ai project contributing + and building different libraries for machine learning algorithms, + statistical metrics, data preprocessing, and AI in general. At Inria, + I also worked for 5 months as a Moose engineer mostly developing tools + for Moose IDE project.

+
+
+ +
+ + +
+

Oleksandr Zaitsev

+ +

I am a computer science researcher at CIRAD - a French agricultural + research and international cooperation organization working for the + sustainable development of tropical and Mediterranean regions. + I work on software engineering and AI techniques for participatory + agent-based modelling and serious games. In 2022, I defended my PhD at + Inria Lille; my thesis was about data mining-based tools to support + software evolution.

+ +

I contribute to many open-source projecs (Pharo, DataFrame, + PolyMath, pharo-ai). I am currently the lead developer of the Cormas + modelling platform.

+
+
\ No newline at end of file diff --git a/website/pages/program.html b/website/pages/program.html new file mode 100644 index 0000000..2f51aaf --- /dev/null +++ b/website/pages/program.html @@ -0,0 +1 @@ +

Summer School Program

\ No newline at end of file diff --git a/website/pages/resources.html b/website/pages/resources.html new file mode 100644 index 0000000..843a249 --- /dev/null +++ b/website/pages/resources.html @@ -0,0 +1 @@ +

Learning Resources

\ No newline at end of file diff --git a/website/pages/venue.html b/website/pages/venue.html new file mode 100644 index 0000000..a57cc42 --- /dev/null +++ b/website/pages/venue.html @@ -0,0 +1 @@ +

Summer School Venue

\ No newline at end of file diff --git a/website/script.js b/website/script.js index 83fd0d2..3943d48 100644 --- a/website/script.js +++ b/website/script.js @@ -12,5 +12,78 @@ function insertMailto(id, place, me) { elink.href = `mailto:${me}@${place}`; } -insertMailto("mlink1", "cirad.fr", "oleksandr.zaitsev"); -insertMailto("mlink2", "inria.fr", "stephane.ducasse"); \ No newline at end of file +// insertMailto("mlink1", "cirad.fr", "oleksandr.zaitsev"); +// insertMailto("mlink2", "inria.fr", "stephane.ducasse"); + +// create document click that watches the nav links only +document.addEventListener("click", (e) => { + const { target } = e; + if (!target.matches("nav a")) { + return; + } + e.preventDefault(); + route(); +}); + +const routes = { + 404: { + template: "/pages/404.html", + title: "404", + description: "Page not found", + }, + "/": { + template: "/pages/home.html", + title: "Home", + description: "This is the home page", + }, + "/venue": { + template: "/pages/venue.html", + title: "Venue", + description: "This is the venue page", + }, + "/program": { + template: "/pages/program.html", + title: "Program", + description: "This is the program page", + }, + "/resources": { + template: "/pages/resources.html", + title: "Learning Resources", + description: "This is the learning resources page", + } +}; + +const route = (event) => { + event = event || window.event; // get window.event if event argument not provided + event.preventDefault(); + // window.history.pushState(state, unused, target link); + window.history.pushState({}, "", event.target.href); + locationHandler(); +}; + +const locationHandler = async () => { + const location = window.location.pathname; // get the url path + // if the path length is 0, set it to primary page route + if (location.length == 0) { + location = "/"; + } + // get the route object from the urlRoutes object + const route = routes[location] || routes["404"]; + // get the html from the template + const html = await fetch(route.template).then((response) => response.text()); + // set the content of the content div to the html + document.getElementById("content").innerHTML = html; + // set the title of the document to the title of the route + document.title = route.title; + // set the description of the document to the description of the route + document + .querySelector('meta[name="description"]') + .setAttribute("content", route.description); +}; + +// add an event listener to the window that watches for url changes +window.onpopstate = locationHandler; +// call the urlLocationHandler function to handle the initial url +window.route = route; +// call the urlLocationHandler function to handle the initial url +locationHandler(); \ No newline at end of file