]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Version 0.0.36 beta:
authorSeb Sauvage <sebsauvage@sebsauvage.net>
Wed, 25 Jan 2012 21:26:36 +0000 (22:26 +0100)
committerEmilien Klein <emilien@klein.st>
Wed, 25 Jan 2012 21:26:36 +0000 (22:26 +0100)
- Corrected: Improper text color in install form.
- Corrected: Error in QRCode url (missing '?')
- Changed: Display adjustments in “Daily” page.
- Added: Shaarli licence in COPYING

COPYING [new file with mode: 0644]
images/squiggle2.png [new file with mode: 0644]
inc/shaarli.css
index.php
tpl/daily.html
tpl/linklist.html

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d9731d2
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
+Shaarli is distributed under the zlib/libpng License:
+
+Copyright (c) 2011 Sébastien SAUVAGE (sebsauvage.net)
+
+This software is provided 'as-is', without any express or implied warranty.
+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 
+freely, subject to the following restrictions:
+
+  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.
+
+  2. Altered source versions must be plainly marked as such, and must
+     not be misrepresented as being the original software.
+
+  3. This notice may not be removed or altered from any source distribution.
diff --git a/images/squiggle2.png b/images/squiggle2.png
new file mode 100644 (file)
index 0000000..23409ce
Binary files /dev/null and b/images/squiggle2.png differ
index b4c418227a064a64a3777483d6f1e3970ef88774..a949666e3ffe67afd9098c69f52268e08c45d62f 100644 (file)
@@ -248,7 +248,7 @@ font-size:9pt;
 #newversion { background-color: #FFFFA0; color:#000; position:absolute; top:0;right:0; padding:2 7 2 7;  font-size:9pt;}
 #cloudtag  { padding-left:10%; padding-right:10%; }
 #cloudtag a { color:black; text-decoration:none; }
-#installform td  { font-size: 10pt; padding:10px 5px 10px 5px; clear:left; }
+#installform td  { font-size: 10pt; color:black; padding:10px 5px 10px 5px; clear:left; }
 #changepasswordform { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
 #changetag { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
 #configform td  { color:#ccc; font-size: 10pt; padding:10px 5px 10px 5px;  }
@@ -370,7 +370,13 @@ div.dailyEntryThumbnail
     background:url(../images/50pc_transparent.png);
     padding:4px 0px 2px 0px;
 }
-div.dailyEntryDescription { margin-top: 10px;  text-align:justify; }
+div.dailyEntryDescription
+{ 
+    margin-top: 10px;
+    margin-bottom: 30px; 
+    text-align:justify; 
+    overflow:auto;
+}
 
 /* Common css screwdriver */
 .clear{
index da2445de7675a65a6efad80cdf8183f6578a08db..9dd6483eee9750f81e653cdc4c6edad4be18b487 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
 <?php
-// Shaarli 0.0.35 beta - Shaare your links...
+// Shaarli 0.0.36 beta - Shaare your links...
 // The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net
 // http://sebsauvage.net/wiki/doku.php?id=php:shaarli
 // Licence: http://www.opensource.org/licenses/zlib-license.php
@@ -58,7 +58,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
 header("Cache-Control: no-store, no-cache, must-revalidate");
 header("Cache-Control: post-check=0, pre-check=0", false);
 header("Pragma: no-cache");
-define('shaarli_version','0.0.35 beta');
+define('shaarli_version','0.0.36 beta');
 if (!is_dir($GLOBALS['config']['DATADIR'])) { mkdir($GLOBALS['config']['DATADIR'],0705); chmod($GLOBALS['config']['DATADIR'],0705); }
 if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
 if ($GLOBALS['config']['ENABLE_LOCALCACHE'])
@@ -988,9 +988,11 @@ function renderPage()
         foreach($linksToDisplay as $key=>$link)
         {
             // Roughly estimate length of entry (by counting characters)
-            $length=strlen($link['title'])+strlen($link['description']);
-            if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly take as much space as 100 words;
-            
+            // Title: 30 chars = 1 line. 1 line is 30 pixels height.
+            // Description: 836 characters gives roughly 342 pixel height.
+            // This is not perfect, but it's usually ok.
+            $length=strlen($link['title'])+(342*strlen($link['description']))/836;
+            if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly takes 100 pixels height.
             // Then put in column which is the less filled:
             $smallest=min($fill); // find smallest value in array.
             $index=array_search($smallest,$fill); // find index of this smallest value.
index e05acc86307e4d8f804c17c544390332ada9443a..9ee74739fcc1e9affa643961278713c1dbf5ba11 100644 (file)
     <div style="clear:both;"></div>
     
     {if="$linksToDisplay"}
-        <div style="float:left;position:relative; width:32%;">
+        <div style="float:left;position:relative; width:33%; padding-left:1%;">
         {loop="col1"}
         <div class="dailyEntry">
+            <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
             {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
             <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
             {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
             <div class="dailyEntryDescription">{$value.formatedDescription}</div>
-            <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
         </div>
         {/loop}
         </div>
 
-        <div style="float:left;position:relative; width:32%;">
+        <div style="float:left;position:relative; width:33%;">
         {loop="col2"}
         <div class="dailyEntry">
+            <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
             {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
             <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
             {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
             <div class="dailyEntryDescription">{$value.formatedDescription}</div>
-            <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
         </div>
         {/loop}
         </div>    
 
-        <div style="float:left;position:relative; width:32%;">
+        <div style="float:left;position:relative; width:33%;">
         {loop="col3"}
         <div class="dailyEntry">
+            <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
             {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
             <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
             {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
             <div class="dailyEntryDescription">{$value.formatedDescription}</div>
-            <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
         </div>
         {/loop}
-        </div>  
+        </div>        
     {else}
          <div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div>
     {/if}
index a7dd61e95af84f4505804d6699e535a240678b19..dc5b53986eaaa24bf88f2ab9d32f3e2178856505 100644 (file)
@@ -42,7 +42,7 @@
                 {else}
                     <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
                 {/if}
-                <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%2F{$value.linkdate|smallHash}&width=200&height=200" onclick="return false;" class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - 
+                <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%3F{$value.linkdate|smallHash}&width=200&height=200" onclick="return false;" class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - 
                 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
                 {if="$value.tags"}
                     <div class="linktaglist">