Monday 2/29
- Review Midterm Guidelines
- Office Hours reminder: by appointment, or additional office hours on Wednesday
- Show & Tells: George, Camille, James C
- User Testing (slides)
- User Test Responsive Prototypes
- HTML5 Audio/Video
- Intro to Git & GitHub
- Review Topics
- Non-Quiz...?
HTML5 Audio & Video
<audio>
and<video>
elements- Some useful attributes:
autoplay
muted
loop
poster="path/to/image"
- Useful resource: archive.org (example)
- Formats supported by various browsers. See sub-features for video here and for audio here. It is best to include multiple sources. Example:
<video autoplay loop muted poster="video/stock_flowers.jpg"> <source src="video/stock_flowers.mp4"> <source src="video/stock_flowers.ogv"> </video>
Git / GitHub
- Git - Version Control
- Key vocab from the GitHub Glossary:
- repository - Project folder.
- commit - A revision to a file or set of files. Add files before committing them.
- fork - A personal copy of another user's repository that lives on your account
- clone - A copy of a repository that lives on your computer instead of on a website's server.
- merge - Combine changes. Git can merge changes automatically.
- push - Send your committed changes to a remote repository
- pull - Fetch changes and merge them
- pull request - A request to merge (pull) changes
- remote - A version of a repository that is hosted somewhere else, for example on GitHub's server.
- GitHub - a website to host "git repositories"
- In class exercise:
- Fork my repo to your github account
- Clone it to your computer
- Edit the index.html to add a link to your GitHub account
- Commit your changes
- Push your committed changes to your fork
- Submit a pull request from your fork to the original repo. I will merge in the changes.
HW
- Read up on GitHub
- Post your project to your personal GitHub.
- Submitting a pull request to this github repo that adds a link to your github account.
- Review the Non-Quiz and come to the next class with any questions related to this or your midterm projects / self learning
Wednesday 3/2
Grid Review
- Example from class
- Based on this Grid Tutorial recommended by Tyler
Forms & User Input
Forms and Input elements allow the user to interact and submit information. Typically forms "submit" to a server with a GET or POST request.
- A
<form>
element wraps one or more elements that accept user input. Theirname
attribute determines the name for a set of name-value pairs (often referred to as "key-value pairs"). The form has two important attributes:action
attribute determines a url that the form will submit its datamethod
is an HTTP request method, eitherget
(default) orpost
. A get request is the type of request we make with our browsers when we load a webpage, and the result will look something like this: http://formactionurl.com/?key=value&key2=value2.
<input>
has atype
attribute. There are many different types includingtext
- text inputradio
- radio button. A set of radio buttons shares aname
and only one of them can be selected. Each has a uniquevalue
. That value becomes the value for that name/key.color
colorpickersearch
email
password
date
button
- same as a<button>
elementsubmit
- button that submits the form- Read more about types here and about input attributes here.
<label>
is a way to label a form element. Its attributefor="name"
determines the name of the input element it references.<select>
- a dropdown with several<option>
elements. The select has aname
attribute, and can have amultiple
attribute to allow selection of multiple options. Read more here.
In our example in class, we submitted a form to the Spotify API that looked like this.
<form action="https://api.spotify.com/v1/search" method="GET">
<!-- a text input fills out the q= value -->
<label for="q">Enter a search query</label>
<input name="q" type="text" placeholder="Enter Text">
<br/>
<!-- two radio buttons share the same name, to fill out the type of thing we're searching for, either type=artist or type=track -->
<label for="type">Choose a type</label><br/>
<label for="artist">Artist</label>
<input id="artist" name="type" type="radio" value="artist">
<label for="track">Track</label>
<input id="track" name="type" type="radio" value="track">
<input type="submit">
Click to submit
</input>
</form>