Permalink
Browse files

Merge pull request #1687 from getnikola/islink

fix .islink
  • Loading branch information...
2 parents 8c2c32b + 05593dd commit 503bcf0b24554820980612caf056a3fb7ab8036c @Kwpolska Kwpolska committed May 5, 2015
View
@@ -33,6 +33,7 @@ Features
Bugfixes
--------
+* Make ``.islink`` work properly (via Issue #1536)
* RSS_LINKS_APPEND_QUERY not working in RSS feeds for tags
* `nikola check -l` didn’t scan posts
* Don’t use sets for ``FAVICONS`` (Issue #1674)
View
@@ -538,7 +538,7 @@ to your configuration::
That template needs to either be part of the theme, or be placed in a ``templates/``
folder inside your site.
-
+
enclosure
Add an enclosure to this post when it's used in RSS. See `more information about enclosures <http://en.wikipedia.org/wiki/RSS_enclosure>`__
@@ -1240,14 +1240,16 @@ Annotations require JQuery and are therefore not supported in the base theme.
You can check bootstrap theme's ``base.html`` for details on how to handle them in
custom themes.
-Image Galleries
----------------
+Images and Galleries
+--------------------
To create an image gallery, all you have to do is add a folder inside ``galleries``,
and put images there. Nikola will take care of creating thumbnails, index page, etc.
-If you click on images on a gallery, you should see a bigger image, thanks to
-the excellent `colorbox <http://www.jacklmoore.com/colorbox>`_
+If you click on images on a gallery, or on images with links in post, you will
+see a bigger image, thanks to the excellent `colorbox
+<http://www.jacklmoore.com/colorbox>`_. If don’t want this behavior, add an
+``.islink`` class to your image or link.
The gallery pages are generated using the ``gallery.tmpl`` template, and you can
customize it there (you could switch to another lightbox instead of colorbox, change
@@ -1267,20 +1269,24 @@ The ``conf.py`` options affecting images and gallery pages are these::
# "OUTPUT_PATH/relative_destination/gallery_name"
# Default is:
GALLERY_FOLDERS = {"galleries": "galleries"}
- # One or more folders containing images. The format is again a dictionary of
- # {"source": "relative_destination"}. Images will be scaled down if necessary so
- # that neither width nor height is greater than MAX_IMAGE_SIZE and copied to
- # destination folder. A thumbnail will also be created in the same folder with
- # ``.thumbnail`` inserted in the file name before the file extension
- # (e.g. ``tesla.thumbnail.jpg``).
- IMAGE_FOLDERS = {'images': 'images'}
- # More image/gallery options:
+ # More gallery options:
THUMBNAIL_SIZE = 180
- IMAGE_THUMBNAIL_SIZE = 400
MAX_IMAGE_SIZE = 1280
USE_FILENAME_AS_TITLE = True
EXTRA_IMAGE_EXTENSIONS = []
+ # If set to False, it will sort by filename instead. Defaults to True
+ GALLERY_SORT_BY_DATE = True
+
+ # Folders containing images to be used in normal posts or pages. Images will be
+ # scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE options, but
+ # will have to be referenced manually to be visible on the site
+ # (the thumbnail has ``.thumbnail`` added before the file extension).
+ # The format is a dictionary of {source: relative destination}.
+
+ IMAGE_FOLDERS = {'images': 'images'}
+ IMAGE_THUMBNAIL_SIZE = 400
+
If you add a file in ``galleries/gallery_name/index.txt`` its contents will be
converted to HTML and inserted above the images in the gallery page. The
format is the same as for posts.
@@ -1647,7 +1653,7 @@ and it will produce:
Post List
~~~~~~~~~
-.. WARNING::
+.. WARNING::
Any post or page that uses this directive will **never** be considered up-to-date,
meaning that every time you build the site, that post/page and everything that
View
@@ -430,12 +430,12 @@ REDIRECTIONS = ${REDIRECTIONS}
# If set to False, it will sort by filename instead. Defaults to True
# GALLERY_SORT_BY_DATE = True
#
-# Folders containing images to be used in normal posts or
-# pages. Images will be scaled down according to IMAGE_THUMBNAIL_SIZE
-# and MAX_IMAGE_SIZE options, but will have to be referenced manually
-# to be visible on the site. The format is a dictionary of {source:
-# relative destination}.
-#
+# Folders containing images to be used in normal posts or pages. Images will be
+# scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE options, but
+# will have to be referenced manually to be visible on the site
+# (the thumbnail has ``.thumbnail`` added before the file extension).
+# The format is a dictionary of {source: relative destination}.
+
IMAGE_FOLDERS = {'images': 'images'}
# IMAGE_THUMBNAIL_SIZE = 400
@@ -74,7 +74,7 @@
{{ template_hooks['page_footer']() }}
</div>
{{ base.late_load_js() }}
- <script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
+ <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("{{ momentjs_locales[lang] }}");
@@ -74,7 +74,7 @@ ${template_hooks['extra_head']()}
${template_hooks['page_footer']()}
</div>
${base.late_load_js()}
- <script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
+ <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("${momentjs_locales[lang]}");
@@ -75,7 +75,7 @@
</div>
{{ base.late_load_js() }}
- <script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
+ <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("{{ momentjs_locales[lang] }}");
@@ -75,7 +75,7 @@ ${template_hooks['extra_head']()}
</div>
${base.late_load_js()}
- <script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
+ <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("${momentjs_locales[lang]}");

0 comments on commit 503bcf0

Please sign in to comment.