JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<!--
Arlo Web Control Demo - Online Activities List Widget - Theme 2
Documentation: https://developer.arlo.co/doc/webcontrols/onlineactivities
-->
<!-- Target Elements -->
<div class="arlo arlo-online-activities-widget">
<div class="arlo-online-activities-widget-intro">
<h1><a href="#widget-online-activities">eLearning</a></h1>
<h2>Learn online at your own pace. </h2>
<a href="http://theme2.demo.arlo.co/online-activities-list/" class="arlo-footer-link">View all online activities</a>
</div>
<div id="online-activities-list"></div>
</div>
<!-- Templates -->
<script type='text/template' id='online-activities-template'>
<div class="icons8-tv-show icon-size-80 arlo-icon"></div>
<div class="arlo-details">
<h3 class="arlo-name arlo-font-special">
<a href="<%= ViewUri %>">
<%= Name %>
</a>
</h3>
<div class="arlo-summary arlo-text-color-light">
<%= Summary %>
</div>
<div class="arlo-offers">
<%= formatAdvertisedOffers({
showPriceWithTaxInclusive: true,
showSingleOffer: false,
showLabel: true,
showCurrencyCode: false,
showMessage: true,
showTaxRate: true,
freeText: "Free"
}) %>
</div>
</div>
<div class="arlo-buttons">
<%= formatRegistrationInfo('link') %>
</div>
</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>
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 .icon-size-80 {
font-size: 80px;
}
.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;
}
.arlo .arlo-online-activities-widget-intro {
text-align: center;
}
.arlo .arlo-online-activities-widget-intro h1 {
margin-top: 0;
margin-bottom: 0;
font-size: 2.7em;
}
.arlo .arlo-online-activities-widget-intro h1 a {
color: #343f56;
font-weight: bold;
text-decoration: none;
}
.arlo .arlo-online-activities-widget-intro h1 a:hover {
cursor: default;
}
.arlo .arlo-online-activities-widget-intro h2 {
margin-top: 4px;
margin-bottom: 4px;
font-size: 20px;
font-weight: 300;
color: #949494;
}
.arlo .arlo-oa-listitems {
margin: 40px 0;
}
.arlo .arlo-oa-listitem {
width: 49.5%;
margin-right: 1%;
margin-bottom: 20px;
display: inline-block;
background: #f5f5f5;
vertical-align: top;
}
.arlo .arlo-oa-listitem:nth-child(2n) {
margin-right: 0;
}
.arlo[max-width~="660px"] .arlo-oa-listitem {
width: 100%;
margin-right: 0;
}
.arlo .arlo-oa-listitem .arlo-details {
padding: 30px 10px 0;
margin-left: 120px;
}
.arlo .arlo-oa-listitem .arlo-icon {
margin: 30px 30px;
float: left;
line-height: 1em;
}
.arlo .arlo-oa-listitem[max-width~="350px"] .arlo-icon {
display: none;
}
.arlo .arlo-oa-listitem[max-width~="350px"] .arlo-details {
margin-left: 0;
}
.arlo .arlo-oa-listitem .arlo-name,
.arlo .arlo-oa-listitem .arlo-summary,
.arlo .arlo-oa-listitem .arlo-offers {
padding: 5px 18px;
}
.arlo .arlo-oa-listitem .arlo-name {
margin-top: 0;
margin-bottom: 0;
line-height: 1.5em;
}
.arlo .arlo-oa-listitem .arlo-name a {
font-size: 20px;
color: #565656;
font-weight: bold;
}
.arlo .arlo-oa-listitem .arlo-name a:hover {
color: #f1992e;
}
.arlo .arlo-oa-listitem .arlo-summary {
font-size: 14px;
}
.arlo .arlo-oa-listitem .arlo-buttons {
text-align: right;
}
.arlo a.arlo-event-register {
display: inline-block;
position: relative;
padding: 10px 25px;
background-color: #f1992e;
color: white;
font-weight: bold;
font-size: 16px;
line-height: 20px;
text-transform: uppercase;
}
.arlo a.arlo-event-register:before {
content: "";
position: absolute;
top: 0;
left: 0;
transform: translateX(-100%);
width: 0;
height: 40px;
border-top: 40px solid transparent;
border-right: 30px solid #f1992e;
}
.arlo a.arlo-event-register:hover {
background-color: #f9b420;
}
.arlo a.arlo-event-register:hover:before {
border-right-color: #f9b420;
}
document.addEventListener("arlojscontrolsloaded", function() {
var platformID = "websitetestdata.arlo.co";
var onlineActivitiesList = {
moduleType: "OnlineActivities",
targetElement: "#online-activities-list",
template: "#online-activities-template",
loadMoreButtonText: "Show More",
maxCount: 2,
includeLoadMoreButton: false,
includeArloLink: false,
customUrls: {
eventtemplate: "http://theme2.demo.arlo.co/event-template/",
venue: "http://theme2.demo.arlo.co/venue/",
presenter: "http://theme2.demo.arlo.co/presenters/"
},
filter: {
templateID: [11,177],
},
callbacks: {
onShow: oaListOnShow
}
};
new window.ArloWebControls().start({
"platformID": platformID,
"showDevErrors": true,
"modules": [onlineActivitiesList]
});
function oaListOnShow(getRenderCollectionElements, $) {
var listItems = getRenderCollectionElements();
var listParent = $(listItems[0]).parent()[0];
ElementQueries.init();
function setOAListItemsHeight() {
$(listParent).find(".arlo-oa-listitem").height("auto");
var tallestListItemHeight = 0;
$.each($(listParent).find(".arlo-oa-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-name").height();
height += $(listItem).find(".arlo-summary").height();
height += $(listItem).find(".arlo-offers").height();
if (height > tallestListItemHeight) {
tallestListItemHeight = height + 80;
}
});
$("#online-activities-list .arlo-details").css("min-height", tallestListItemHeight);
}
setTimeout(function() {
setOAListItemsHeight();
}, 1000);
$(window).bind('resize', function() {
setTimeout(function() {
setOAListItemsHeight();
}, 100);
});
}
});
Also see: Tab Triggers