Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!--
Arlo Web Control Demo - Feature - Theme 2
Documentation: https://developer.arlo.co/doc/webcontrols/categorylist
https://developer.arlo.co/doc/webcontrols/eventtemplatecatalogue
-->


<!-- Target Elements -->
<div class="arlo">
  <div class="arlo-feature">
    <div class="arlo-description">
      <h1 id="arlo-feature-events">
        <a href="#widget-feature">Feature events</a>
      </h1>
      <h2>View our exciting range of events and workshops</h2>

      <div id="category-list"></div>
      <div class="arlo-feature-buttons">
        <a href="/event-catalogue/" class="arlo-button">View Catalogue</a>
        <a href="/event-schedule/" class="arlo-button">View Schedule</a>
      </div>
    </div>

    <div id="arlo-feature" class="arlo-event-templates"></div>
  </div>
</div>

<!-- Templates -->
<script type='text/template' id='feature-template'>
  <div class="arlo-listitem arlo-clearfix arlo-text-color-dark">
    <div class="arlo-detail arlo-font-primary arlo-text-color-dark">
      <div class="arlo-content">

        <div class="arlo-title arlo-font-special arlo-text-color-dark">
          <a href="<%= ViewUri %>" class="arlo-name arlo-text-color-dark arlo-h2">
            <%- Name %>
          </a>
        </div>

        <div class="arlo-summary arlo-text-color-light">
          <%- Description.Summary %>
        </div>

        <div class="arlo-advertisedduration">
          <i class="fa fa-clock-o"></i>
          <%= AdvertisedDuration %>
        </div>

        <div class="arlo-offers arlo-text-color-secondary">
          <%= formatAdvertisedOffers({showSingleOffer: true, freeText: "Free"}) %>
        </div>

        <% if (Tags.length > 0) { %>
          <div class="arlo-templatetags">
            <%= formatCollection(Tags, "ul", true) %>
          </div>
          <% } %>

      </div>
    </div>

    <div class="arlo-nextrunning">
    	<div class="arlo-next-running-title text-color-light">
      	Next Running
  		</div>
			<div class="nextrunning-<%= TemplateID %>"></div>
  	</div>
    
    <div class="arlo-listitem-buttons"></div>
  </div>
</script>

<script id="category-list-template" type="text/html">
  <a href="<%= ViewUri %>">
    <%= Name %>
  </a>
  <ul class="category-children"></ul>
</script>
  
<!-- Dependencies -->
<script type="text/javascript" src="//packages.arlocdn.net/jscontrols/1.0/resources/resizesensor.js" charset="utf-8"></script>
<script type="text/javascript" src="//packages.arlocdn.net/jscontrols/1.0/resources/elementqueries.js" charset="utf-8"></script>
<script type="text/javascript" src="//connect.arlocdn.net/jscontrols/1.1/init.js" charset="utf-8" defer="defer"></script>
              
            
!

CSS

              
                html {
  box-sizing: border-box;
}

*,
*::after,
*::before {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-weight: 500;
}

.arlo {
  font-size: 16px;
  font-family: "Source Sans Pro", Arial, Tahoma, sans-serif;
}

.arlo .arlo-loading-overlay {
  position: fixed;
  z-index: 999;
  height: 2em;
  width: 2em;
  overflow: show;
  margin: auto;
  bottom: 50%;
  top: 50%;
  left: 50%;
  right: 50%;
}

.arlo .arlo-loading-overlay:before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.3);
}

.arlo .arlo-loading-overlay:not(:required) {
  /* hide "loading..." text */
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}

.arlo .arlo-loading-overlay:not(:required):after {
  content: '';
  display: block;
  font-size: 10px;
  width: 1em;
  height: 1em;
  margin-top: -0.5em;
  -webkit-animation: spinner 1500ms infinite linear;
  animation: spinner 1500ms infinite linear;
  border-radius: 0.5em;
  box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
}

@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.arlo html {
  font-family: sans-serif;
  /* 1 */
  -ms-text-size-adjust: 100%;
  /* 2 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
}

.arlo body {
  margin: 0;
}

.arlo article,
.arlo aside,
.arlo details,
.arlo figcaption,
.arlo figure,
.arlo footer,
.arlo header,
.arlo main,
.arlo menu,
.arlo nav,
.arlo section,
.arlo summary {
  display: block;
}

.arlo audio,
.arlo canvas,
.arlo progress,
.arlo video {
  display: inline-block;
}

.arlo audio:not([controls]) {
  display: none;
  height: 0;
}

.arlo progress {
  vertical-align: baseline;
}

.arlo template,
.arlo [hidden] {
  display: none;
}

.arlo a,
.arlo a:before,
.arlo a:after {
  background-color: transparent;
  /* 1 */
  -webkit-text-decoration-skip: objects;
  /* 2 */
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
}

.arlo a:active,
.arlo a:hover {
  outline-width: 0;
}

.arlo abbr[title] {
  border-bottom: none;
  /* 1 */
  text-decoration: underline;
  /* 2 */
  text-decoration: underline dotted;
  /* 2 */
}

.arlo b,
.arlo strong {
  font-weight: inherit;
}

.arlo b,
.arlo strong {
  font-weight: bolder;
}

.arlo code,
.arlo kbd,
.arlo samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

.arlo dfn {
  font-style: italic;
}

.arlo h1 {
  font-size: 2em;
  /* Set 1 unit of vertical rhythm on the top and bottom margins. */
  margin: 0.75em 0;
}

.arlo mark {
  background-color: #ff0;
  color: #000;
}

.arlo small {
  font-size: 80%;
}

.arlo sub,
.arlo sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.arlo sub {
  bottom: -0.25em;
}

.arlo sup {
  top: -0.5em;
}

.arlo img {
  border-style: none;
}

.arlo svg:not(:root) {
  overflow: hidden;
}

.arlo figure {
  margin: 1.5em 40px;
}

.arlo hr {
  box-sizing: content-box;
  /* 1 */
  height: 0;
  /* 1 */
  overflow: visible;
  /* 2 */
}

.arlo pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

.arlo button,
.arlo input,
.arlo optgroup,
.arlo select,
.arlo textarea {
  font: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
}

.arlo button {
  overflow: visible;
}

.arlo button,
.arlo select {
  /* 1 */
  text-transform: none;
}

.arlo button,
.arlo html [type="button"],
.arlo [type="reset"],
.arlo [type="submit"] {
  -webkit-appearance: button;
  /* 2 */
}

.arlo button,
.arlo [type="button"],
.arlo [type="reset"],
.arlo [type="submit"] {
  /**
     * Remove the inner border and padding in Firefox.
     */
  /**
     * Restore the focus styles unset by the previous rule.
     */
}

.arlo button::-moz-focus-inner,
.arlo [type="button"]::-moz-focus-inner,
.arlo [type="reset"]::-moz-focus-inner,
.arlo [type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

.arlo button:-moz-focusring,
.arlo [type="button"]:-moz-focusring,
.arlo [type="reset"]:-moz-focusring,
.arlo [type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

.arlo input {
  overflow: visible;
}

.arlo [type="checkbox"],
.arlo [type="radio"] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
}

.arlo [type="number"]::-webkit-inner-spin-button,
.arlo [type="number"]::-webkit-outer-spin-button {
  height: auto;
}

.arlo [type="search"] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
  /**
     * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
     */
}

.arlo [type="search"]::-webkit-search-cancel-button,
.arlo [type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

.arlo::-webkit-input-placeholder {
  color: inherit;
  opacity: 0.54;
}

.arlo::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

.arlo fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

.arlo legend {
  box-sizing: border-box;
  /* 1 */
  display: table;
  /* 1 */
  max-width: 100%;
  /* 1 */
  white-space: normal;
  /* 1 */
  color: inherit;
  /* 2 */
  padding: 0;
  /* 3 */
}

.arlo optgroup {
  font-weight: bold;
}

.arlo textarea {
  overflow: auto;
}

.arlo ol,
.arlo ul,
.arlo li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.arlo .arlo-bg-color-primary {
  background-color: #343f56;
}

.arlo .arlo-bg-color-secondary {
  background-color: #343f56;
}

.arlo .arlo-bg-color-filters {
  background-color: #F1F7FB;
}

.arlo .arlo-bg-color-highlight {
  background-color: #FFFDF7;
}

.arlo .arlo-bg-color-normal {
  background-color: #fcfcfc;
}

.arlo .arlo-bg-color-darker {
  background-color: #f7f7f7;
}

.arlo .arlo-bg-color-darkest {
  background-color: #f2f2f2;
}

.arlo .arlo-text-color-primary {
  color: #343f56;
}

.arlo .arlo-text-color-secondary {
  color: #f1992e;
}

.arlo .arlo-text-color-contrast {
  color: #FFFFFF;
}

.arlo .arlo-text-color-lightest {
  color: #bcbcbc;
}

.arlo .arlo-text-color-light {
  color: #969696;
}

.arlo .arlo-text-color-normal {
  color: #5e5e5e;
}

.arlo .arlo-text-color-dark {
  color: #5e5e5e;
}

.arlo .arlo-text-color-link {
  color: #f1992e;
}

.arlo .arlo-font-primary {
  font-family: "Source Sans Pro", Arial, Tahoma, sans-serif;
}

.arlo .arlo-font-secondary {
  font-family: "Source Sans Pro", Arial, Tahoma, sans-serif;
}

.arlo .arlo-font-special {
  font-family: "Montserrat", Arial, Tahoma, sans-serif;
}

.arlo .arlo-font-size-larger {
  font-size: 110%;
}

.arlo .arlo-clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}

.arlo * html .arlo-clearfix {
  zoom: 1;
}

.arlo * {
  box-sizing: border-box;
}

.arlo *:first-child + html .arlo-clearfix {
  zoom: 1;
}

.arlo a {
  color: #f1992e;
  text-decoration: none;
  font-weight: normal;
}

.arlo a:hover {
  color: #f9b420;
}


/* Widget - Feature Events*/

.arlo .arlo-feature .arlo-description {
  text-align: center;
}

.arlo .arlo-feature h1,
.arlo .arlo-feature h2 {
  margin: 0;
}

.arlo .arlo-feature h1{
  font-size: 2.7em;
  font-weight: bold;
}
.arlo .arlo-feature h1 a {
  color: #343f56;
  cursor: default;
  font-weight: bold;
}
.arlo .arlo-feature h2 {
  color: #949494;
  font-size: 20px;
  font-weight: 300;
}

.arlo .arlo-feature p {
  font-size: 14px;
  font-weight: 300;
}

.arlo .arlo-feature #category-list {
  margin-top: 20px;
}

.arlo .arlo-feature #category-list > .categorylist-listitem > a {
  display: none;
}

.arlo .arlo-feature .categorylist-listitem {
  display: inline-block;
}

.arlo .arlo-feature .categorylist-listitem a {
  display: block;
  margin-bottom: 8px;
  margin-right: 12px;
  padding: 5px 15px;
  font-style: normal;
  font-size: 14px;
  border-radius: 4px;
  border: 2px solid #f1992e;
  color: #f1992e;
  text-decoration: none;
  cursor: pointer;
}

.arlo .arlo-feature .categorylist-listitem a:after {
    content: "\f054";
    display: inline-block;
    font-family: FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-left: 5px;
    color: #f1992e;
}

.arlo .arlo-feature .categorylist-listitem a:hover {
  background-color: #f1992e;
  color: #ffffff;
  transform: scale(1.1);
}

.arlo .arlo-feature .categorylist-listitem a:hover:after {
  color: #ffffff;
}

.arlo .arlo-feature .arlo-feature-buttons {
  margin-bottom: 20px;
}

.arlo .arlo-feature .arlo-feature-buttons a {
  display: inline-block;
  padding: 8px 15px;
  margin: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
  color: #bcc5d1;
  font-size: 14px;
  text-transform: uppercase;
}

.arlo .arlo-feature .arlo-feature-buttons a:hover {
  color: #f1992e;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem {
  display: inline-block;
  width: 33%;
  margin-right: .5%;
  margin-bottom: 15px;
}
.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem:nth-child(2n+3) {
  margin-right: 0;
}

.arlo[max-width~="1000px"] .arlo-feature .arlo-eventtemplatecatalogue-listitem {
  width: 49.5%;
  margin-right: 1%;
}

.arlo[max-width~="1000px"][min-width~="769px"] .arlo-feature .arlo-eventtemplatecatalogue-listitem:nth-child(2n) {
  margin-right: 0;
}

.arlo[max-width~="768px"] .arlo-feature .arlo-eventtemplatecatalogue-listitem {
  width: 100%;
  margin-right: 0;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-listitem {
  display: block;
  position: relative;
  text-align: left;
  background-color: #f5f5f5;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-detail {
  padding: 18px 22px 0;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-detail div {
  padding: 5px 0;
  font-size: 15px ;
  line-height: 22px;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-name {
  margin: 0 0 5px 0;
  display: inline;
  font-size: 20px;
  line-height: 1.5em;
  font-weight: bold;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-name:hover {
  color: #f9b420;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-summary {
  padding: 5px 0;
  font-size: 14px;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-offers .arlo-offer-container {
  color: #343f56;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-offers .arlo-offer-amount {
  font-size: 18px;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-nextrunning {
  margin-top: 14px;
  height: 77px;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem .arlo-next-running-title {
  color: #f1992e;
  font-size: 15px;
  margin-right: 25px;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: right;
  letter-spacing: 1px;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div[class^="nextrunning-"] a {
  float: right;
  display: inline-block;
  position: relative;
  padding: 10px 25px;
  background-color: #f1992e;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-style: normal;
  font-weight: bold;
  line-height: 20px;
  text-decoration: none;
  text-transform: uppercase;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div[class^="nextrunning-"] a:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  width: 0;
  height: 40px;
  border-top: 40px solid transparent;
  border-right: 30px solid rgb(244, 148, 30);
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div[class^="nextrunning-"] a:hover {
  background-color: #f9b420;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div[class^="nextrunning-"] a:hover:before {
  border-right-color: #f9b420;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div a.arlo-register-interest {
  background-color: #687082;
}

.arlo .arlo-feature .arlo-eventtemplatecatalogue-listitem div a.arlo-register-interest:before {
  border-right-color: #687082;
}

.arlo .arlo-feature .arlo-templatetags {
  margin-top: 12px;
  margin-bottom: 12px;
}

.arlo .arlo-feature .arlo-templatetags ul li {
  display: inline-block;
  padding-right: 12px;
  color: #f9b420;
  font-size: 24px;
}
              
            
!

JS

              
                document.addEventListener("arlojscontrolsloaded", function() {
  var platformID = "websitetestdata.arlo.co"; // Change platformID to point at your own account

  var categoryList = {
    moduleType: "CategoryList",
    targetElement: "#category-list",
    categoryTreeDepth: 1,
    maxCount: 5,
    template: "#category-list-template",
    callbacks: {
      onBeforeRender: categoryListOnBeforeRender
    },
    includeArloLink: false
  };

  var feature = {
    moduleType: "EventTemplateCatalogue",
    targetElement: "#arlo-feature",
    template: "#feature-template",
    includeLoadMoreButton: false,
    includeArloLink: false,
    maxCount: 3,
    maxNextRunningEvents: 1, // Defaults to 1
    customUrls: {
      eventtemplate: "http://theme2.demo.arlo.co/event-template/",
      venue: "http://theme2.demo.arlo.co/venue/",
      presenter: "http://theme2.demo.arlo.co/presenter/"
    },
     filter: {
       templateid: [3,11,13],
     },
    callbacks: {
      onShow: featureOnShow
    }
  };

  var featureApp = new window.ArloWebControls();

  featureApp.start({
    "platformID": platformID,
      "googleMapsAPIKey": "AIzaSyAQecSspMnsipB9oV0N4WKbqFNy5zhlNwg",
    "showDevErrors": true,
    "modules": [feature, categoryList]
  });

  /* ----- Callback functions ----- */

  // "OnBeforeRender" callback for category list
  function categoryListOnBeforeRender(eventsData, $) {
    // Replace the View URI with a link to the catalogue page filtered by this category
    $(eventsData).each(function(index, eventData) {
      var id = eventData.attributes.CategoryID;
      eventData.attributes.ViewUri = "http://theme2.demo.arlo.co/catalogue/#categoryfilter-templatecategoryid=" + id;
    });

    // Only return the top 6 results
    var maxCount = 6;
    eventsData.splice(maxCount - 1, eventsData.length);
  }

  // "OnShow" callback for featured event templates
  function featureOnShow(getRenderCollectionElements, $) {
    var listItems = getRenderCollectionElements();
    var listParent = $(listItems[0]).parent()[0];

    ElementQueries.init();
    $.each(listItems, function(index, listItem) {
      var tags = $(listItem).find(".arlo-templatetags ul li");
      $.each(tags, function(index, tag) {
        var $tag = $(tag);
        var tagText = $tag.html();
        switch (tagText) {
          case "Web_DummyData":
            $tag.remove();
            break;
          case "Web_Public":
            $tag.html("");
            $tag.addClass('icons8 icons8-user-groups icon-size-30');
            break;
          case "Web_LiveOnline":
            $tag.html("");
            $tag.addClass('icons8-headset icon-size-30');
            break;
          case "Web_SelfpacedOnline":
            $tag.html("");
            $tag.addClass('icons8-tv-show icon-size-30');
            break;
          case "Web_PrivateOnsite":
            $tag.html("");
            $tag.addClass('icons8-home icon-size-30');
            break;
          default:
            $tag.remove();
        }
      });
    });

    function setListItemsHeight() {
      $(listParent).find(".arlo-listitem").height("auto");
      var tallestListItemHeight = 0;
      $.each($(listParent).find(".arlo-listitem"), function(index, listItem) {
        // Get height from combining heights of list item elements (because of issue with using list items own height)
        var height = 0;
        height += $(listItem).find(".arlo-title").height();
        height += $(listItem).find(".arlo-summary").height();
        height += $(listItem).find(".arlo-advertisedduration").height();
        height += $(listItem).find(".arlo-offer-container").height();
        height += $(listItem).find(".arlo-delivery-title").height();
        height += $(listItem).find(".arlo-templatetags").height();

        if (height > tallestListItemHeight) {
          tallestListItemHeight = height;
        }
      });
      $("#arlo-feature .arlo-content").height(tallestListItemHeight + 35);
      $("#arlo-feature .arlo-nextrunning").height(70);
    }

    setTimeout(function() {
      setListItemsHeight();
    }, 0);

    $(window).bind('resize', function() {
      setTimeout(function() {
        setListItemsHeight();
      }, 100);
    });

  }
});
              
            
!
999px

Console