Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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 - Schedule - Theme1
Documentation: https://developer.arlo.co/doc/webcontrols/categorycatalogue
-->

<!-- Target Elements -->
<div class="arlo">
    <div class="arlo-filters arlo-text-color-dark">
        <div id="arlo-event-template-filter" class="arlo-filter-inline"></div>
        <div id="arlo-event-filter" class="arlo-filter-inline"></div>
    </div>
    <div id="arlo-catalogue"></div>
    <div id="arlo-category-footer"></div>
</div>

<!-- Templates -->
<script type='text/template' id='catalogue-template'>
    <div class="arlo-category-name arlo-h3 arlo-text-color-normal">
        <%= Name %>
    </div>
    <hr />

    <div class="arlo-loading-placeholder">
        <div class="arlo-placeholder-eventtemplates">
            <div class="arlo-placeholder-eventtemplate">
                <div class="arlo-placeholder-text arlo-bg-placeholder"></div>
            </div>
            <div class="arlo-placeholder-eventtemplate">
                <div class="arlo-placeholder-text arlo-bg-placeholder"></div>
            </div>
            <div class="arlo-placeholder-eventtemplate">
                <div class="arlo-placeholder-text arlo-bg-placeholder"></div>
            </div>
            <div class="arlo-placeholder-eventtemplate">
                <div class="arlo-placeholder-text arlo-bg-placeholder"></div>
            </div>
            <div class="arlo-placeholder-eventtemplate">
                <div class="arlo-placeholder-text arlo-bg-placeholder"></div>
            </div>
        </div>
    </div>
    <%= showCategoryEventTemplateCategoryItems({
        template: "#event-template-template",
        loadImmediately: true,
        maxCount: 6,
        includeLoadMoreButton: true,
        loadMoreButtonText: "Show More",
        callbacks: {onShow: "onShowEventTemplateCategoryList"},
        customUrls: {
            eventtemplate: "http://theme1.demo.arlo.co/event-template/",
            venue: "http://theme1.demo.arlo.co/venue/",
            presenter: "http://theme1.demo.arlo.co/presenter/"        
        }
    }) %>
</script>
      
<script type='text/template' id='event-template-template'>
    <div class="arlo-title-column arlo-ellipsis-overflow">
        <a href="<%= Uri %>" class="arlo-name arlo-text-color-normal">
            <%- Title %>
        </a>
    </div>
    <div class="arlo-middlewrap">
        <div class="arlo-duration-column arlo-text-color-light arlo-ellipsis-overflow">
            <div class="arlo-advertisedduration">
                <%= AdvertisedDuration %>
            </div>
        </div>
    
        <div class="arlo-offers-column  arlo-text-color-light arlo-ellipsis-overflow">
            <div class="arlo-offers">
                <%= formatAdvertisedOffers({freeText: "Free", showSingleOffer: true}) %>
            </div>
        </div>
    
        <div class="arlo-online-column arlo-text-color-lightest arlo-ellipsis-overflow">
            <% if (Tags.length > 0) { %>
                <%= formatCollection(Tags, "ul", true) %>
                <span>&nbsp;</span>
            <% } else { %>
                <span>&nbsp;</span>
            <% } %>
        </div>
    </div>
      
    <div class="arlo-next-running-column arlo-ellipsis-overflow">
        <div class="nextrunning-<%= EventTemplateID %>" data-registeruri="<%= RegisterInterestUri %>" data-customuri="<%if(typeof ViewUri!=='undefined'){%><%=ViewUri %><%}%>"></div>
    </div>
</script>
      
<script type='text/template' id='event-template'>
    <a href="<%= ViewUri %>" class="arlo-next-running">
        <%= formatDate(StartDateTime, "DD MMM") %>
    </a>
</script>
      
<script type='text/template' id='filter-template'>
    <%= showFilter({filterCode: "locname", showCount: false}) %>
    <%= showFilter({
        filterCode: "onlineorvenue",
        displayStyle: "ul",
        showCount: false,
        onlineOrVenueText: {
            online: "Live online",
            venue: "At a venue"
        }
    })%>
</script>

<!-- Dependencies -->
<script src="//code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" charset="utf-8"></script>
<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

              
                $font-primary: 'Source Sans Pro', Arial, Tahoma, sans-serif;
$color-primary: #08cec2;
$color-secondary: #ffdb3b;
$color-tertiary: #ff1d87;
$color-quadinary: #0086e3;
$color-shadow: #e6e6e6;
$color-light: #bcbcbc;
$color-dark: #565656;
$color-background: #ffffff;
$color-black: #000000;
$color-white: #ffffff;

@mixin tablet-screen {
    @media (max-width: 1100px) {
        @content;
    }
}

@mixin mobile-screen {
    @media (max-width: 600px) {
        @content;
    }
}

html {
    box-sizing: border-box;
}

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

/* spinner */
.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) {
    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 {
    font-family: $font-primary;
}

.arlo .arlo-filters {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    @include mobile-screen(){
        display: block;
    }
}

.arlo .arlo-filters #arlo-event-filter >div {
    display: flex;
    @include mobile-screen(){
        display: block;
    }
}

.arlo ul.arlo-filter-unordered-list.arlo-custom-ul {
    margin: 0;
}

.arlo #arlo-event-filter .arlo-filter-select, .arlo #arlo-event-template-filter .arlo-filter-select{
    padding: 10px 70px 10px 24px;
    background-repeat: no-repeat;
    background-position: 90% center;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='black' d='M18.706 8.294c-0.387-0.387-1.025-0.387-1.413 0l-5.294 5.294-5.294-5.294c-0.387-0.387-1.025-0.387-1.413 0s-0.387 1.025 0 1.413l6 6c0.194 0.194 0.45 0.294 0.706 0.294s0.513-0.1 0.706-0.294l6-6c0.394-0.387 0.394-1.025 0-1.413z'></path></svg>");
}

.arlo .arlo-traversable-category, .arlo .arlo-filter-select, .arlo .arlo-custom-li {
    display: inline-block;
    margin: 5px 10px;
    background-color: $color-shadow;
    border-radius: 20px;
    color: $color-dark;
    border: none;
    font-weight: normal;
    cursor: pointer;
    padding: 10px 24px;
    &:hover {
        opacity: 0.7;
    }
    @include mobile-screen(){
        width: 95%;
    }
}

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

.arlo .arlo-category-name {
    margin-bottom: 10px;
    color: $color-dark;
    font-size: 24px;
    line-height: 30px;
}

.arlo hr {
    height: 1px;
    border: 0;
    border-top: 1px solid #ECECEC;
    box-sizing: content-box;
    overflow: visible;
}

.arlo .arlo-eventtemplatecategoryitems-listitem {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    list-style: none;
    font-size: 15px;
    vertical-align: top;
    margin-bottom: 12px;
    text-decoration: none;
    display: flex;
    align-content: space-between;
    &:hover .arlo-advertisedduration, &:hover .arlo-name, &:hover .arlo-offer-container, &:hover .arlo-online-column ul li {
        color: $color-tertiary
    }
    @include tablet-screen() {
        padding-bottom: 15px;
        border-bottom: 1px solid $color-light;
    }
    @include mobile-screen(){
        display: block;
        text-align: center
    }
}

.arlo .arlo-eventtemplatecategoryitems-listitem >div {
    flex: 1 1 25%;
}

.arlo .arlo-eventtemplatecategoryitems-listitem .arlo-next-running-column {
    flex: 0 1 20%;
}

.arlo .arlo-middlewrap {
    display: flex;
    align-content: space-between;
}

.arlo .arlo-eventtemplatecategoryitems-listitem .arlo-middlewrap >div {
    flex: 1 1 25%;
}


.arlo .arlo-eventtemplatecategoryitems-listitem .arlo-name {
    text-decoration: none;
    color: $color-dark;
}

.arlo .arlo-advertisedduration, .arlo .arlo-offer-container {
    color: $color-light;
}

.arlo .arlo-online-column ul li {
    padding-right: 12px;
    color: $color-light;
    font-size: 28px;
}

.arlo .arlo-next-running > *, .arlo .arlo-register-interest, .arlo .arlo-find-events > div {
    color: $color-tertiary;
    text-decoration: none;
    padding: 10px 18px;
    margin: 5px;
    background-color: $color-shadow;
    border-radius: 20px;
    border: none;
    display: inline-block;
    text-align: center;
    &:hover {
        opacity: 0.7;
    }
}

.arlo .arlo-show-more-container {
    text-align: center;
}

.arlo .arlo-show-more {
    line-height: 20px;
    margin-top: 13px;
    cursor: pointer;
    padding: 12px 50px;
    text-decoration: none;
    border-radius: 20px;
    color: $color-black;
    font-weight: normal;
    font-size: 15px;
    display: inline-block;
    margin: auto;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
    background-repeat: repeat-x;
    background-color: $color-secondary;
}

.arlo .arlo-eventtemplatecategoryitems-listitems .arlo-show-more {
    background-color: #ED017B;
}
              
            
!

JS

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

        var scheduleFilter = {
            moduleType: "Filters",
            targetElement: "#arlo-event-filter",
            template: "#filter-template",
            filterControlId: 2
        };

        var scheduleControl = {
            moduleType: "CategoryCatalogue",
            targetElement: "#arlo-catalogue",
            template: "#catalogue-template",

            categoryFilterType: "facet",
            facetFilterStyle: "select",
            categoryFilterTarget: "#arlo-event-template-filter",
            nextRunningEventTemplate: "#event-template",
            nextRunningEventFilterControlId: 2,
            maxNextRunningEvents: 3,
            loadNextRunningButtonText: "Find Events",
            includeLoadMoreButton: true,
            loadMoreButtonText: "Show More Categories",
            maxCount: 2
        };

        var app = new window.ArloWebControls();

        app.start({
            "platformID": platformID,
            "showDevErrors": false,
            "modules": [scheduleControl, scheduleFilter]
        });
    });


    window.onShowEventTemplateCategoryList = function (getRenderCollectionElements, $) {
        var listItems = getRenderCollectionElements();

        ElementQueries.init();

        // Reset wrapper to static position
        $(".arlo-catalogue-wrapper").css("position", "static");

        // Find template tags and convert them into icons
        $.each(listItems, function (index, listItem) {
            var tags = $(listItem).find(".arlo-online-column ul li");

            $.each(tags, function (index, tag) {
                var $tag = $(tag);
                var tagText = $tag.html();
                switch (tagText) {
                    case "Web_SelfpacedOnline":
                        $tag.html("");
                        $tag.attr('title', "Self paced online option available");
                        $tag.addClass('icons8-tv-show icon-size-28');
                        break;
                    default:
                        $tag.remove();

                }
            });
        });

        // Hide placeholder when fully loaded
        $(".arlo-loading-placeholder").hide();
        $(".arlo-subcontrol.EventTemplateCategoryItems").css("min-height", 0);
        $("#catalogue").css("min-height", 0);
    };
})(jQuery, window.ElementQueries);
              
            
!
999px

Console