]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Linklist template
authorArthurHoaro <arthur@hoa.ro>
Sun, 28 Feb 2016 13:08:45 +0000 (14:08 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sun, 7 Aug 2016 10:17:36 +0000 (12:17 +0200)
tpl/default/css/shaarli.css
tpl/default/linklist.html
tpl/default/linklist.paging.html

index 2fd477b3fb38f58a8155f7ebd138c17d3db5cc10..72ea4df59420de688365f67c74cd7b415f94c90f 100644 (file)
@@ -13,6 +13,18 @@ body {
     clear: both;
 }
 
+.label {
+    display: inline-block;
+    padding: .25em .4em;
+    font-size: 75%;
+    font-weight: 700;
+    line-height: 1;
+    text-align: center;
+    white-space: nowrap;
+    vertical-align: baseline;
+    border-radius: .25rem;
+}
+
 /**
  * Extends Pure grids responsive to hide items.
  * Use xx-0 to hide an item on xx screen.
@@ -288,4 +300,156 @@ body {
     box-shadow: 0 1px 0 rgba(255, 255, 255, 0.078), 0 1px 4px rgba(0, 0, 0, 0.298) inset;
     color: #252525;
     font-size: 0.8em;
-}
\ No newline at end of file
+}
+
+/**
+ * CONTENT - LINKLIST ITEMS
+ */
+.linklist-item {
+    margin: 15px 0;
+    background: #fff;
+    box-shadow: 2px 2px 0.5em #797979;
+}
+
+.linklist-item-title, .linklist-item-title h2  {
+    margin: 0;
+}
+
+.linklist-item-title {
+    background: #20b988 url(../img/noise.png);
+    border-bottom: 1px solid #1b926c;
+    box-shadow: 1px 1px 0.2em #1b926c;
+}
+
+.linklist-item-title h2 {
+    padding: 2px 10px;
+    line-height: 25px;
+}
+
+.linklist-item-title a {
+    font-size: 0.6em;
+    color: #d0fff0;
+    text-decoration: none;
+    vertical-align: middle;
+}
+
+.linklist-item-title a:hover {
+    color: #fff;
+}
+
+.linklist-item-title .label-private {
+    border: solid 1px #d0fff0;
+}
+
+.linklist-item-editbuttons {
+    float: right;
+    padding: 5px;
+}
+
+.linklist-item-editbuttons a {
+    font-size: 1em;
+}
+
+.linklist-item-description {
+    padding: 10px;
+}
+
+.linklist-item-infos {
+    padding: 5px;
+    background: #ddd url(../img/noise.png);
+    border-top: 1px solid #989898;
+    box-shadow: 1px -1px 0.2em #989898;
+    color: #252525;
+    font-size: 0.8em;
+}
+
+.linklist-item-infos a {
+    color: #505050;
+    text-decoration: none;
+}
+
+.linklist-item-infos a:hover {
+    color: #000;
+}
+
+.linklist-item-infos .label-tag {
+    border: 1px solid #505050;
+    font-size: 0.9em;
+}
+
+.linklist-item-infos .label-tag:hover {
+    border: 1px solid #000;
+}
+
+.linklist-item-infos-url {
+    text-align: right;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+/**
+ * CONTENT - LINKLIST ITEMS
+ */
+.linklist-item {
+    margin: 15px 0;
+    background: #fff;
+    box-shadow: 2px 2px 0.5em #797979;
+}
+
+.linklist-item-title, .linklist-item-title h2  {
+    margin: 0;
+}
+
+.linklist-item-title {
+    background: #20b988 url(../img/noise.png);
+    border-bottom: 1px solid #1b926c;
+    box-shadow: 1px 1px 0.2em #1b926c;
+}
+
+.linklist-item-title h2 {
+    padding: 2px 10px;
+    line-height: 25px;
+}
+
+.linklist-item-title a {
+    font-size: 0.6em;
+    color: #d0fff0;
+    text-decoration: none;
+    vertical-align: middle;
+}
+
+.linklist-item-title a:hover {
+    color: #fff;
+}
+
+.linklist-item-editbuttons {
+    float: right;
+    padding: 5px;
+}
+
+.linklist-item-editbuttons a {
+    font-size: 1em;
+}
+
+.linklist-item-description {
+    padding: 10px;
+}
+
+.linklist-item-infos {
+    padding: 5px;
+    background: #ddd url(../img/noise.png);
+    border-top: 1px solid #989898;
+    box-shadow: 1px -1px 0.2em #989898;
+    color: #252525;
+    font-size: 0.8em;
+}
+
+.linklist-item-infos a {
+    color: #000;
+    text-decoration: none;
+}
+
+.linklist-item-infos a:hover {
+    color: #252525;
+}
index c42245e4df82110695c405efe410c5fef5fb66a6..2694edfe779ee50f06ed59d721a02441f3f7bb5f 100644 (file)
 <!DOCTYPE html>
 <html>
 <head>
-    {include="includes"}
+  {include="includes"}
 </head>
 <body>
 {include="page.header"}
 
-    <!--{loop="$plugins_header.fields_toolbar"}
-        {$value}
-    {/loop}-->
+<!--{loop="$plugins_header.fields_toolbar"}
+    {$value}
+{/loop}-->
 
 <div id="linklist">
 
-    {include="linklist.paging"}
+  {include="linklist.paging"}
 
-    <div id="plugin_zone_start_linklist" class="plugin_zone">
-        {loop="$plugin_start_zone"}
-        {$value}
-        {/loop}
-    </div>
+  <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}
-        {if="$search_type=='fulltext'"}
-            <div id="searchcriteria">{$result_count} results for <i>{$search_crits}</i></div>
-        {/if}
-        {if="$search_type=='tags'"}
-            <div id="searchcriteria">{$result_count} results for tags <i>
-            {loop="search_crits"}
-                <span class="linktag" title="Remove tag">
-                    <a href="?removetag={function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
-                </span>
-            {/loop}</i></div>
-        {/if}
+  <!-- TODO: Search results. -->
+  {if="count($links)==0"}
+    <div id="searchcriteria">Nothing found.</div>
+  {else}
+    {if="$search_type=='fulltext'"}
+      <div id="searchcriteria">{$result_count} results for <i>{$search_crits}</i></div>
     {/if}
-    <ul>
-        {loop="links"}
-        <li{if="$value.class"} class="{$value.class}"{/if}>
-            <a id="{$value.shorturl}"></a>
-            <div class="thumbnail">{$value.url|thumbnail}</div>
-            <div class="linkcontainer">
-                {if="isLoggedIn()"}
-                    <div class="linkeditbuttons">
-                        <form method="GET" class="buttoneditform">
-                            <input type="hidden" name="edit_link" value="{$value.linkdate}">
-                            <input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit">
-                        </form><br>
-                        <form method="POST" class="buttoneditform">
-                            <input type="hidden" name="lf_linkdate" value="{$value.linkdate}">
-                            <input type="hidden" name="token" value="{$token}">
-                            <input type="hidden" name="delete_link">
-                            <input type="image" alt="Delete" src="images/delete_icon.png#" title="Delete"
-                                   class="button_delete" onClick="return confirmDeleteLink();">
-                        </form>
-                    </div>
-                {/if}
-                <span class="linktitle">
-                    <a href="{$value.real_url}">{$value.title}</a>
-                </span>
-                <br>
-                {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if}
-                {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
-                    <span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{function="strftime('%c', $value.timestamp)"} - permalink</a> - </span>
+    {if="$search_type=='tags'"}
+      <div id="searchcriteria">{$result_count} results for tags <i>
+      {loop="search_crits"}
+        <span class="linktag" title="Remove tag">
+            <a href="?removetag={function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
+        </span>
+      {/loop}</i></div>
+    {/if}
+  {/if}
+  <div class="pure-g">
+    <div class="pure-u-2-24"></div>
+    <div class="pure-u-20-24">
+      {loop="links"}
+        <div class="linklist-item{if="$value.class"} {$value.class}{/if}">
+
+          <div class="linklist-item-title">
+            {if="isLoggedIn()"}
+              <div class="linklist-item-editbuttons">
+                <a href="#" title="Fold" class="fold-button"><i class="fa fa-chevron-up"></i></a>
+                <a href="?edit_link={$value.linkdate}" title="Edit"><i class="fa fa-pencil-square-o"></i></a>
+                <a href="?delete_link={$value.linkdate}&amp;token={$token}" title="Delete"><i class="fa fa-trash"></i></a>
+              </div>
+            {/if}
+
+            <h2>
+              <a href="{$value.real_url}" id="{$value.shorturl}">
+                {if="strpos($value.url, $value.shorturl) === false"}
+                  <i class="fa fa-external-link"></i>
                 {else}
-                    <span class="linkdate" title="Short link here"><a href="?{$value.shorturl}">permalink</a> - </span>
+                  <i class="fa fa-sticky-note"></i>
                 {/if}
 
-                {loop="$value.link_plugin"}
-                    <span>{$value}</span> -
-                {/loop}
-
-                <a href="{$value.real_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="$value.private"}
+                  <span class="label label-private">Private</span>
                 {/if}
 
+                {$value.title}
+              </a>
+            </h2>
+          </div>
+
+          <div class="linklist-item-thumbnail">{$value.url|thumbnail}</div>
 
+          {if="$value.description"}
+            <div class="linklist-item-description">
+              {$value.description}
             </div>
-        </li>
-    {/loop}
-    </ul>
+          {/if}
+
+          <div class="linklist-item-infos">
+            {if="$value.tags"}
+              <div class="linklist-item-tags">
+                <i class="fa fa-tags"></i>
+                {loop="value.taglist"}
+                  <span class="label label-tag" title="Add tag">
+                    <a href="?addtag={$value|urlencode}">{$value}</a>
+                  </span>
+                {/loop}
+              </div>
+            {/if}
 
-    <div id="plugin_zone_end_linklist" class="plugin_zone">
-        {loop="$plugin_end_zone"}
-            {$value}
-        {/loop}
+            <div class="pure-g">
+              <div class="pure-u-lg-5-8 pure-u-sm-1">
+                <a href="?{$value.shorturl}" title="Permalink">
+                  {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
+                    <span class="linkdate">
+                      <i class="fa fa-clock-o"></i>
+                      {function="strftime('%d %B %Y %H:%M', $value.timestamp)"} &middot;
+                    </span>
+                  {/if}
+                  permalink &middot;
+                </a>
+
+                {loop="$value.link_plugin"}
+                  <span>{$value}</span> &middot;
+                {/loop}
+              </div>
+              <div class="linklist-item-infos-url pure-u-lg-3-8 pure-u-sm-1">
+                <a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a>
+              </div>
+            </div>
+          </div>
+        </div>
+      {/loop}
     </div>
+  </div>
+</div>
+
+  <div id="plugin_zone_end_linklist" class="plugin_zone">
+    {loop="$plugin_end_zone"}
+    {$value}
+    {/loop}
+  </div>
 
-    {include="linklist.paging"}
+  {include="linklist.paging"}
 
 </div>
 
-    {include="page.footer"}
+{include="page.footer"}
 </body>
 </html>
index 57ee16574c48054670ea4a2737bc416bf3d9adee..c8c13fe07d0179e4987c9f047fe400f3418476ec 100644 (file)
@@ -3,7 +3,7 @@
     <div class="linklist-filters pure-u-1-3">
       {if="isLoggedIn() or !empty($action_plugin)"}
         <span class="linklist-filters-text">
-          Filters:
+          Filters
         </span>
         {if="isLoggedIn()"}
           <a href="?privateonly" title="Click to see all links"
     </div>
 
     <div class="linksperpage pure-u-1-3">
-      Links per page:
+      Links per page
       <a href="?linksperpage=20">20</a>
       <a href="?linksperpage=50">50</a>
       <a href="?linksperpage=100">100</a>
       <form method="GET">
-        <input type="text" name="linksperpage" size="2">
+        <input type="text" name="linksperpage" placeholder="133">
       </form>
     </div>
   </div>