Skip to content

Commit

Permalink
Merge pull request #140 from Lednerb/development
Browse files Browse the repository at this point in the history
Version 1.13.0
  • Loading branch information
Lednerb authored Oct 13, 2018
2 parents 1c6d3d4 + 765be90 commit c609cd3
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 6 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.13.0] - 2018-10-13
### Added
- Functionality to automatically resize and crop images.

### Fixed
- A bug where the `customImage` is not displayed on multi-language sites. #137
- Style for the gallery slider controls so they are visible on white backgrounds. #138


## [1.12.0] - 2018-10-08
### Fixed
- Bug #128 that prevent to build the site.
Expand Down Expand Up @@ -179,7 +188,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Some typos


[Unreleased]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.12.0...master
[Unreleased]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.13.0...development
[1.13.0]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.12.0...1.13.0
[1.12.0]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.11.1...1.12.0
[1.11.1]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.11.0...1.11.1
[1.11.0]: https://github.com/Lednerb/bilberry-hugo-theme/compare/1.10.0...1.11.0
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ If you like this theme and/or use it for commercial purposes, please support me!
- [Manual Summary Breaks](#manual-summary-breaks)
- [Disqus Comments](#disqus-comments)
- [Responsive Design](#responsive-design)
- [Automatic Image Resizing](#automatic-image-resizing)
- [Permanent Top Navigation](#permanent-top-navigation)
- [MathJAX Markup](#mathjax-markup)
- [External Images](#external-images)
Expand Down Expand Up @@ -174,6 +175,12 @@ You can manage and moderate the comments either on your website or at the disqus
### Responsive Design
Bilberry is optimized for desktop and mobile devices (tablets and smartphones).

### Automatic Image Resizing
The bilberry theme handles image crops and resizes automatically by default.
However, if you want to disable this functionality in general, you can set `resizeImages: false` in your `config.toml` file.

If you want to disable this functionality just on some posts, you can set `resizeImages: false` in your post's settings.

### Permanent Top Navigation
If you want to permanently display the top navigation with the algolia search bar and the `page` entries, you can set the `permanentTopNav` option to `true` in your site's config file.

Expand Down
1 change: 1 addition & 0 deletions assets/sass/_articles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ article {

&:before {
color: rgba(255, 255, 255, 0.9);
text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ disqusShortname = "bilberry-hugo-theme"
# set the width of your site's content
siteWidth = "800px"

# let hugo automatically resize and crop your images to the correct sizes
resizeImages = true

# Header configuration
# your subtitle if you want to use any
subtitle = "Hello World! This is the most epic subtitle ever."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ date: 2017-11-01T18:10:14+01:00
tags: ['Discord', 'Support', 'Sag Danke!']
author: "Lednerb"
noSummary: true

resizeImages: false
---
Hallo zusammen!

Expand Down
2 changes: 2 additions & 0 deletions exampleSite/content/article/support-and-discussions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ date: 2017-11-01T18:10:14+01:00
tags: ['Discord', 'Support', 'Say Thanks!']
author: "Lednerb"
noSummary: true

resizeImages: false
---
Hey there!

Expand Down
11 changes: 8 additions & 3 deletions layouts/partials/content-type/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
</a>

<article class="gallery">

{{ if and (isset .Params "gallery") (ne .Params.gallery "") }}
<div class="flexslider">
<ul class="slides">
Expand All @@ -15,8 +14,14 @@
{{ else if ne .Params.imageSlider false }}
<div class="flexslider">
<ul class="slides">
{{ range .Resources.ByType "image" }}
<li><img src="{{ .RelPermalink }}" /></li>
{{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
{{ range .Resources.ByType "image" }}
<li><img src="{{ (.Fill "700x350 q95").RelPermalink }}" /></li>
{{ end }}
{{ else }}
{{ range .Resources.ByType "image" }}
<li><img src="{{ .RelPermalink }}" /></li>
{{ end }}
{{ end }}
</ul>
</div>
Expand Down
6 changes: 5 additions & 1 deletion layouts/partials/featured-image.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{{ if .Resources.GetMatch "featuredImage.*" }}
<div class="featured-image">
<a href="{{ .URL }}">
<img src="{{ (.Resources.GetMatch "featuredImage.*").RelPermalink }}" alt="">
{{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
<img src="{{ ((.Resources.GetMatch "featuredImage.*").Fill "700x350 q95").RelPermalink }}" alt="">
{{ else }}
<img src="{{ (.Resources.GetMatch "featuredImage.*").RelPermalink }}" alt="">
{{ end }}
</a>
</div>
{{ else if and (isset .Params "featuredimage") (ne .Params.featuredImage "") }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="logo">
<a href="{{ .Site.BaseURL | relLangURL }}" class="logo">
{{ if and (isset .Site.Params "customimage") (ne .Site.Params.customImage "") }}
<img src="{{ .Site.Params.customImage | relLangURL }}" alt="">
<img src="{{ .Site.Params.customImage | relURL }}" alt="">
{{ else }}
<img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatarEMail }}?d=mm&size=200" alt="">
{{ end }}
Expand Down

0 comments on commit c609cd3

Please sign in to comment.