- Fork this repo to your account
- Open a terminal window
- Clone your copy of the repo to your desktop.
- Change directories into the pitt-ceteicean folder
- Run
python -m "http.server"
- In Chrome, open
http://localhost:8000
- In your pitt-ceteicean folder, you have a copy of the XML behind the Duke Databank of Documentary Papyri's TEI source for http://papyri.info/ddbdp/p.fay;;110#edition, plus an HTML wrapper for it.
- Look at the source files:
p.fay.110.html
andcss/pitt.css
. - Our first goal is to make our copy look as much like the original, using just CSS.
- Javascript is just another programming language.
- Runs in pretty much any browser
- You'll recognize a lot of things:
- functions look like
fname()
- there are objects, whose members you can access with the dot operator:
document.characterSet
- functions look like
- Things that are different:
- whitespace doesn't matter as much
- end your lines with
;
- variables should be declared with
var
- function bodies get wrapped in curly braces:
{...}
- Javascript is way more anarchic than Python.
Let's try some!
Exercise 2: Publish your work on GitHub Pages
- Commit and push your work back to your fork.
- Go to https://
<your repo>
/settings (the "Settings" tab on your repo's front page). - Scroll down to right above the "Danger Zone", the "GitHub Pages" section, and under "Source", choose "master branch"
- Your repo's contents should be available under https://
<your repo>
.github.io. - If you do some more work and commit and push it, it should (shortly, not instantaneously) show up there automatically.