Skip to content

FullBoreStudios/django-frontend-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

django-frontend-snippets

Helpful snippets of code for doing things with Django and Front End Design

Bootstrap Carousel

Bootstrap Carousels can be tricky to implement, so here is an example with a few cool things added you can take and leave as you desire. For one, if you want to use the indicators (little lines at the bottom of the slide) you need to loop over those, and they expect you to provide a data-slide-to="0" element, sequentially numbered starting with 0 (thanks javascript).

You also need to check if its the first item in the forloop and mark it with an active class. Only one item can start with the active class and only one item can have it at a time. Once the page is loaded the bootstrap javascript will take over assigning the active class. The core concept here is the forloop.

We also wanted to check if there is a link if it was going outside the site to open it in a new window, this of course is set up to use the models we have but if you can take anything from it, enjoy!

About

Helpful snippets of code for doing things with Django and Front End Design

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy