28.3. Assignments DE.1

Submission
You must submit assignments using git
Create Repo
  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • git push your local repo to the above remote repo.
  • For node assignments the line node_modules/must be in your .gitignore file.
Submit
By email to with:
  • The word 'submission <subjectname>' in the subject line
  • The url(s) of your repo(s) in the body

28.3.1. Assignment DE.1.0

In the first JavaScript lesson you saw or you will see:

JavaScript in the Head

Example 28.1. The JavaScript, hw00h.js
'use strict';

const go = function () {
    let targets = document.getElementsByClassName('title');
    for(let i = 0; i < targets.length; ++i) {
        targets[i].innerHTML = 'Hello, World!';
    }
}

window.addEventListener('load', go);

Example 28.2. The HTML5 hw00h.html
<!doctype html>
<html>
    <head>
        <meta charset='utf-8'/>
        <meta name='viewport' content='width=device-width, initial-scale=1.0'/>
        <title class='title'></title>
        <link rel='icon' type='image/svg+xml' href='./favicon.svg'/>
        <script src='./js/hw00h.js'></script>
    </head>
    <body>
        <h1 class='title'></h1>
    </body>
</html>

View in browser.


We have created a repo for you with this code.

  • Clone that to your own computer, ie in a terminal do:
    mkdir projects
    cd projects
    git clone https://phidip@bitbucket.org/phidip/de10.git
    
  • Remove the reference to our repo by
    git remote remove origin
  • Change the code by adding some paragraphs describing what the code does into the html document. Test iteratively until it works.
  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • Do
    git remote add origin <your repo>

    so that it points to your new repo, and not to ours.

  • git push your local repo to the above remote repo. Remember the special syntax for a first push.
  • Submit the url of the repo.

28.3.2. Assignment DE.1.1

Make an HTML5 page with a menu containing at least 3 items. One leading to another HTML5 page with some personal info you want to share. Another leading to a page with a CV of exams qualifying you for where you are now, and a third with a description of your leisure activities, such as sky diving, marathoning, mountain climbing or whatever you do.

Make a git repo in that directory. Stage the files. Make a screen dump of the output of the git status command.

Commit your work. Make another screen dump of the output of the git status command. Stage the two screen dumps, recommit, and submit the url of the repo.