]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #732 from ArthurHoaro/feature/theme-manager
authorArthur <arthur@hoa.ro>
Fri, 6 Jan 2017 10:40:54 +0000 (11:40 +0100)
committerGitHub <noreply@github.com>
Fri, 6 Jan 2017 10:40:54 +0000 (11:40 +0100)
Theme manager: improvements

52 files changed:
.gitignore
CHANGELOG.md
COPYING
application/ApplicationUtils.php
application/ThemeUtils.php [new file with mode: 0644]
application/Updater.php
application/config/ConfigManager.php
application/config/ConfigPhp.php
images/squiggle.png [deleted file]
index.php
tests/ApplicationUtilsTest.php
tests/ThemeUtilsTest.php [new file with mode: 0644]
tests/Updater/UpdaterTest.php
tests/utils/config/configJson.json.php
tpl/default/404.html [moved from tpl/404.html with 100% similarity]
tpl/default/addlink.html [moved from tpl/addlink.html with 100% similarity]
tpl/default/changepassword.html [moved from tpl/changepassword.html with 100% similarity]
tpl/default/changetag.html [moved from tpl/changetag.html with 94% similarity]
tpl/default/configure.html [moved from tpl/configure.html with 91% similarity]
tpl/default/css/reset.css [moved from inc/reset.css with 100% similarity]
tpl/default/css/shaarli.css [moved from inc/shaarli.css with 99% similarity]
tpl/default/daily.html [moved from tpl/daily.html with 88% similarity]
tpl/default/dailyrss.html [moved from tpl/dailyrss.html with 100% similarity]
tpl/default/editlink.html [moved from tpl/editlink.html with 97% similarity]
tpl/default/export.bookmarks.html [moved from tpl/export.bookmarks.html with 100% similarity]
tpl/default/export.html [moved from tpl/export.html with 100% similarity]
tpl/default/feed.atom.html [moved from tpl/feed.atom.html with 100% similarity]
tpl/default/feed.rss.html [moved from tpl/feed.rss.html with 100% similarity]
tpl/default/images/50pc_transparent.png [moved from images/50pc_transparent.png with 100% similarity]
tpl/default/images/Paper_texture_v5_by_bashcorpo_w1000.jpg [moved from images/Paper_texture_v5_by_bashcorpo_w1000.jpg with 100% similarity]
tpl/default/images/calendar.png [moved from images/calendar.png with 100% similarity]
tpl/default/images/floral_left.png [moved from images/floral_left.png with 100% similarity]
tpl/default/images/floral_right.png [moved from images/floral_right.png with 100% similarity]
tpl/default/images/private.png [moved from images/private.png with 100% similarity]
tpl/default/images/squiggle.png [moved from images/squiggle2.png with 100% similarity]
tpl/default/images/squiggle_closing.png [moved from images/squiggle_closing.png with 100% similarity]
tpl/default/images/tag_blue.png [moved from images/tag_blue.png with 100% similarity]
tpl/default/import.html [moved from tpl/import.html with 100% similarity]
tpl/default/includes.html [moved from tpl/includes.html with 83% similarity]
tpl/default/install.html [moved from tpl/install.html with 100% similarity]
tpl/default/linklist.html [moved from tpl/linklist.html with 98% similarity]
tpl/default/linklist.paging.html [moved from tpl/linklist.paging.html with 100% similarity]
tpl/default/loginform.html [moved from tpl/loginform.html with 100% similarity]
tpl/default/opensearch.html [moved from tpl/opensearch.html with 100% similarity]
tpl/default/page.footer.html [moved from tpl/page.footer.html with 100% similarity]
tpl/default/page.header.html [moved from tpl/page.header.html with 100% similarity]
tpl/default/page.html [moved from tpl/page.html with 100% similarity]
tpl/default/picwall.html [moved from tpl/picwall.html with 100% similarity]
tpl/default/pluginsadmin.html [moved from tpl/pluginsadmin.html with 100% similarity]
tpl/default/readme.txt [moved from tpl/readme.txt with 100% similarity]
tpl/default/tagcloud.html [moved from tpl/tagcloud.html with 100% similarity]
tpl/default/tools.html [moved from tpl/tools.html with 100% similarity]

index 9121905d84603c1943753a4e7bd8d981af6f9aec..19f3dc836873ea5196e2bdece1477de4d4d937c8 100644 (file)
@@ -28,3 +28,7 @@ phpmd.html
 
 # User plugin configuration
 plugins/*/config.php
+
+# 3rd party themes
+tpl/*
+!tpl/default
index fe775b3e61de9c8c426ce637466b5f420261cef1..d3ecc1e61a9c2d9e8825d81c84b82f9994d49281 100644 (file)
@@ -7,14 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ## [v0.9.0](https://github.com/shaarli/Shaarli/releases/tag/v0.9.0) - UNPUBLISHED
 
-**WARNING**: Shaarli now requires PHP 5.5+. 
+**WARNING**: Shaarli now requires PHP 5.5+.
 
 ### Added
 
 - REST API: see [Shaarli API documentation](http://shaarli.github.io/api-documentation/)
+- The theme can now be selected in the administration page.
 
 ### Changed
 
+- Default template files are moved to a subfolder (`default`).
+
 ### Fixed
 
 
diff --git a/COPYING b/COPYING
index 22929463e48ee2a32c7caf44649903c813a96483..547ea570d549cc87d720756b926bf46f43b8c273 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -43,7 +43,7 @@ License: CC-BY (http://creativecommons.org/licenses/by/3.0/)
 Copyright: (c) 2014 Designmodo
 Source: http://designmodo.com/linecons-free/
 
-Files: images/floral_left.png, images/floral_right.png, images/squiggle.png, images/squiggle2.png, images/squiggle_closing.png
+Files: images/floral_left.png, images/floral_right.png, images/squiggle.png, images/squiggle_closing.png
 Licence: Public Domain
 Source: https://openclipart.org/people/j4p4n/j4p4n_ornimental_bookend_-_left.svg
 
index 7f963e9786cc50901863789341bc802ed1e22403..a0f482b0b9791e0f4c1e28b5406dc4895459a239 100644 (file)
@@ -150,6 +150,7 @@ class ApplicationUtils
             'inc',
             'plugins',
             $conf->get('resource.raintpl_tpl'),
+            $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme'),
         ) as $path) {
             if (! is_readable(realpath($path))) {
                 $errors[] = '"'.$path.'" directory is not readable';
diff --git a/application/ThemeUtils.php b/application/ThemeUtils.php
new file mode 100644 (file)
index 0000000..2718ed1
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+namespace Shaarli;
+
+/**
+ * Class ThemeUtils
+ *
+ * Utility functions related to theme management.
+ *
+ * @package Shaarli
+ */
+class ThemeUtils
+{
+    /**
+     * Get a list of available themes.
+     *
+     * It will return the name of any directory present in the template folder.
+     *
+     * @param string $tplDir Templates main directory.
+     *
+     * @return array List of theme names.
+     */
+    public static function getThemes($tplDir)
+    {
+        $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR);
+        $themes = [];
+        foreach ($allTheme as $value) {
+            $themes[] = str_replace($tplDir.'/', '', $value);
+        }
+
+        return $themes;
+    }
+}
index 38de33503a417ac06c9b186298c7621a471d3667..621c7238336a4e128187ca576b0d2784aaadcf86 100644 (file)
@@ -279,6 +279,35 @@ class Updater
         $this->conf->write($this->isLoggedIn);
         return true;
     }
+
+    /**
+     * New setting: theme name. If the default theme is used, nothing to do.
+     *
+     * If the user uses a custom theme, raintpl_tpl dir is updated to the parent directory,
+     * and the current theme is set as default in the theme setting.
+     *
+     * @return bool true if the update is successful, false otherwise.
+     */
+    public function updateMethodDefaultTheme()
+    {
+        // raintpl_tpl isn't the root template directory anymore.
+        // We run the update only if this folder still contains the template files.
+        $tplDir = $this->conf->get('resource.raintpl_tpl');
+        $tplFile = $tplDir . '/linklist.html';
+        if (! file_exists($tplFile)) {
+            return true;
+        }
+
+        $parent = dirname($tplDir);
+        $this->conf->set('resource.raintpl_tpl', $parent);
+        $this->conf->set('resource.theme', trim(str_replace($parent, '', $tplDir), '/'));
+        $this->conf->write($this->isLoggedIn);
+
+        // Dependency injection gore
+        RainTPL::$tpl_dir = $tplDir;
+
+        return true;
+    }
 }
 
 /**
index ca8918b52b2be8693bc53397cad247e72f3661b4..a401887c5367389e34785a8dd7d7c5c906238f41 100644 (file)
@@ -299,6 +299,7 @@ class ConfigManager
         $this->setEmpty('resource.log', 'data/log.txt');
         $this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
         $this->setEmpty('resource.raintpl_tpl', 'tpl/');
+        $this->setEmpty('resource.theme', 'default');
         $this->setEmpty('resource.raintpl_tmp', 'tmp/');
         $this->setEmpty('resource.thumbnails_cache', 'cache');
         $this->setEmpty('resource.page_cache', 'pagecache');
index 9dd9a65dd5c35ba25ce43185c808fb0740171b0e..d7fd4baffa34d2fa3cec5bcb83f108c3571af97a 100644 (file)
@@ -41,6 +41,7 @@ class ConfigPhp implements ConfigIO
         'resource.log' => 'config.LOG_FILE',
         'resource.update_check' => 'config.UPDATECHECK_FILENAME',
         'resource.raintpl_tpl' => 'config.RAINTPL_TPL',
+        'resource.theme' => 'config.theme',
         'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
         'resource.thumbnails_cache' => 'config.CACHEDIR',
         'resource.page_cache' => 'config.PAGECACHE',
@@ -99,7 +100,7 @@ class ConfigPhp implements ConfigIO
                 $configStr .= '$GLOBALS[\'' . $key . '\'] = ' . var_export($conf[$key], true) . ';' . PHP_EOL;
             }
         }
-        
+
         // Store all $conf['config']
         foreach ($conf['config'] as $key => $value) {
             $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL;
diff --git a/images/squiggle.png b/images/squiggle.png
deleted file mode 100644 (file)
index a6ce218..0000000
Binary files a/images/squiggle.png and /dev/null differ
index 0639e85f32a82bf90de26f3087a496287d4a3d49..e553d1ddcfd3564f3a8abdeeb575a9f428ee248b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -79,6 +79,7 @@ require_once 'application/Utils.php';
 require_once 'application/PluginManager.php';
 require_once 'application/Router.php';
 require_once 'application/Updater.php';
+use \Shaarli\ThemeUtils;
 
 // Ensure the PHP version is supported
 try {
@@ -122,7 +123,7 @@ if (isset($_COOKIE['shaarli']) && !is_session_id_valid($_COOKIE['shaarli'])) {
 $conf = new ConfigManager();
 $conf->setEmpty('general.timezone', date_default_timezone_get());
 $conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER)));
-RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl'); // template directory
+RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme').'/'; // template directory
 RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory
 
 $pluginManager = new PluginManager($conf);
@@ -1124,6 +1125,7 @@ function renderPage($conf, $pluginManager, $LINKSDB)
             $conf->set('general.timezone', $tz);
             $conf->set('general.title', escape($_POST['title']));
             $conf->set('general.header_link', escape($_POST['titleLink']));
+            $conf->set('resource.theme', escape($_POST['theme']));
             $conf->set('redirector.url', escape($_POST['redirector']));
             $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection']));
             $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault']));
@@ -1134,6 +1136,7 @@ function renderPage($conf, $pluginManager, $LINKSDB)
             $conf->set('api.secret', escape($_POST['apiSecret']));
             try {
                 $conf->write(isLoggedIn());
+                invalidateCaches($conf->get('resource.page_cache'));
             }
             catch(Exception $e) {
                 error_log(
@@ -1151,6 +1154,8 @@ function renderPage($conf, $pluginManager, $LINKSDB)
         else // Show the configuration form.
         {
             $PAGE->assign('title', $conf->get('general.title'));
+            $PAGE->assign('theme', $conf->get('resource.theme'));
+            $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl')));
             $PAGE->assign('redirector', $conf->get('redirector.url'));
             list($timezone_form, $timezone_js) = generateTimeZoneForm($conf->get('general.timezone'));
             $PAGE->assign('timezone_form', $timezone_form);
index 861b8d4e506533c1f155f6542018692f64aaea67..634bd0eda01a76848ef80058aadcfc4db71e6d1c 100644 (file)
@@ -289,6 +289,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
         $conf->set('resource.page_cache', 'pagecache');
         $conf->set('resource.raintpl_tmp', 'tmp');
         $conf->set('resource.raintpl_tpl', 'tpl');
+        $conf->set('resource.theme', 'default');
         $conf->set('resource.update_check', 'data/lastupdatecheck.txt');
 
         $this->assertEquals(
@@ -312,10 +313,12 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
         $conf->set('resource.page_cache', 'null/pagecache');
         $conf->set('resource.raintpl_tmp', 'null/tmp');
         $conf->set('resource.raintpl_tpl', 'null/tpl');
+        $conf->set('resource.raintpl_theme', 'null/tpl/default');
         $conf->set('resource.update_check', 'null/data/lastupdatecheck.txt');
         $this->assertEquals(
             array(
                 '"null/tpl" directory is not readable',
+                '"null/tpl/default" directory is not readable',
                 '"null/cache" directory is not readable',
                 '"null/cache" directory is not writable',
                 '"null/data" directory is not readable',
diff --git a/tests/ThemeUtilsTest.php b/tests/ThemeUtilsTest.php
new file mode 100644 (file)
index 0000000..e44564b
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+
+namespace Shaarli;
+
+/**
+ * Class ThemeUtilsTest
+ *
+ * @package Shaarli
+ */
+class ThemeUtilsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Test getThemes() with existing theme directories.
+     */
+    public function testGetThemes()
+    {
+        $themes = ['theme1', 'default', 'Bl1p_- bL0p'];
+        foreach ($themes as $theme) {
+            mkdir('sandbox/tpl/'. $theme, 0755, true);
+        }
+
+        // include a file which should be ignored
+        touch('sandbox/tpl/supertheme');
+
+        $res = ThemeUtils::getThemes('sandbox/tpl/');
+        foreach ($res as $theme) {
+            $this->assertTrue(in_array($theme, $themes));
+        }
+        $this->assertFalse(in_array('supertheme', $res));
+
+        foreach ($themes as $theme) {
+            rmdir('sandbox/tpl/'. $theme);
+        }
+        unlink('sandbox/tpl/supertheme');
+        rmdir('sandbox/tpl');
+    }
+
+    /**
+     * Test getThemes() without any theme dir.
+     */
+    public function testGetThemesEmpty()
+    {
+        mkdir('sandbox/tpl/', 0755, true);
+        $this->assertEquals([], ThemeUtils::getThemes('sandbox/tpl/'));
+        rmdir('sandbox/tpl/');
+    }
+
+    /**
+     * Test getThemes() with an invalid path.
+     */
+    public function testGetThemesInvalid()
+    {
+        $this->assertEquals([], ThemeUtils::getThemes('nope'));
+    }
+}
index 0171daada17ca4d424fc3ceb811c692b4da7d63c..1d15cfaaace698d825a9b711258ee504f0927dc0 100644 (file)
@@ -2,6 +2,7 @@
 
 require_once 'application/config/ConfigManager.php';
 require_once 'tests/Updater/DummyUpdater.php';
+require_once 'inc/rain.tpl.class.php';
 
 /**
  * Class UpdaterTest.
@@ -421,4 +422,48 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
         $this->assertTrue($updater->updateMethodDatastoreIds());
         $this->assertEquals($checksum, hash_file('sha1', self::$testDatastore));
     }
+
+    /**
+     * Test defaultTheme update with default settings: nothing to do.
+     */
+    public function testDefaultThemeWithDefaultSettings()
+    {
+        $sandbox = 'sandbox/config';
+        copy(self::$configFile . '.json.php', $sandbox . '.json.php');
+        $this->conf = new ConfigManager($sandbox);
+        $updater = new Updater([], [], $this->conf, true);
+        $this->assertTrue($updater->updateMethodDefaultTheme());
+
+        $this->assertEquals('tpl/', $this->conf->get('resource.raintpl_tpl'));
+        $this->assertEquals('default', $this->conf->get('resource.theme'));
+        $this->conf = new ConfigManager($sandbox);
+        $this->assertEquals('tpl/', $this->conf->get('resource.raintpl_tpl'));
+        $this->assertEquals('default', $this->conf->get('resource.theme'));
+        unlink($sandbox . '.json.php');
+    }
+
+    /**
+     * Test defaultTheme update with a custom theme in a subfolder
+     */
+    public function testDefaultThemeWithCustomTheme()
+    {
+        $theme = 'iamanartist';
+        $sandbox = 'sandbox/config';
+        copy(self::$configFile . '.json.php', $sandbox . '.json.php');
+        $this->conf = new ConfigManager($sandbox);
+        mkdir('sandbox/'. $theme);
+        touch('sandbox/'. $theme .'/linklist.html');
+        $this->conf->set('resource.raintpl_tpl', 'sandbox/'. $theme .'/');
+        $updater = new Updater([], [], $this->conf, true);
+        $this->assertTrue($updater->updateMethodDefaultTheme());
+
+        $this->assertEquals('sandbox', $this->conf->get('resource.raintpl_tpl'));
+        $this->assertEquals($theme, $this->conf->get('resource.theme'));
+        $this->conf = new ConfigManager($sandbox);
+        $this->assertEquals('sandbox', $this->conf->get('resource.raintpl_tpl'));
+        $this->assertEquals($theme, $this->conf->get('resource.theme'));
+        unlink($sandbox . '.json.php');
+        unlink('sandbox/'. $theme .'/linklist.html');
+        rmdir('sandbox/'. $theme);
+    }
 }
index 06a302e875b8e61779a0981c85731c63ebb18723..13d38c6680b4a4515192ee0045adcfea05c45b0e 100644 (file)
@@ -24,7 +24,8 @@
     },
     "resource": {
         "datastore": "tests\/utils\/config\/datastore.php",
-        "data_dir": "tests\/utils\/config"
+        "data_dir": "tests\/utils\/config",
+        "raintpl_tpl": "tpl/"
     },
     "plugins": {
         "WALLABAG_VERSION": 1
similarity index 100%
rename from tpl/404.html
rename to tpl/default/404.html
similarity index 100%
rename from tpl/addlink.html
rename to tpl/default/addlink.html
similarity index 94%
rename from tpl/changetag.html
rename to tpl/default/changetag.html
index 13cc5cf1ede43a62815f4f18c225face60ce154b..a0df3328ed67d1529b8d1a81c0ab2eaae25c72fc 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>{include="includes"}
-    <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" />
+    <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
     <script src="inc/awesomplete.min.js#"></script>
 </head>
 <body onload="document.changetag.fromtag.focus();">
similarity index 91%
rename from tpl/configure.html
rename to tpl/default/configure.html
index b4197bf9faee7d6b07b552c0250cd6cd757b1222..5820e6e4022d902f7284205405ab1e0495687b1a 100644 (file)
         <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label
             for="titleLink">(default value is: ?)</label></td>
       </tr>
+
+      <tr>
+        <td><b>Theme:</b></td>
+        <td>
+          <select name="theme" id="theme">
+            {loop="$theme_available"}
+              <option value="{$value}" {if="$value===$theme"}selected{/if}>
+                {$value|ucfirst}
+              </option>
+            {/loop}
+          </select>
+        </td>
+      </tr>
+
       <tr>
         <td><b>Timezone:</b></td>
         <td>{$timezone_form}</td>
similarity index 100%
rename from inc/reset.css
rename to tpl/default/css/reset.css
similarity index 99%
rename from inc/shaarli.css
rename to tpl/default/css/shaarli.css
index a24d4b7c1e384cfc72a03000e462263063c77fb0..10709b6a3cd012e24702b0dad05a5cff905ac9b4 100644 (file)
@@ -103,7 +103,7 @@ strong {
 }
 
 #pageheader #logo {
-    background-image: url('../images/logo.png');
+    background-image: url('../../../images/logo.png');
     background-repeat: no-repeat;
     float: left;
     margin: 0 10px 0 10px;
@@ -803,6 +803,10 @@ div.dailyAbout img {
     height: 14px;
 }
 
+div.dailyEntryPermalink {
+    float: right;
+}
+
 div.dailyTitle {
     font-weight: bold;
     font-size: 44pt;
similarity index 88%
rename from tpl/daily.html
rename to tpl/default/daily.html
index eba0af3bfcb290a114874ac4f7625a8260aa146d..e86e90b1e0bd3c13e12a7d4286d62600ed917808 100644 (file)
@@ -28,9 +28,9 @@
     </div>
 
     <div class="dailyTitle">
-        <img src="../images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left">
+        <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">
+        <img src="images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right">
     </div>
 
     <div class="dailyDate">
@@ -50,7 +50,7 @@
                     <div class="dailyEntry">
                         <div class="dailyEntryPermalink">
                             <a href="?{$value.shorturl}">
-                                <img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink">
+                                <img src="images/squiggle.png" width="25" height="26" title="permalink" alt="permalink">
                             </a>
                         </div>
                         {if="!$hide_timestamps || isLoggedIn()"}
@@ -94,7 +94,7 @@
             {$value}
         {/loop}
     </div>
-    <div id="closing"><img src="../images/squiggle_closing.png" width="66" height="61" alt="-"></div>
+    <div id="closing"><img src="images/squiggle_closing.png" width="66" height="61" alt="-"></div>
 </div>
 {include="page.footer"}
 </body>
similarity index 100%
rename from tpl/dailyrss.html
rename to tpl/default/dailyrss.html
similarity index 97%
rename from tpl/editlink.html
rename to tpl/default/editlink.html
index 870cc1688ac4d3ffb29f4b17bbb65b658a910b02..d3f99fe6482c75ad7fbe23e79a5f2d60b0b87e28 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>{include="includes"}
-    <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" />
+    <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
 </head>
 <body
 {if="$link.title==''"}onload="document.linkform.lf_title.focus();"
similarity index 100%
rename from tpl/export.html
rename to tpl/default/export.html
similarity index 100%
rename from tpl/feed.rss.html
rename to tpl/default/feed.rss.html
similarity index 100%
rename from tpl/import.html
rename to tpl/default/import.html
similarity index 83%
rename from tpl/includes.html
rename to tpl/default/includes.html
index 7b2997ce45e73b8dd8ce7df72dd3ba93a08d3864..c3b837f5de350bb683804f1f408767d4afafcf27 100644 (file)
@@ -6,9 +6,9 @@
 <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
 <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
 <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
-<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}
+<link type="text/css" rel="stylesheet" href="css/reset.css" />
+<link type="text/css" rel="stylesheet" href="css/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}
similarity index 100%
rename from tpl/install.html
rename to tpl/default/install.html
similarity index 98%
rename from tpl/linklist.html
rename to tpl/default/linklist.html
index d42323423bc3411bc75de98ecda8bf0ead6cb6ac..5accc92fa4eed0367a187c3509d27e943ffd50fd 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" />
+    <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
     {include="includes"}
 </head>
 <body>
similarity index 100%
rename from tpl/page.html
rename to tpl/default/page.html
similarity index 100%
rename from tpl/picwall.html
rename to tpl/default/picwall.html
similarity index 100%
rename from tpl/readme.txt
rename to tpl/default/readme.txt
similarity index 100%
rename from tpl/tagcloud.html
rename to tpl/default/tagcloud.html
similarity index 100%
rename from tpl/tools.html
rename to tpl/default/tools.html