Skip to content

Commit

Permalink
Fixes daily and linklist thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
kalvn committed Nov 4, 2018
1 parent 43b8336 commit 4ccb134
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Thumbnail update page
- Keyboard shortcut "S" displays search overlay

### Fixed
- Thumbnails on link list and daily pages
- Daily previous link not disabled properly when on oldest day

## [v0.9.5](https://github.com/kalvn/Shaarli-Material/releases/tag/v0.9.5) - 2018-02-08
### Changed
- Optimizes bookmarklet popup size and enables scrollbars
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Shaarli Material is a theme for [Shaarli](https://github.com/shaarli/Shaarli), t
[More screenshots](https://github.com/kalvn/Shaarli-Material/tree/master/screenshots).


## Compatibility
Shaarli Material follows the exact same versions numbers than Shaarli. It means that if you install Shaarli vX.Y.Z, you should use Shaarli Material vX.Y.Z.

Shaarli Material was tested and validated with **Shaarli 0.10.2**.


## Download
To download this theme, [visit this page](https://github.com/kalvn/Shaarli-Material/releases) and choose the most recent version matching the version of your Shaarli installation. Both use the same notation.

Expand All @@ -16,10 +22,6 @@ Versions suffixed by `-patch.x` include some bugfix so take those preferentially
If you install an older version, please read the README.md file you'll find in the root folder rather than this one.


## Compatibility
Shaarli Material was tested and validated on *Shaarli 0.9.5*.


## Installation
### Your Shaarli is up to date
Download the `material` folder into the `tpl` directory of your Shaarli installation next to the `default` folder.
Expand Down
4 changes: 2 additions & 2 deletions material/build/scripts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/build/styles.min.css

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions material/daily.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ <h1>{'The Daily Shaarli'|t}</h1>
<div class="container">
<div class="row">
<div class="col-xs-6">
{if="$previousday"}
<a href="?do=daily&amp;day={$previousday}" class="button">
<a {if="$previousday"}href="?do=daily&amp;day={$previousday}"{else}href="#"{/if} class="button" {if="!$previousday"}disabled{/if}>
<i class="mdi mdi-arrow-left"></i> {'Previous day'|t}
</a>
{else}
<i class="mdi mdi-arrow-left"></i> {'Previous day'|t}
{/if}
</div>
<div class="col-xs-6">
<a {if="$nextday"}href="?do=daily&amp;day={$nextday}"{else}href="#"{/if} class="button" {if="!$nextday"}disabled{/if}>
Expand Down Expand Up @@ -54,10 +50,10 @@ <h2 class="daily-title">{function="format_date($dayDate, false)"}</h2>
</a>

{if="$thumbnails_enabled && !empty($link.thumbnail)"}
<div class="daily-item-image">
<img data-src="{$link.thumbnail}#" class="b-lazy"
<div class="daily-item-image" style="background-image: url({$link.thumbnail})">
<!-- <img data-src="{$link.thumbnail}#" class="b-lazy"
src="#"
alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" />
alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" /> -->
</div>
{/if}

Expand Down
2 changes: 1 addition & 1 deletion material/linklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

<div>
{if="$thumbnails_enabled && !empty($value.thumbnail)"}
<div class="thumb" style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;">
<div class="thumb">
<a href="{$value.real_url}">
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
<img data-src="{$value.thumbnail}#" class="b-lazy"
Expand Down
3 changes: 2 additions & 1 deletion material/scss/components/_page-daily.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@
}

.daily-item-image{
widows: 100%;
width: 100%;
height: 100px;
background-size: cover;
background-position: center;
}

.daily-item-body{
Expand Down
1 change: 0 additions & 1 deletion material/scss/components/_structure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ a.link-title{
margin-bottom: 0;
}
.thumb img{
float: right;
margin: 15px;
}
.link-tag-list{
Expand Down
5 changes: 2 additions & 3 deletions material/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,7 @@
data: 'id=' + thumbnailsIdList[i],
success: function(response){
i++;
console.log('Response received: ' + JSON.stringify(response));
$thumbnailTitle.html(response.title);
$thumbnailTitle.text(response.title);
if (response.thumbnail) {
$thumbnailPlaceholder.html('<img title="Current thumbnail" src="' + response.thumbnail + '"/>');
} else {
Expand All @@ -584,7 +583,7 @@
if (i < total) {
updateThumbnail(thumbnailsIdList[i]);
} else {
$thumbnailTitle.html('Thumbnail update done!');
$thumbnailTitle.text('Thumbnail update done!');
}
},
error: function(xhr){
Expand Down

0 comments on commit 4ccb134

Please sign in to comment.