Skip to content

Final task of subject IT 1, Norwegian Upper Secondary School. A website for the Norwegian main airport Gardermoen.

License

Notifications You must be signed in to change notification settings

yrjarv/gardermoen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Gardermoen Website (IT1)

Table of Contents
  1. About The Project
  2. Making Your Own Local Copy
  3. Roadmap
  4. License
  5. Contact

About The Project

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.

Minimum Requirements Met (in Norwegian)

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.

What More Has Been Done?

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.

How Does It Work? (Technical Information)

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 and outXML.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 compiler
    • jquery.min.js - Minified jQuery.
    • node_modules, package-lock.json, and package.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.)
All the html files (except index.html) link to:
  • jquery.min.js
  • common.js
  • common.css
  • [page name].js
  • [page name].css

Built With

  • TypeScript
  • JQuery
  • PowerShell

Making And Running Your Own Local Copy

  1. Download either the entire repository, gardermoen-website-it1-zipped.zip, or the src folder
  2. 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.
  3. In order to run the website, do the following:
    1. 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.
    2. 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.
If you want to make any changes to the scripts, do not touch the .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.

Roadmap

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).


License

Distributed under the MIT License. See LICENSE.txt for more information.


Contact

Project Link: https://github.com/yrjarv/gardermoen-website-it1


About

Final task of subject IT 1, Norwegian Upper Secondary School. A website for the Norwegian main airport Gardermoen.

Resources

License

Stars

Watchers

Forks