</p>
          </div>

          <?php 
    if ($images = get_field('galeria')) {
        ?>
          <div class="masonry">
            <h2 class="h1">Galeria de Imagens</h2>
            <div class="grid">
              <div class="grid-sizer"></div>
              <div class="gutter-sizer"></div>
              <?php 
        foreach ($images as $i => $img) {
            ?>
              <div class="grid-item <?php 
            shape($i);
            ?>
" style="background-image: url(<?php 
            echo $img['sizes']['gallery'];
            ?>
)">
                <a class="fancybox" rel="group" href="<?php 
            echo $img['url'];
            ?>
"><?php 
            image($img, 'gallery');
            ?>
</a>
              </div>
              <?php 
        }
Example #2
0
 function codeBuilder()
 {
     $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"]);
     $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"]);
     $links[] = alink(["rel" => "stylesheet", "href" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"]);
     $content = $this->ajaxHandler("", "", "ajaxCode", "", "post", false);
     $content .= script("\n        function loadFileCode (aFileName) {\n            ajaxCode ('/cody/loadFile', 'codeArea', {fileName: aFileName});\n        }\n        ");
     $content .= $this->getFileExplorer();
     $content .= div(["id" => "codeArea"], $this->getCodeWindow("1", file_get_contents("index.php")));
     $html = shape(doctype(), html(head(meta(["charset" => "UTF-8"]), title("Code- Online Developer Editor"), $links), body($content)));
     return $html;
 }
Example #3
0
 /**
  * Function to evaluate a key value pair for any valid boolean expression, all evaluations should be true
  * @param type $args
  * @return \htmlElement
  */
 function whenAnd($args)
 {
     if (is_array($args)) {
         $isTrue = true;
         foreach ($args as $key => $value) {
             if (!$value) {
                 $isTrue = false;
                 break;
             }
         }
         if ($isTrue) {
             return $this;
         } else {
             return shape();
         }
     } else {
         return shape();
     }
 }