Giter VIP home page Giter VIP logo

djangocms-background-media's Introduction

image

image

image

image

djangocms-background-media

This is a simple django-cms plugin that provides responsive, full screen background media with text.

A HTML div container is added to the page that can either have a background image or video. Video backgrounds are enabled by making use of the Vide jQuery plugin. Child plugins are enabled, so text and/or hyperlinks etc can be placed on top of the background media, see usage below for more details.

To view a simple demonstration of a video background or image background that can be achieved with this plugin, view my demo.

Installation

To install:

pip install djangocms-background-media

Then add djangocms-background-media to your installed apps:

INSTALLED_APPS = [
    ...
    'djangocms_background_media',
    ...
]

If you're not already using django-filer and easy-thumbnails then these too will need to be added to your installed apps:

INSTALLED_APPS = [
    ...
    'easy_thumbnails',
    'filer',
    ...
]

And run the migrations:

./manage.py migrate

The package assume that jQuery has been added to the site already. So if you're not using, please add to you templates/base.html:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

Usage

The background media plugin is added to a page and configured accordingly. If a background image is all that is required, then an image is uploaded, the container height can be updated, and optional overlay added and that's all. If a video background is required then a video is uploaded and a video poster should be provided, as this is what will be displayed for mobile browsers. You're also able to pass a JSON config object if you wish. More details of the video plugin can be viewed on Vide.

I have provided the ability to link an optional style sheet to the page, so that the plugin will work "out of the box", if you don't link the style sheet you will need to provide your own styling.

To add text, links or another plugin to the background media plugin, simply add the child plugins you desire.

djangocms-background-media's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.