diff options
author | nodiscc <nodiscc@gmail.com> | 2014-12-25 01:15:14 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2014-12-25 01:15:14 +0100 |
commit | 169512f0b8eaf5cc467ab9b4142011e60811bc67 (patch) | |
tree | 835b6e37121a3285d84fd294d7b4d97ff77ff028 /tpl | |
parent | 60b83e7cf763be3a68529f1d945710edaeb87967 (diff) | |
parent | cae64e52e47811a3fbef534f296b8952680d0d8f (diff) | |
download | Shaarli-169512f0b8eaf5cc467ab9b4142011e60811bc67.tar.gz Shaarli-169512f0b8eaf5cc467ab9b4142011e60811bc67.tar.zst Shaarli-169512f0b8eaf5cc467ab9b4142011e60811bc67.zip |
Merge pull request #83 from pikzen/loop-factor
Refactored the daily column generation (only one loop)
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/daily.html | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/tpl/daily.html b/tpl/daily.html index c15a7062..b92425b5 100644 --- a/tpl/daily.html +++ b/tpl/daily.html | |||
@@ -7,7 +7,7 @@ | |||
7 | <div class="dailyAbout"> | 7 | <div class="dailyAbout"> |
8 | All links of one day<br>in a single page.<br> | 8 | All links of one day<br>in a single page.<br> |
9 | {if="$previousday"} <a href="?do=daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if} | 9 | {if="$previousday"} <a href="?do=daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if} |
10 | - | 10 | - |
11 | {if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if} | 11 | {if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if} |
12 | <br><br> | 12 | <br><br> |
13 | <a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#">Daily RSS Feed</a> | 13 | <a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#">Daily RSS Feed</a> |
@@ -15,43 +15,38 @@ | |||
15 | <div class="dailyTitle"><img src="../images/floral_left.png" width="51" height="50" class="nomobile"> The Daily Shaarli <img src="../images/floral_right.png" width="51" height="50" class="nomobile"></div> | 15 | <div class="dailyTitle"><img src="../images/floral_left.png" width="51" height="50" class="nomobile"> The Daily Shaarli <img src="../images/floral_right.png" width="51" height="50" class="nomobile"></div> |
16 | <div class="dailyDate"><span class="nomobile">———————————</span> {$day} <span class="nomobile">———————————</span></div> | 16 | <div class="dailyDate"><span class="nomobile">———————————</span> {$day} <span class="nomobile">———————————</span></div> |
17 | <div class="clear"></div> | 17 | <div class="clear"></div> |
18 | |||
19 | {if="$linksToDisplay"} | ||
20 | <div id="daily_col1"> | ||
21 | {loop="col1"} | ||
22 | <div class="dailyEntry"> | ||
23 | <div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div> | ||
24 | {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} | ||
25 | <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> | ||
26 | {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} | ||
27 | <div class="dailyEntryDescription">{$value.formatedDescription}</div> | ||
28 | </div> | ||
29 | {/loop} | ||
30 | </div> | ||
31 | 18 | ||
32 | <div id="daily_col2"> | 19 | {if="$linksToDisplay"} |
33 | {loop="col2"} | 20 | {loop="cols"} |
34 | <div class="dailyEntry"> | 21 | {if="isset($value[0])"} |
35 | <div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div> | 22 | <div id="daily_col{$counter+1}"> |
36 | {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} | 23 | {loop="value"} |
37 | <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> | 24 | {$link=$value} |
38 | {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} | 25 | <div class="dailyEntry"> |
39 | <div class="dailyEntryDescription">{$value.formatedDescription}</div> | 26 | <div class="dailyEntryPermalink"> |
40 | </div> | 27 | <a href="?{$link.linkdate|smallHash}"> |
41 | {/loop} | 28 | <img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"> |
42 | </div> | 29 | </a> |
43 | 30 | </div> | |
44 | <div id="daily_col3"> | 31 | {if="$link.tags"} |
45 | {loop="col3"} | 32 | <div class="dailyEntryTags"> |
46 | <div class="dailyEntry"> | 33 | {loop="link.taglist"} |
47 | <div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div> | 34 | {$value|htmlspecialchars} - |
48 | {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} | 35 | {/loop} |
49 | <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> | 36 | </div> |
50 | {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} | 37 | {/if} |
51 | <div class="dailyEntryDescription">{$value.formatedDescription}</div> | 38 | <div class="dailyEntryTitle"> |
52 | </div> | 39 | <a href="{$link.url}">{$link.title|htmlspecialchars}</a> |
40 | </div> | ||
41 | {if="$link.thumbnail"} | ||
42 | <div class="dailyEntryThumbnail">{$link.thumbnail}</div> | ||
43 | {/if} | ||
44 | <div class="dailyEntryDescription">{$link.formatedDescription}</div> | ||
45 | </div> | ||
46 | {/loop} | ||
47 | </div> | ||
48 | {/if} | ||
53 | {/loop} | 49 | {/loop} |
54 | </div> | ||
55 | {else} | 50 | {else} |
56 | <div class="dailyNoEntry">No articles on this day.</div> | 51 | <div class="dailyNoEntry">No articles on this day.</div> |
57 | {/if} | 52 | {/if} |