Table of Contents
This is a website built in the subject IT1 at the Norwegian Upper Secondary School. This site is in no way affiliated with Avinor or the airport Gardermoen.
Oslo Lufthavn ønsker seg også forslag til nye nettsider. De ønsker seg et nettsted som er enkelt å navigere i, og som har en tydelig helhetlig design med bilder og tekst fra livet på flyplassen. Du bestemmer selv hvor mye du vil gjøre ut av nettsidene, men som et minimum må du ha med sidene Hjem, Direkteruter, Flyselskap og Om oss. Bruk det du kan av HTML og CSS til å utforme nettstedet og til å overbevise leserne om at dette er noe de må få med seg. Temaet skal være glede, nysgjerrighet og turisme.
A header and footer with language choice (saved in localstorage.language) has been added to every page. Additionally, transport.html is created to show open departure and arrival data from Bane Nor and Ruter (trains and buses in the Oslo region), and direkteruter.html has a live departure board that is syncronized with Avinor's (Norwegian airport authorities) live XML feed.
The src folder contains 5 HTML documents with content, a redirecting index.html file, and 3 folders:
images
- Contains all the images used on the website. This includes the logos to all the airlines mentioned on flyselskap.html (in a separate folder), as well as different illustration photos and logos/favicons.scripts
- Contains all the scripts, of which all TypeScript files have compiled JavaScript files.common.ts
- This is all the code that is reused on the different pages, and handles among other things linking to the common stylesheet and favicons, as well as generating header and footer.hjem.ts
,om.ts
,transport.ts
- Only handle translation of the corresponding webpage to english.flyselskap.ts
- Handles both translation and main content generation. The content generation is from the object 'airlines'.direkteruter.ts
- Handles main static content generation and translation just like flyselskap.ts, but also fetches data from outXML.xml to present in the #departures div.donwloadXML.ps1
andoutXML.xml
- A PowerShell script to download raw data from Avinor and its output file. downloadXML.ps1 needs to be run in order to ensure precise and recent data on direkteruter.html.tsconfig.json
- Configuration file for the TypeScript compilerjquery.min.js
- Minified jQuery.node_modules
,package-lock.json
, andpackage.json
- NPM dependencies
stylesheets
- contains all stylesheets for either common features (e.g. header and footer) or page specific features (such as departure boards, cards on hjem.html, etc.)
jquery.min.js
common.js
common.css
[page name].js
[page name].css
- Download either the entire repository, gardermoen-website-it1-zipped.zip, or the src folder
- Download the "Live Preview" extension to VSCode, or in any other way host the website on localhost. This is to make sure that your browser's CORS/CORB policy does not affect the local XML file with data for direkteruter.html.
- In order to run the website, do the following:
- Open the folder containing
src
in PowerShell, e.g.C:\Users\myname\Documents\gardermoen-website-it1
. Then run.\src\scripts\downloadXML.ps1
. Keep the script running for as long as you plan to use the website, to ensure updated information on direkteruter.html. - Go to wherever you hosted the website. If you use the VSCode extension "Live Preview", it will probably be on
127.0.0.1:3000
. Then navigate to any HTML file.
- Open the folder containing
.js
files but instead make the changes in the TypeScript files before running the command tsc
in the scripts folder from the terminal. The reason for not touching the .js
files is that all those changes will be reverted as soon as you compile the .ts
files.
The development of this site is completed. No more issues will be created and/or resolved.
- Hjem
- Direkteruter
- Tansport til/fra
- Flyselskap
- About us
See the open issues for a full list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/yrjarv/gardermoen-website-it1