All Projects → jekylltools → jekyll-ideal-image-slider

jekylltools / jekyll-ideal-image-slider

Licence: MIT License
Add image sliders to Jekyll with Ideal Image Slider. Ruby plugin version. (This repository is archived. Issues are disabled. Pull requests will be ignored.)

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to jekyll-ideal-image-slider

jekyll-ideal-image-slider-include
Add image sliders to Jekyll with Ideal Image Slider. HTML include version. Github Pages compatible. (This repository is archived. Issues are disabled. Pull requests will be ignored.)
Stars: ✭ 27 (+58.82%)
Mutual labels:  jekyll, slider, image-slider, jekyll-blog
Jekyll Embed Video
Embed videos in Jekyll webpages without a plugin (Youtube, Vimeo, Twitch, Streamable, Mixer, Google Drive clips + more)
Stars: ✭ 135 (+694.12%)
Mutual labels:  jekyll, jekyll-plugin, jekyll-blog
Jekyll Theme Massively
Preview
Stars: ✭ 187 (+1000%)
Mutual labels:  jekyll, jekyll-blog
White Paper
Simple, elegant and clean jekyll theme.
Stars: ✭ 195 (+1047.06%)
Mutual labels:  jekyll, jekyll-blog
Jekyll Minifier
Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
Stars: ✭ 215 (+1164.71%)
Mutual labels:  jekyll, jekyll-plugin
jekyll-clean-dark
Dark clean theme for jekyll
Stars: ✭ 198 (+1064.71%)
Mutual labels:  jekyll, jekyll-blog
Paper Jekyll Theme
A minimal Jekyll theme for personal blogs
Stars: ✭ 172 (+911.76%)
Mutual labels:  jekyll, jekyll-blog
Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (+16888.24%)
Mutual labels:  jekyll, jekyll-blog
Hacker Blog
Hacker-Blog is a minimalistic, responsive jekyll theme built for hackers. https://ashishchaudhary.in/hacker-blog
Stars: ✭ 156 (+817.65%)
Mutual labels:  jekyll, jekyll-blog
Millennial
A minimalist Jekyll theme for running an online publication
Stars: ✭ 223 (+1211.76%)
Mutual labels:  jekyll, jekyll-blog
Jekyll Gist
📃 Liquid tag for displaying GitHub Gists in Jekyll sites.
Stars: ✭ 218 (+1182.35%)
Mutual labels:  jekyll, jekyll-plugin
Polyglot
🔤 Multilingual and i18n support tool for Jekyll Blogs
Stars: ✭ 242 (+1323.53%)
Mutual labels:  jekyll, jekyll-blog
Wu Kan.github.io
✨ my homepage & template for jekyll-theme-WuK
Stars: ✭ 171 (+905.88%)
Mutual labels:  jekyll, jekyll-blog
Jekyll Analytics
Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.
Stars: ✭ 166 (+876.47%)
Mutual labels:  jekyll, jekyll-plugin
Github Metadata
Jekyll plugin to propagate the `site.github` namespace and set default values for use with GitHub Pages.
Stars: ✭ 184 (+982.35%)
Mutual labels:  jekyll, jekyll-plugin
Adam Blog
Adam Blog is a minimal clear theme for Jekyll
Stars: ✭ 167 (+882.35%)
Mutual labels:  jekyll, jekyll-blog
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+1052.94%)
Mutual labels:  jekyll, jekyll-plugin
jekyll-imgix
A plugin for integrating imgix into Jekyll sites
Stars: ✭ 49 (+188.24%)
Mutual labels:  jekyll, jekyll-plugin
Jekyll Theme Memoirs
Memoirs is a free minimalist Jekyll theme for those who love the beauty of simplicity.
Stars: ✭ 151 (+788.24%)
Mutual labels:  jekyll, jekyll-blog
Tmaize Blog
一款jekyll主题,简洁纯净,支持自适应,支持夜间模式
Stars: ✭ 152 (+794.12%)
Mutual labels:  jekyll, jekyll-blog

Jekyll Ideal Image Slider

Liquid tag plugin to add image sliders to Jekyll with Ideal Image Slider. This plugin is not compatible with Github Pages. Instead use Jekyll Ideal Image Slider Include for Github Pages compatibility and more configuration options.

Installation

  1. Add _plugins/ideal_image_slider.rb to your _plugins folder.

  2. Add this line to your _config.yml file: iis_slider_array: []

  3. Add Ideal Image Slider to your site, either manually or using Bower.

  4. See below for integration suggestions.

Syntax

{% slider height [bullets] [captions] %}
{% endslider %}

Usage

Surround a series of Markdown images with the following tag:

{% slider %}
  ![alt text 1](image1.jpg)
  ![alt text 2](image2.jpg)
  ![alt text 3](image3.jpg)
{% endslider %}

The plugin will render the following html for you:

<div id="slider">
  <img src="image1.jpg" alt="alt text 1">
  <img src="image2.jpg" alt="alt text 2">
  <img src="image3.jpg" alt="alt text 3">
</div>

You can add links to the images like this:

{% slider %}
  [![alt text 1](image1.jpg)](/page/url)
  [![alt text 2](image2.jpg)](/category/url)
  [![alt text 3](image3.jpg)](http://example.com)
{% endslider %}

And the plugin will add a clickable link to each image in the slider:

<div id="slider">
  <a href="https://github.com/page/url"><img src="image1.jpg" alt="alt text 1"></a>
  <a href="https://github.com/category/url"><img src="image2.jpg" alt="alt text 2"></a>
  <a href="http://example.com"><img src="image3.jpg" alt="alt text 3"></a>
</div>

You can define the height of a slider by placing a number or an aspect ratio after slider. If you don't specify height, the slider will default to auto.

{% slider 700 %}
{% slider 4:3 %}
{% slider auto %}

If you add bullets after the height variable, it will enable bullet navigation for the slider:

{% slider bullets %}
{% slider 420 bullets %}

If you add captions after the height variable, it will enable captions for the slider. The alt text of an image will be used as a caption for that image:

{% slider captions %}
{% slider 480 captions %}
{% slider captions %}
  ![this is the alt text](image1.jpg)
  ![it will be used as a caption](image2.jpg)
  ![for the image](image3.jpg)
{% endslider %}

Integration suggestions

Add the CSS to your theme head:

<!-- Slider CSS -->
<link rel="stylesheet" href="{{ "/path/to/ideal-image-slider.css" | relative_url }}">
<link rel="stylesheet" href="{{ "/path/to/themes/default.css" | relative_url }}">

Add the Javascript to your page template just before the </body> tag:

<!-- Slider -->
<script src="{{ "/path/to/ideal-image-slider.min.js" | relative_url }}"></script>
<script src="{{ "/path/to/iis-bullet-nav.js" | relative_url }}"></script>
<script src="{{ "/path/to/iis-captions.js" | relative_url }}"></script>
<!-- Sliders on pages -->
{% for script in page.iis_slider_scripts %}
  {{ script }}
{% endfor %}
<!-- Sliders on indexes -->
{% for post in paginator.posts %}
  {% for script in post.iis_slider_scripts %}
    {{ script }}
  {% endfor %}
{% endfor %}

Be sure to change the paths to the correct location of the Javascript and CSS files in your site.

You can selectively include these files. The plugin sets iis_slider_active to true for each page or post with a slider. Using the code below, CSS and Javascript will be loaded only for those pages with sliders.

{% if page.iis_slider_active %}
  <!-- Slider CSS -->
  <link rel="stylesheet" href="{{ "/path/to/ideal-image-slider.css" | relative_url }}">
  <link rel="stylesheet" href="{{ "/path/to/themes/default.css" | relative_url }}">
{% endif %}
{% if page.iis_slider_active %}
  <!-- Slider -->
  <script src="{{ "/path/to/ideal-image-slider.min.js" | relative_url }}"></script>
  <script src="{{ "/path/to/iis-bullet-nav.js" | relative_url }}"></script>
  <script src="{{ "/path/to/iis-captions.js" | relative_url }}"></script>
  <!-- Sliders on pages -->
  {% for script in page.iis_slider_scripts %}
    {{ script }}
  {% endfor %}
  <!-- Sliders on indexes -->
  {% for post in paginator.posts %}
    {% for script in post.iis_slider_scripts %}
      {{ script }}
    {% endfor %}
  {% endfor %}
{% endif %}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].