Template upgrade to handle plugin zones
Add a bunch of plugin placeholders in templates
This commit is contained in:
parent
0aec972a8b
commit
567967fdf9
17 changed files with 147 additions and 1307 deletions
14
COPYING
14
COPYING
|
@ -1,4 +1,4 @@
|
|||
Files: *
|
||||
Files: *
|
||||
License: zlib/libpng
|
||||
Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
|
||||
(c) 2011-2015 Alexandre Alapetite <alexandre@alapetite.fr>
|
||||
|
@ -31,9 +31,9 @@ Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
|
|||
|
||||
Files: inc/reset.css
|
||||
License: BSD (http://opensource.org/licenses/BSD-3-Clause)
|
||||
Copyright: (c) 2010, Yahoo! Inc.
|
||||
Copyright: (c) 2010, Yahoo! Inc.
|
||||
|
||||
Files: images/calendar.png, images/edit_icon.png, images/feed-icon-14x14.png, images/private.png, images/private_16x16.png, images/private_16x16_active.png, images/qrcode.png, images/tag_blue.png
|
||||
Files: images/calendar.png, images/edit_icon.png, images/feed-icon-14x14.png, images/private.png, images/private_16x16.png, images/private_16x16_active.png, images/tag_blue.png
|
||||
License: CC-BY (http://creativecommons.org/licenses/by/3.0/)
|
||||
Copyright: (c) 2014 Yusuke Kamiyamane
|
||||
Source: http://p.yusukekamiyamane.com/
|
||||
|
@ -59,10 +59,6 @@ Files: inc/blazy*.js
|
|||
License: MIT License (http://opensource.org/licenses/MIT)
|
||||
Copyright: (C) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
|
||||
|
||||
Files: inc/qr.js
|
||||
License: GPLv3 License (http://opensource.org/licenses/gpl-3.0)
|
||||
Copyright: (C) 2014 Alasdair Mercer, http://neocotic.com, https://github.com/neocotic/qr.js
|
||||
|
||||
Files: inc/rain.tpl.class.php
|
||||
Copyright: 2011-2012, Federico Ulfo <rainelemental@gmail.com>
|
||||
2011-2012, The Rain Team <hello@raintm.com>
|
||||
|
@ -80,10 +76,10 @@ In no event will the authors be held liable for any damages arising from
|
|||
the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would
|
||||
be appreciated but is not required.
|
||||
|
|
|
@ -99,7 +99,7 @@ public function load($authorizedPlugins)
|
|||
* @param string $hook name of the hook to trigger.
|
||||
* @param array $data list of data to manipulate passed by reference.
|
||||
* @param array $params additional parameters such as page target.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function executeHooks($hook, &$data, $params = array())
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 321 B |
1215
inc/qr-1.1.3.js
1215
inc/qr-1.1.3.js
File diff suppressed because it is too large
Load diff
BIN
inc/qr-1.1.3.min.js
vendored
BIN
inc/qr-1.1.3.min.js
vendored
Binary file not shown.
|
@ -405,12 +405,12 @@ h1 {
|
|||
}
|
||||
*/
|
||||
|
||||
.linkdate, .linkarchive {
|
||||
.linkdate {
|
||||
font-size:8pt;
|
||||
color:#888;
|
||||
}
|
||||
|
||||
.linkdate a, .linkarchive a {
|
||||
.linkdate a {
|
||||
color:#E28E3F;
|
||||
}
|
||||
|
||||
|
@ -451,12 +451,12 @@ a.qrcode img {
|
|||
color: #F57900;
|
||||
}
|
||||
|
||||
.linkdate, .linkarchive {
|
||||
.linkdate {
|
||||
font-size: 8pt;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.linkdate a, .linkarchive a {
|
||||
.linkdate a {
|
||||
background-image: url('../images/calendar.png');
|
||||
padding: 2px 0 3px 20px;
|
||||
background-repeat: no-repeat;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<input type="checkbox" name="updateCheck" id="updateCheck" {if="!empty($GLOBALS['config']['ENABLE_UPDATECHECK'])"}checked{/if}/>
|
||||
<label for="updateCheck"> Notify me when a new release is ready</label></td>
|
||||
</tr>
|
||||
|
||||
<tr><td></td><td class="right"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -2,18 +2,43 @@
|
|||
<html>
|
||||
<head>{include="includes"}</head>
|
||||
<body>
|
||||
<div id="pageheader">{include="page.header"}</div>
|
||||
<div id="pageheader">
|
||||
{include="page.header"}
|
||||
</div>
|
||||
<div class="daily">
|
||||
<div class="dailyAbout">
|
||||
All links of one day<br>in a single page.<br>
|
||||
{if="$previousday"} <a href="?do=daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if}
|
||||
-
|
||||
{if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if}
|
||||
<br><br>
|
||||
<a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#" alt="rss_feed">Daily RSS Feed</a>
|
||||
<div id="plugin_zone_start_picwall" class="plugin_zone">
|
||||
{loop="$plugin_start_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="dailyTitle"><img src="../images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left"> The Daily Shaarli <img src="../images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right"></div>
|
||||
<div class="dailyDate"><span class="nomobile">———————————</span> {function="strftime('%A %d, %B %Y', $day)"} <span class="nomobile">———————————</span></div>
|
||||
|
||||
<div class="dailyAbout">
|
||||
All links of one day<br>in a single page.<br>
|
||||
{if="$previousday"} <a href="?do=daily&day={$previousday}"><b><</b>Previous day</a>{else}<b><</b>Previous day{/if}
|
||||
-
|
||||
{if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>></b></a>{else}Next day<b>></b>{/if}
|
||||
<br>
|
||||
|
||||
{loop="$daily_about_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
|
||||
<br>
|
||||
<a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#" alt="rss_feed">Daily RSS Feed</a>
|
||||
</div>
|
||||
|
||||
<div class="dailyTitle">
|
||||
<img src="../images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left">
|
||||
The Daily Shaarli
|
||||
<img src="../images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right">
|
||||
</div>
|
||||
|
||||
<div class="dailyDate">
|
||||
<span class="nomobile">———————————</span>
|
||||
{function="strftime('%A %d, %B %Y', $day)"}
|
||||
<span class="nomobile">———————————</span>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
{if="$linksToDisplay"}
|
||||
|
@ -47,6 +72,12 @@
|
|||
<div class="dailyEntryThumbnail">{$link.thumbnail}</div>
|
||||
{/if}
|
||||
<div class="dailyEntryDescription">{$link.formatedDescription}</div>
|
||||
|
||||
<div class="dailyEntryFooter">
|
||||
{loop="$link.link_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
@ -55,6 +86,14 @@
|
|||
{else}
|
||||
<div class="dailyNoEntry">No articles on this day.</div>
|
||||
{/if}
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div id="plugin_zone_end_picwall" class="plugin_zone">
|
||||
{loop="$plugin_end_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
<div id="closing"><img src="../images/squiggle_closing.png" width="66" height="61" alt="-"></div>
|
||||
</div>
|
||||
{include="page.footer"}
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
<label for="lf_tags"><i>Tags</i></label><br>
|
||||
<input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input"
|
||||
data-list="{loop="$tags"}{$key}, {/loop}" data-multiple autocomplete="off" ><br>
|
||||
|
||||
{loop="$edit_link_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
|
||||
{if="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}
|
||||
<input type="checkbox" checked="checked" name="lf_private" id="lf_private">
|
||||
<label for="lf_private"><i>Private</i></label><br>
|
||||
|
|
|
@ -8,3 +8,6 @@
|
|||
<link type="text/css" rel="stylesheet" href="../inc/reset.css" />
|
||||
<link type="text/css" rel="stylesheet" href="../inc/shaarli.css" />
|
||||
{if="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="../inc/user.css" />{/if}
|
||||
{loop="$plugins_includes.css_files"}
|
||||
<link type="text/css" rel="stylesheet" href="{$value}#"/>
|
||||
{/loop}
|
|
@ -17,6 +17,9 @@
|
|||
</datalist>
|
||||
<input type="submit" value="Search" class="bigbutton">
|
||||
</form>
|
||||
{loop="$plugins_header.fields_toolbar"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -24,6 +27,12 @@
|
|||
|
||||
{include="linklist.paging"}
|
||||
|
||||
<div id="plugin_zone_start_linklist" class="plugin_zone">
|
||||
{loop="$plugin_start_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
{if="count($links)==0"}
|
||||
<div id="searchcriteria">Nothing found.</i></div>
|
||||
{else}
|
||||
|
@ -40,7 +49,7 @@
|
|||
<ul>
|
||||
{loop="links"}
|
||||
<li{if="$value.class"} class="{$value.class}"{/if}>
|
||||
<a id="{$value.linkdate|smallHash}"></a>
|
||||
<a id="{$value.shorturl}"></a>
|
||||
<div class="thumbnail">{$value.url|thumbnail}</div>
|
||||
<div class="linkcontainer">
|
||||
{if="isLoggedIn()"}
|
||||
|
@ -56,89 +65,38 @@
|
|||
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
|
||||
<span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{function="strftime('%c', $value.timestamp)"} - permalink</a> - </span>
|
||||
{else}
|
||||
<span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
|
||||
<span class="linkdate" title="Short link here"><a href="?{$value.shorturl}">permalink</a> - </span>
|
||||
{/if}
|
||||
{if="$GLOBALS['config']['ARCHIVE_ORG']"}
|
||||
<span class="linkarchive"><a href="https://web.archive.org/web/{$value.url}">archive</a> - </span>
|
||||
{/if}
|
||||
<div class="linkqrcode"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}"
|
||||
onclick="return showQrCode(this);" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}">
|
||||
<img src="images/qrcode.png#" alt="QR-Code" title="{function="strftime('%c', $value.timestamp)"}"></a></div> -
|
||||
|
||||
{loop="$value.link_plugin"}
|
||||
<span>{$value}</span> -
|
||||
{/loop}
|
||||
|
||||
<a href="{$value.url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
|
||||
{if="$value.tags"}
|
||||
<div class="linktaglist">
|
||||
{loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value}</a></span> {/loop}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
<div id="plugin_zone_end_linklist" class="plugin_zone">
|
||||
{loop="$plugin_end_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
{include="linklist.paging"}
|
||||
|
||||
</div>
|
||||
|
||||
{include="page.footer"}
|
||||
|
||||
<script>
|
||||
// Remove any displayed QR-Code
|
||||
function remove_qrcode()
|
||||
{
|
||||
var elem = document.getElementById("permalinkQrcode");
|
||||
if (elem) elem.parentNode.removeChild(elem);
|
||||
return false;
|
||||
}
|
||||
|
||||
function isCanvasSupported(){
|
||||
var elem = document.createElement('canvas');
|
||||
return !!(elem.getContext && elem.getContext('2d'));
|
||||
}
|
||||
|
||||
// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
|
||||
function showQrCode(caller,loading)
|
||||
{
|
||||
if( !isCanvasSupported() ) return true;
|
||||
|
||||
// Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked:
|
||||
if (typeof(qr)=='undefined') // Load qr.js only if not present.
|
||||
{
|
||||
loading = typeof loading !== 'undefined' ? loading : false;
|
||||
if (!loading) // If javascript lib is still loading, do not append script to body.
|
||||
{
|
||||
var element = document.createElement("script");
|
||||
element.src = "inc/qr-1.1.3.min.js";
|
||||
document.body.appendChild(element);
|
||||
}
|
||||
setTimeout(function() { showQrCode(caller,true);}, 200); // Retry in 200 milliseconds.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove previous qrcode if present.
|
||||
remove_qrcode();
|
||||
|
||||
// Build the div which contains the QR-Code:
|
||||
var element = document.createElement('div');
|
||||
element.id="permalinkQrcode";
|
||||
|
||||
// Make QR-Code div commit sepuku when clicked:
|
||||
element.addEventListener('click', remove_qrcode ); // Works on every canvas supported browser
|
||||
|
||||
// Build the QR-Code:
|
||||
var image = qr.image({size: 8,value: caller.getAttribute('data-permalink')});
|
||||
if (image)
|
||||
{
|
||||
element.appendChild(image);
|
||||
element.innerHTML+= "<br>Click to close";
|
||||
caller.parentNode.appendChild(element);
|
||||
}
|
||||
else
|
||||
{
|
||||
element.innerHTML="Your browser does not seem to be HTML5 compatible.";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<script src="inc/awesomplete.min.js#"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,8 +8,13 @@
|
|||
<img src="images/private_16x16.png#" width="16" height="16" title="Click to see only private links" alt="Click to see only private links">
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
{loop="$action_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
<div class="paging_linksperpage">
|
||||
Links per page: <a href="?linksperpage=20">20</a> <a href="?linksperpage=50">50</a> <a href="?linksperpage=100">100</a>
|
||||
<form method="GET" class="linksperpage"><input type="text" name="linksperpage" size="2"></form>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<div id="footer">
|
||||
<b><a href="https://github.com/shaarli/Shaarli">Shaarli</a></b> - The personal, minimalist, super-fast, no-database delicious clone by the <a href="https://github.com/shaarli/Shaarli">Shaarli</a> community - <a href="doc/Home.html">Help/documentation</a>
|
||||
{loop="$plugins_footer.text"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
{if="$newversion"}
|
||||
<div id="newversion"><span id="version_id">●</span> Shaarli {$newversion} is <a href="https://github.com/shaarli/Shaarli/releases">available</a>.</div>
|
||||
|
@ -7,3 +10,7 @@
|
|||
{if="isLoggedIn()"}
|
||||
<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
|
||||
{/if}
|
||||
|
||||
{loop="$plugins_footer.js_files"}
|
||||
<script src="{$value}#"></script>
|
||||
{/loop}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<a href="{$titleLink}">{$shaarlititle}</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
|
||||
{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"}
|
||||
{ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
|
||||
{else}
|
||||
|
@ -33,6 +33,9 @@
|
|||
<li><a href="?do=tagcloud">Tag cloud</a></li>
|
||||
<li><a href="?do=picwall{$searchcrits}">Picture wall</a></li>
|
||||
<li><a href="?do=daily">Daily</a></li>
|
||||
{loop="$plugins_header.buttons_toolbar"}
|
||||
{$value}
|
||||
{/loop}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -5,15 +5,34 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="pageheader">{include="page.header"}</div>
|
||||
|
||||
<div id="plugin_zone_start_picwall" class="plugin_zone">
|
||||
{loop="$plugin_start_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div class="center">
|
||||
<div id="picwall_container">
|
||||
{loop="linksToDisplay"}
|
||||
<div class="picwall_pictureframe">
|
||||
{$value.thumbnail}<a href="{$value.url}"><span class="info">{$value.title}</span></a>
|
||||
{loop="$value.picwall_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div id="plugin_zone_end_picwall" class="plugin_zone">
|
||||
{loop="$plugin_end_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
{include="page.footer"}
|
||||
|
||||
<script>
|
||||
|
|
|
@ -4,9 +4,25 @@
|
|||
<body>
|
||||
<div id="pageheader">{include="page.header"}</div>
|
||||
<div class="center">
|
||||
<div id="plugin_zone_start_tagcloud" class="plugin_zone">
|
||||
{loop="$plugin_start_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div id="cloudtag">
|
||||
{loop="tags"}
|
||||
<span class="count">{$value.count}</span><a href="?searchtags={$key|urlencode}" style="font-size:{$value.size}pt;">{$key}</a>
|
||||
<span class="count">{$value.count}</span>
|
||||
<a href="?searchtags={$key|urlencode}" style="font-size:{$value.size}pt;">{$key}</a>
|
||||
{loop="$value.tag_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div id="plugin_zone_end_tagcloud" class="plugin_zone">
|
||||
{loop="$plugin_end_zone"}
|
||||
{$value}
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="javascript:javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+'&title='%20+%20encodeURIComponent(title)+'&description='%20+%20encodeURIComponent(document.getSelection())+'&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');})();"><b>✚Shaare link</b></a> <a href="#" style="clear:none;"><span>⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> Then click "✚Shaare link" button in any page you want to share.</span></a><br><br>
|
||||
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="?private=1&post="><b>✚Add Note</b></a> <a href="#" style="clear:none;"><span>⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> Then click "✚Add Note" button anytime to start composing a (default private) Note (text post) to your Shaarli.</span></a><br><br>
|
||||
<a class="smallbutton" onclick="activateFirefoxSocial(this)"><b>✚Add to Firefox social</b></a> <a href="#" style="clear:none;"><span>⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.</span></a><br><br>
|
||||
{loop="$tools_plugin"}
|
||||
{$value}
|
||||
{/loop}
|
||||
<div class="clear"></div>
|
||||
|
||||
<script>
|
||||
|
|
Loading…
Reference in a new issue