Tuesday - April 12th, 2016
What follows is a collection of notes and code samples compiled for the sake of having a quick and easy to understand reference for Bootstrap. Contents: I) What's Bootstrap? II) Your Header (the necessary Javascript) III) The Navbar IV) Your Body Search Box IV) Custom CSS File V) General Notes A) Elementary Elements (number of columns in layout, etc...) B) Text Styles (quotes, ordered lists, code notes...) C) Tables BTW: In some instances, I've documented the code using a little "code box," but in other instances, where the situation seemed to warrant it, I wrote it out and incorporated color coded some comments in green to make it stand out from the code which is written in blue. Also, for the sake of being able to document code, click here to access the "code machine." All you'll do is enter your raw code and the script will then enter the appropriate CSS tags so you can then display it like what you see here. "Bootstrap" is a responsive CSS package. In other words, it's a compreshensive CSS file along with some Javascript that works together in a way that allows your site to "respond" to different browser sizes. It's an exceptional approach to building a site that is mobile friendly in that you're not having to try and anticipate every possible screen size.
  1. <?php
  2. //you've got two ways in which you can "feed" the "bring_it()" function. You can do it at the class level through the "construct" functionality, or you can do it at the function / method level
  3. //at the "class" level, it will look like this:
  4. class Drumset {
  5. //setting up properties
  6. protected $snare;//the "protected" dynamic establishes the visibility of these properties being limited to this particular class
  7. protected $hihat;
  8. protected $kick;
  9. public function __construct($two, $hat, $bass){
  10. /*using the construct function to assign values to those properties. The "values" are, in fact, digital placeholders. The actual data will be coming in via line 26, but its this "construct" that dicates how that info will be categorized beneath the appropriate heading*/
  11. $this->snare=$two;
  12. $this->hihat=$hat;
  13. $this->kick=$bass;
  14. }
  15. public function bring_it() {
  16. echo "Ideally, my dreamkit is a {$this->snare} snare, a pair of {$this->hihat} cymbals and a rockin' {$this->kick} bass drum.";
  17. }
  18. }
  19. $kit=new Drumset ("Yamaha", "Sabian","24");
  20. $print_kit=$kit->bring_it();
  21. ?>