UGC Techdocs
  • Introduction
  • Guides
    • Analytics
      • Tracking UGC on Adobe Analytics
      • Tracking Widget interactions with Google Analytics
    • Direct Uploader
      • How to add Custom Data to Direct Uploader
      • How to capture Custom Data on Direct Uploader
      • How to automatically tag data on Direct Uploader
      • How to Customize error messages on Direct Uploader
      • How to Track Direct Uploader form submissions with Google Analytics (Universal & GA 4)
    • Data Templates
      • Creating a Data Template
    • Rights via Registration
      • Capture Custom Data on Rights by Registration Form
      • Styling Rights via Registration Form
    • REST API
      • Caching REST API results for optimization
      • Posting content into Nosto via Tile API
      • Posting images into Nosto via Tile API
    • Onsite Widgets (2.0)
      • Blank Canvas
        • How to Use the Blank Canvas to Create a Twitter Count Widget
        • Creating an Auto-Scrolling Carousel using Blank Canvas
        • Creating Gallery Widget by Using the Blank Canvas Widget
        • Creating a simple Hover effect using Blank Canvas
        • Creating a Word Cloud using Blank Canvas
        • Creating Your Widget by Using the Blank Canvas
      • Bind your own Events
      • Creating a Grid Widget from Waterfall
      • Create a Q&A Widget using Data Templates
      • Displaying a Widget in a Mobile App
      • Dynamically Specify Products to Display in Widget
      • Dynamically specify what Tile to display in a Widget
      • How to add a title / subtitle to a widget
      • How to localize the load more button on widgets
      • How to overlay existing Google Map with the UGC Map Widget
      • How to use Filter and search in a Widget
      • How to change click on inline tile behaviour to redirect to PDP in a Widget
      • Styling cross-sellers on Grid and Carousel Widgets
      • How to Load External JS and CSS into Widgets
      • Profiling Widget Performance
      • Re-targeting with Widgets and Facebook Pixel
      • Render Widget filters dynamically
      • Styling Carousel Widget
      • Styling Grid Widget
      • Styling Masonry Widget
      • Styling Waterfall Widget
      • Styling Widget Expanded Tile
      • Styling Widget Shopspots
      • Using Web Fonts in Widgets
    • Digital Screens
      • Customizing Carousel Event Screen
      • Customizing Mosaic Event Screen
      • Customizing Scrollwall Event Screen
      • Customizing the Mosaic Event Screen to Have 9 Even Tiles
    • Email
      • Adding Location to an Email Tile
      • Styling the Email Widget
    • Integrations
      • DoubleClick
        • UGC Ads with Nosto and Google DoubleClick
      • Zapier
        • Consuming UGC Webhooks via Zapier
      • Mailchimp
        • Bring Social Content into a Mailchimp Campaign
    • Webhooks
      • Trigger notifications when content is in the moderation queue
  • Widgets
  • API Docs
    • JavaScript API
      • Widgets
        • Introduction
        • API Reference for Content Widgets
        • API Reference for Blank Canvas
        • API Reference for Map Widget
      • Digital Screens
        • Introduction
        • API Reference
    • Content API
      • Reference
    • REST API
      • Reference
        • Filters API
        • Moderation Views API
        • Tags API
        • Terms API
        • Tiles API
        • Users API
        • Widgets API
        • Automation Rules API
        • REST API Reference Widgets style and config
      • Best Practices
    • Webhooks
  • Enterprise Tools
    • Automation Rules
      • Triggers
      • Actions
      • Samples
    • Data Templates
    • User Access Control (UAC)
    • Single Sign On (SSO)
    • Enterprise Admin User Interface (EAUI)
    • Zapier
  • Commerce Tools
    • Product Feeds
    • Widget Implementation
    • Reporting
    • Integrations
      • Google Tag Manager
      • Magento
      • SalesForce Commerce Cloud
      • Shopify
      • Shopify Add To Cart
        • Global Variant Mapping for Add to Cart
        • Customise Add to Cart Widget Experience
  • Analytics
    • Google Analytics 4
      • Getting Started
      • Widgets Events
      • E-commerce Events
      • Email Events
  • Terms of Use
Powered by GitBook
On this page
  • Overview
  • Use the Code Editor
  • Fork from Nosto's UGC
  • Layout Structure
  • Possible Scenarios
  • Tile Structure
  • Code
  • Sample
  • Helpful Resource

Was this helpful?

  1. Guides
  2. Onsite Widgets (2.0)

Styling Waterfall Widget

PreviousStyling Masonry WidgetNextStyling Widget Expanded Tile

Was this helpful?

Overview

This article will instruct you on how to custom style a Waterfall Widget using Custom CSS. If you're looking to customise a widget using our Javascript API - you can find the documentation .

Use the Code Editor

You can use the Code Editor to modify both your Custom CSS and JavaScript. The CSS editor supports . That means you can use both traditional CSS syntax or the better LESS syntax.

Fork from Nosto's UGC

You can now also click the fork link at the top-right corner of each editor pane. This brings the boilerplate code from the Nosto's UGC codebase so that you don't need to write from scratch or copy & paste from our Developer Portal.

Layout Structure

The below Layout demonstrates the wrappers of our Widget tiles.

|

Diagram

|

Code

<!DOCTYPE html>
<html class="csstransforms csstransforms3d csstransitions js no-touch">
<head>...</head>
<body>
<div class="track">
<div id="container" class="container isotope">
<!-- All tiles will be appeneded to here -->
</div>
<a class="button js-load-more">Load more content</a>
<div class="spinner-overlay">
<div class="spinner"></div>
</div>
</div>
</body>
</html>

| | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

Possible Scenarios

  • Changing the background style by setting body selector.

  • Changing the tile container style by setting #container selector.

  • Changing the Load More Data style by setting .js-load-more selector.

  • Changing the AJAX indicator style by setting .spinner-overlay and .spinner selectors.

Tile Structure

The Waterfall widget is mostly composed by tiles - as such it is much easier to customise the Waterfall widget when you are familiar with it's structure.

Diagram

Snapshot

Code

The diagram above only shows until the 4th level. Check the complete Tile structure by referencing the following code.

<div class="tile ">
    <div class="tile-content">
        <div class="tile-image-wrapper">
            <img class="tile-image">
            <div class="tile-media-loading">
                <span class="tile-media-loading-icon"></span>
            </div>
        </div>
        <div class="tile-avatar-wrapper">
            <div class="tile-avatar-placeholder">
                <img>
            </div>
            <a class="tile-avatar-link">
                <img class="tile-avatar-image"/>
            </a>
        </div>
        <div class="tile-belt">
            <div class="tile-source tile-source-twitter">
                <i class="fs fs-twitter"></i>
            </div>
            <div class="tile-timestamp"></div>
            <div class="tile-user-info">
                <div class="tile-user">
                    <a class="tile-user-top">
                        <span class="tile-user-name"></span>
                    </a>
                    <a class="tile-user-bottom">
                        <span class="tile-user-handle"></span>
                    </a>
                </div>
            </div>
        </div>
        <div class="tile-caption"></div>
        <div class="tile-tags">
            <a class="tile-tag"></a>
        </div>
        <div class="tile-interactions">
            <span class="tile-interaction-like">
                <a class="tile-interaction-link">
                    <i class="fs fs-thumbs-up"></i>
                </a>
                <span class="tile-interaction-count"></span>
            </span>
            <span class="tile-interaction-dislike">
                <a class="tile-interaction-link">
                    <i class="fs fs-thumbs-down"></i>
                </a>
                <span class="tile-interaction-count"></span>
            </span>
            <span class="tile-interaction-vote">
                <a class="tile-interaction-link">
                    <i class="fs fs-triangle-up"></i>
                </a>
                <span class="tile-interaction-count"></span>
            </span>
            <span class="tile-interaction-share">
                <a class="tile-interaction-link">
                    <i class="fs fs-share"></i>
                </a>
                <ul class="tile-sharing-expanded">
                    <li>
                        <a class="tile-share-button">
                            <div class="fs fs-facebook"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-button twitter">
                            <div class="fs fs-twitter"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-button pinterest">
                            <div class="fs fs-pinterest"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-button gplus">
                            <div class="fs fs-googleplus"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-button linkedin">
                            <div class="fs fs-linkedin"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-button email">
                            <div class="fs fs-envelope"></div>
                        </a>
                    </li>
                    <li>
                        <a class="tile-share-close">
                            <i class="fs fs-close"></i>
                        </a>
                    </li>
                </ul>
            </span>
        </div>
        <div class="tile-twitter-intent">
            <a class="tile-twitter-reply">
                <i class="fs fs-reply"></i>
            </a>
            <a class="tile-twitter-retweet">
                <i class="fs fs-retweet"></i>
            </a>
            <a class="tile-twitter-favorite">
                <i class="fs fs-heart"></i>
            </a>
        </div>
    </div>
</div>

Sample

The following is an example of a customized widget.

<script type="text/javascript">(function (d, id) { if (d.getElementById(id)) return; var t = d.createElement('script'); t.type = 'text/javascript'; t.src = '//assetscdn.stackla.com/media/js/widget/fluid-embed.js'; t.id = id; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(t); }(document, 'stackla-widget-js'));</script>

You can use the following CSS/LESS code as your Custom CSS boilerplate.

@import url(https://fonts.googleapis.com/css?family=Lato);

html, body {
    background: #000;
}

.js-load-more {
    background: rgba(51, 102, 153, 0.8);
    border-radius: 4px 4px 0 0;
    bottom: 0;
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    left: ~"calc(50% - 68px)";
    position: absolute;
    text-transform: uppercase;
    transition: background 1s linear;
    &:hover {
        background: #0198cf;
    }
}

.tile {
    border: none;
    border-radius: 4px;
    &-content {
        margin: 0;
    }
    &-image-wrapper {
        margin-bottom: -60px;
        &:after {
            background: rgba(255, 255, 255, 0.2);
            bottom: 0;
            content: '';
            left: 0;
            position: absolute;
            right: 0;
            top: 0;
            transition: background 0.3s linear;
        }
        &:hover {
            &:after {
                background: rgba(255, 255, 255, 0);
            }
        }
    }
    &-image {
        border-radius: 4px 4px 0 0;
    }
    &-avatar-wrapper {
        top: 14px;
        position: relative;
    }
    &-belt {
        background-color: #eee;
        padding: 15px;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 1);
    }
    &-tags {
        padding: 0 15px;
    }
    &-caption {
        font-family: 'Raleway', sans-serif;
        font-size: 18px !important;
        line-height: 1.5;
        padding: 0 15px;
    }
    &-twitter-intent {
        padding-bottom: 15px;
    }
}

Helpful Resource

You can download a layered PSD to demonstrate our widget .

here
here
LESS CSS pre-processor
Overview
Use the CSS Code Editor
Layout Structure
Tile Structure
Sample
Helpful Resource