/** * @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); }
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); }
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); }