Esempio n. 1
0
 public function execute()
 {
     $page = new page();
     $page->addPlugin(new jqueryhook());
     $page->addPlugin(new bootstraphook());
     $page->addPlugin(new famoserhook());
     $page->addPlugin(new faviconshook());
     $page->addContent(new background("/images/background.jpg", "100%"));
     $times = new openingtimeshook("#openingtimes");
     $page->addPlugin($times);
     $nodes = $times->getOpeningTimesTableNodes(array(array("Montag", "07:30-12:00", "13:00-17:00"), array("Dienstag", "07:30-12:00", "13:00-17:00"), array("Mittwoch", "07:30-12:00", "13:00-17:00"), array("Donnerstag", "07:30-12:00", "13:00-18:00"), array("Freitag", "07:30-12:00", "13:00-17:00"), array("Samstag", "07:30-12:00", "geschlossen"), array("Sonntag", "geschlossen", "geschlossen")));
     $section = new section("Angebot", COLOR_PRIMARY_FOREGROUND, COLOR_PRIMARY_BACKGROUND);
     $section->addContent($nodes, 6);
     $div = new div("google-maps");
     $div->addCssElements(new simpleproperty(new width("100%")));
     $div->addCssElements(new simpleproperty(new height("260px")));
     $hook = new googlemapshook("#google-maps", 47.5458451, 7.5525755, "Neuweilerstrasse 112<br/>4060 Basel");
     $page->addPlugin($hook);
     $section->addContent($div, 6);
     $page->addContent($section);
     $section = new section("Kontakt", COLOR_SECONDARY_FOREGROUND, COLOR_SECONDARY_BACKGROUND);
     $kontaktplugin = new contactformhook();
     $section->addChildren($kontaktplugin->getBodyNodes());
     $page->addContent($section);
     $page->addContent(new footer());
     //read!: http://www.leyva.ch/SEO-Tutorial.pdf
     $page->render();
 }
Esempio n. 2
0
 public function __construct($foreground = COLOR_GREY_DARK, $background = COLOR_GREY_LIGHT)
 {
     parent::__construct("debug", $foreground, $background);
     $div = new div();
     $div->addClass("wrapper");
     $p = new p();
     $p->addClass("text-center");
     $text = new text();
     $text->setText("try again @ ");
     $a = new a(ONEPAGECREATOR_HOOK);
     $p->addChildren($text);
     $p->addChildren($a);
     $div->addChildren($p);
     $this->addChildren($div);
 }
Esempio n. 3
0
 public function __construct($foreground = COLOR_GREY_DARK, $background = COLOR_GREY_LIGHT)
 {
     parent::__construct("footer", $foreground, $background, "footer", new responsiveproperty(new emptyproperty(), new padding(EXTRA_SMALL_SPACER, NO_SPACER, SMALL_SPACER, NO_SPACER), new padding(SMALL_SPACER, NO_SPACER, LARGE_SPACER, NO_SPACER), new padding(LARGE_SPACER, NO_SPACER, EXTRA_LARGE_SPACER, NO_SPACER), new padding(LARGE_SPACER, NO_SPACER, EXTRA_LARGE_SPACER, NO_SPACER)));
     $div = new div();
     $div->addClass("wrapper");
     $p = new p();
     $p->addClass("text-center");
     $text = new text();
     $text->setText("Copyright © " . AUTHOR_NAME . " - ");
     $a = new a(AUTHOR_PAGE, AUTHOR_PAGE, AUTHOR_NAME, "_self");
     $p->addChildren($text);
     $p->addChildren($a);
     $div->addChildren($p);
     $this->addChildren($div);
 }
Esempio n. 4
0
 /**
  * @param iHtmlElement $node
  * @param int $width (1 -12)
  * @param int $paddingleft (1- 12)
  */
 public function addContent($nodes, $width = 12, $autoandjust = true, $paddingleft = 0, $mdwidth = 0)
 {
     if ($this->container == null) {
         $div = new div();
         $div->addClass("container");
         $this->addChildren($div);
         $this->container = $div;
     }
     if ($mdwidth == 0) {
         $mdwidth = $width;
         if ($autoandjust) {
             $mdwidth = 2 * $mdwidth;
             if ($mdwidth > 12) {
                 $mdwidth = 12;
             }
         }
     }
     $div = new div();
     $div->addClass("col-lg-" . $width);
     $div->addClass("col-md-" . $mdwidth);
     if ($paddingleft != 0) {
         $div->addClass("col-lg-offset-" . $paddingleft);
     }
     $div->addChildren($nodes);
     $this->container->addChildren($div);
 }