fake it to make it

building our sites with twitter bootstrap


Ashley Williams, NYCDA

Thursday, 14 March 2013

DIRECTORY STRUCTURE


My Site
    - design
    - dev
        - assets
            - images
            - stylesheets
            - javascripts

URLS


  • absolute URL - contains exact location of resource
C:/users/ashleygwilliams/documents/mysite/dev/index.html

C:/users/ashleygwilliams/documents/mysite/dev/assets/css/custom.css

C:/users/ashleygwilliams/documents/mysite/dev/assets/images/pic.jpg
  • relative URL - contains info to find location of resource based on current resource
To describe custom.css to index.html
/assets/css/custom.css

To describe pic.jpg to custom.css

../images/pic.jpg


PRACTICE



There's a lot wrong here!

  1. Fix the relative URLs so that all assets are properly linked
  2. Refactor the tags to use HTML5
  3. The CSS is using IDs and has a lot of redundancy, can you refactor it to be more D.R.Y?

TERMINAL COMMANDS

cd <name> = change to folder
cd .. = move into containing folder
mkdir <name> = make a directory in current location
touch <name> = create a file
ls - list what is in the current location
rm <name> = remove file
rmdir <name> = remove directory

cp file1 file2 = copy file
mv file1 file2 = rename/move file


Terminal shortcuts


<tab> = autocompletes directory and file names (case-sensitive!!!)
<up-arrow> or <down-arrow> = browse previous commands you used 
~/ = go to your root path (this is usually your user folder)

GITHub


What does VERSION CONTROL mean?

  • A place to keep
  • A place to share
  • A place to collaborate
  • A place to review
  • A place to manage
  • A place to merge
  • A place to iterate

Create a repo

  1. git init - when in the top level folder of your project
  2. git add . // git commit -m "initial commit" to add your original changes
  3. go to github.com and create a new repo
  4. git remote add origin <address of repo>
  5. git push -u origin master

Basic Individual workflow


  1. make changes
  2. git add .
  3. git commit -m "<message>"
  4. git push

fake it to make it

By ag_dubs

fake it to make it

  • 627