Introduction

Get started with Vodi, Responsive Website Template for Movies & TV Shows, with Bootstrap and a template starter page.

Vodi is a Static HTML Template

For the time being, we do NOT offer any tutorials or any other materials on how to integrate Vodi with any CMS, Web Application framework (including Angular JS, Ruby on Rails and others) or any other similar technology. However, since Vodi is a static HTML/CSS and JS template, then it should be compatible with any backend technology.

Download package

Download package contains three main assets/, html/ and documentation/ folders. Once downloaded, unzip the compressed folder and you'll see something like this:

  • Vodi/
    • assets/
      • css/
      • img/
      • include/
      • js/
      • scss/
      • svg/
      • vendor/
    • html/
      • archive/
      • blog/
      • home/
      • other/
      • single-episodes/
      • single-movies/
      • single-tv-show/
      • single-video/
      • static/
    • documentation/..
    • favicon.ico
    • gulpfile.js
    • package.json
    • README.md

HTML

html/ is the source for HTML pages and contains HTML templates, which you see in the online demo. These HTML files can be opened easily in any browser, imported to any project or modified to suit your needs.

Assets

assets/.. includes all the assets that are referenced in the HTML pages. Below given folders are used in the template:

  • css - CSS files
  • img - Images
  • include - Other files like, .ajax, .html, and possibly .php
  • js - JavaSscript files
  • scss - Sass files
  • svg - SVG files
  • vendor - Third-party libraries

Precompiled versions of JavaScript and CSS files are generated with gulp dist in their respective dist/assets/js/ and dist/assets/css folders to support the self-contained 'static website'. Learn more about gulp dist.

Starter template

Be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Put it all together and your pages should look like this:

              
                <!DOCTYPE html>
                <html lang="en">
                <head>
                  <!-- Title -->
                  <title>Hello, world!</title>

                  <!-- Required Meta Tags Always Come First -->
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

                  <!-- Favicon -->
                  <link rel="shortcut icon" href="../../favicon.ico">

                  <!-- Font -->
                  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">

                  <!-- CSS Vodi Template -->
                  <link rel="stylesheet" href="../../assets/css/theme.css">
                </head>
                <body>
                  <h1>Hello, world!</h1>

                  <!-- JS Global Compulsory -->
                  <script src="../../assets/vendor/jquery/dist/jquery.min.js"></script>
                  <script src="../../assets/vendor/jquery-migrate/dist/jquery-migrate.min.js"></script>
                  <script src="../../assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

                  <!-- JS Vodi -->
                  <script src="../../assets/js/hs.core.js"></script>
                </body>
                </html>
              
            

JavaScript structure

Core JavaScript

The foundation of the JavaScript structure in Vodi is based on one main object which does not change the root when the new functionalities are added, but instead, it only extends without affecting the behavior of the core object. The name of the object is HSCore and the content of this object looks like this:

              
                /*
                * HSCore
                * @version: 2.0.0 (Mon, 25 Nov 2019)
                * @requires: jQuery v3.0 or later
                * @author: HtmlStream
                * @event-namespace: .HSCore
                * @license: Htmlstream Libraries (https://htmlstream.com/licenses)
                * Copyright 2020 Htmlstream
                */
                'use strict';

                $.extend({
                  HSCore: {
                    init: function () {
                      $(document).ready(function () {
                        // Botostrap Tootltips
                        $('[data-toggle="tooltip"]').tooltip();

                        // Bootstrap Popovers
                        $('[data-toggle="popover"]').popover();
                      });
                    },

                    components: {}
                  }
                });

                $.HSCore.init();
              
            

Essentials of HS data-attributes

HSCore Settings

data-hs-*-options - Using the date-attribute, you can completely specify the settings for all plug-in parameters (except for functions) that are in the official documentation. Special cases will be described in the documentation of the corresponding wrappers/plugins. *- name of the wrapper/plugin.

Parameter names must be enclosed in double quotation marks "". "param": ...

For strings, quotation marks are required. "stringParam": "Test string", "hexParam": "#ff0000"

For numbers, quotation marks are optional. "intParam": 10

For boolean values, quotation marks can lead to not obvious consequences (due to implicit type conversion). It is recommended that you specify Boolean values without quotation marks. "boolParam": true

For arrays and objects - quotation marks can lead to errors, this does not apply to elements of arrays and objects, which can be simple types (see the description for simple types above).


                "arrayParam": [1, "Test string", "#ff0000", false, 5],
                "objectParam": {
                  "intParam": 1,
                  "stringParam": "Test string",
                  "hexParam": "#ff0000",
                  "boolParam": false,
                  "intParam2": 5
                }
              

Advantages

  • Avoiding the probabilities of conflicts between Vodi codes and third party plugins (libraries).
  • Intuitive clear architecture.
  • Everything is structured, each component in its own file and in its component in the main object.
  • The ability of extending functionality without affecting the behavior of the core object and not changing the existing functionality.
  • Creation of wrapper components simply solves complicated initializations structures for the users.
  • Very easy access to any starters components and core settings from anywhere in the template.