You are here

brainstorm_page.install in Brainstorm profile 8

File

module/features/brainstorm_page/brainstorm_page.install
View source
<?php

/**
 * @file
 */
use Drupal\node\Entity\Node;

/**
 * Implements hook_install().
 */
function brainstorm_page_install() {
  $title = 'Typography';
  $body = "<h1> h1 heading </h1>\n    <div class=\"section-tags\">Et harum quidem rerum facilis</div>\n    <div class=\"italic\"> Sed ut perspiciatis,unde omnis iste natus error\n    sit voluptatem accusantium doloremque laudantium</div>\n    <p> Lorem ipsum dolor sit amet,consectetur adipisicing elit,sed\n    do eiusmod tempor incididunt ut labore et dolore magnaiqua.Ut enim ad\n    minim veniam,quis nostrud exercitation ullamco laboris nisiut aliquip ex\n    ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate\n    velit esse cillum dolore eu fugiat nulla pariatur</p>\n    <h2> h2 heading </h2>\n    <div class=\"section-tags\">Et harum quidem rerum facilis</div>\n    <div class=\"italic\"> Sed ut perspiciatis,unde omnis iste natus error\n      sit voluptatem accusantium doloremque laudantium</div>\n    <p> Lorem ipsum dolor sit amet,consectetur adipisicing elit,sed do\n    eiusmod tempor incididunt ut labore et dolore magnaiqua.Ut enim ad\n    minim veniam,quis nostrud exercitation ullamco laboris nisiut aliquip\n    ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n    voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>\n    <h3 class=\"left\"> h3 heading </h3>\n    <div class=\"section-tags\">Et harum quidem rerum facilis</div>\n    <div class=\"italic\"> Sed ut perspiciatis,unde omnis iste natus error\n    sit voluptatem accusantium doloremque laudantium</div>\n    <p> Lorem ipsum dolor sit amet,consectetur adipisicing elit,\n    sed do eiusmod tempor incididunt ut labore et dolore magnaiqua.Ut\n    enim ad minim veniam,quis nostrud exercitation ullamco laboris nisiut\n    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit\n    in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>\n    <h1>Highlights </h1>\n    <p> Lorem ipsum dolor sit amet,consec<mark>tetur adipis</mark>icing elit,\n    sed do eiusmod tempor incididunt ut labore et dolore magnaiqua.Ut enim\n    ad minim veniam,quis nostrud exercitation ullamco laboris nisiut aliquip\n    ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n    voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>\n    <h1>Blockquote</h1>\n    <blockquote>\n    <p>These cases are perfectly simple and easy to distinguish.In a free hour,\n    when ourpower of choice is untrammelled and when nothing prevents our\n    being able to dowhat we like best,every pleasure is to be welcomed and\n    every pain avoided.</p>\n    <footer> Choo web agency <div class='profession'> Founder</div></footer>\n    </blockquote>\n    <h1> Buttons </h1>\n    <div class=\"input\">\n    <input type='submit' value='more about us'><br>\n    <input type='button' value='more about us'>\n    </div>\n    <h1> Hover of tabs </h1>\n    <div class=\"block-local-tasks-block\">\n    <ul >\n    <li class=\"active\"><a href=\"\" class=\"active\">All</a></li>\n    <li><a href=\"\">Branding</a></li>\n    <li><a href=\"\">Web design</a></li>\n    <li><a href=\"\">Photography</a></li>\n    <li><a href=\"\">Illustration</a></li>\n    </ul>\n    </div>\n    <h1> Alerts</h1>\n    <div class=\"messages__wrapper\">\n    <div class=\"messages messages--error\">\n    <h2 class=\"element-invisible\">Error</h2>\n    <div class=\"close\"></div>\n    </div>\n    <div class=\"messages messages--warning\">\n    <h2 class=\"element-invisible\">Warning</h2>\n    <div class=\"close\"></div>\n    </div>\n    <div class=\"messages messages--status\">\n    <h2 class=\"element-invisible\">Status</h2>\n    <div class=\"close\"></div>\n    </div>\n    </div>\n    </div>\n    <h1>Paginator</h1>\n    <h4> If all three pages </h4>\n    <div class=\"item-list\">\n    <p> Selected the first page</p>\n    <ul class=\"pager\">\n    <li class=\"pager__item is-active even first\">\n    <a title=\"Go to page 1\" href=\"\">1</a></li>\n    <li class=\"pager__item odd\">\n    <a title=\"Go to page 2\" href=\"\">2</a></li>\n    <li class=\"pager__item pager-last odd last\">\n    <a title=\"Go to last page\" href=\"\">&gt;</a></li>\n    </ul>\n    </div>\n    <div class=\"item-list\">\n    <p> Selected the last page</p>\n    <ul class=\"pager\">\n    <li class=\"pager__item pager-first even first\">\n    <a title=\"Go to page first\" href=\"\">&lt;</a></li>\n    <li class=\"pager__item odd\">\n    <a title=\"Go to page 2\" href=\"\">2</a></li>\n    <li class=\"pager__item is-active even last\">\n    <a title=\"Go to page 3\" href=\"\">3</a></li>\n    </ul>\n    </div>\n    <h4> If more than three pages </h4>\n    <div class=\"item-list\">\n    <p> Selected the intermediate page</p>\n    <ul class=\"pager\">\n    <li class=\"pager__item pager-first even first\">\n    <a title=\"Go to page first\" href=\"\">&lt;</a></li>\n    <li class=\"pager__item is-active even\">\n    <a title=\"Go to page 2\" href=\"\">2</a></li>\n    <li class=\"pager__item odd\"><a title=\"Go to page 3\" href=\"\">3</a></li>\n    <li class=\"pager__item--ellipsis even\">...</li>\n    <li class=\"pager__item odd\"><a title=\"Go to page 5\" href=\"\">5</a></li>\n    <li class=\"pager__item pager-last odd last\">\n    <a title=\"Go to last page\" href=\"\">&gt;</a></li>\n    </ul>\n    </div>\n    <div class=\"item-list\">\n    <p> Selected the last page</p>\n    <ul class=\"pager\">\n    <li class=\"pager__item pager-first even first\">\n    <a title=\"Go to page first\" href=\"\">&lt;</a></li>\n    <li class=\"pager__item odd\"><a title=\"Go to page 1\" href=\"\">1</a></li>\n    <li class=\"pager__item--ellipsis even\">...</li>\n    <li class=\"pager__item even\"><a title=\"Go to page 4\" href=\"\">4</a></li>\n    <li class=\"pager__item is-active even last\">\n    <a title=\"Go to page 2\" href=\"\">5</a></li>\n    </ul>\n    </div>\n    <h1>Inputs</h1>\n    <div class=\"form-item\"><input type=\"text\" placeholder=\"E-mail address\"></div>\n    <div class=\"form-item\"><textarea rows=\"3\" cols=\"100\" placeholder=\"Write your comment here...\"> </textarea></div>\n    <div class=\"form-item\"><input type=\"text\" placeholder=\"Full name\" class=\"error\"><div class=\"description error\">This field is mandatory</div></div>";
  $node = Node::create(array(
    'type' => 'page',
    'title' => $title,
    'uid' => '1',
    'status' => 1,
    'path' => '/' . _brainstorm_profile_clean_alias($title),
  ));
  $node->body->value = $body;
  $node->body->format = 'full_html';
  $node
    ->save();
  $title = 'About us';
  $body = "<div id='about-us-page'>\n    <h3>Digital agency</h3>\n    <div class=\"first-part two-list\">\n    <div class=\"title\">You ideas come alive with us</div>\n    <p>Lorem ipsum dolor sit amet,consectetuer ux adipiscing elit,sed diam\n    nonummynibh and euismod tincidunt ut laoreet dolore magna aliquam erat\n    volutpat</p>\n    <ul>\n      <li><span>Lorem ipsum dolor sit amet</span></li>\n      <li><span>Dolor sit amet</span></li>\n      <li><span>Sit amet psum dolor</span></li>\n      <li><span>Sit amet psum dolor</span></li>\n      <li><span>Lorem ipsum dolor sit amet</span></li>\n      <li><span>Dolor sit amet</span></li>\n    </ul>\n    </div>\n    <div class=\"second-part\">\n    <ul class=\"skills-bar-container\">\n      <p><label>Market Analysis</label>\n      <div class=\"percent\" id=\"pourcent-1\">95%</div></p>\n      <li>\n        <div class=\"progressbar\" id=\"progress-1\"></div>\n      </li>\n      <p><label>Brand Identity</label>\n      <div class=\"percent\" id=\"pourcent-2\">85%</div></p>\n      <li>\n        <div class=\"progressbar\" id=\"progress-2\"></div>\n      </li>\n       <p> <label>Graphic Design</label>\n      <div class=\"percent\" id=\"pourcent-3\">99%</div></p>\n      <li>\n        <div class=\"progressbar\" id=\"progress-3\"></div>\n      </li>\n        <p><label>HTML Coding</label>\n      <div class=\"percent\" id=\"pourcent-4\">80%</div></p>\n        <li>\n          <div class=\"progressbar\" id=\"progress-4\"></div>\n        </li>\n      </ul>\n    </div>\n    </div>";
  $node = Node::create(array(
    'type' => 'page',
    'title' => $title,
    'uid' => '1',
    'status' => 1,
    'path' => '/' . _brainstorm_profile_clean_alias($title),
  ));
  $node->body->value = $body;
  $node->body->format = 'full_html';
  $node
    ->save();
}

Functions

Namesort descending Description
brainstorm_page_install Implements hook_install().