Selaa lähdekoodia

Merge pull request #1597 from Ribas160/set_bootstrap5_template_as_default

Set bootstrap5 template as default
El RIDO 1 vuosi sitten
vanhempi
sitoutus
262c390f42
6 muutettua tiedostoa jossa 11 lisäystä ja 10 poistoa
  1. 1 0
      CHANGELOG.md
  2. 1 1
      README.md
  3. 5 5
      cfg/conf.sample.php
  4. 1 1
      lib/Configuration.php
  5. 1 1
      lib/TemplateSwitcher.php
  6. 2 2
      tst/TemplateSwitcherTest.php

+ 1 - 0
CHANGELOG.md

@@ -6,6 +6,7 @@
 * CHANGED: Jdenticons are now used as the default icons
 * CHANGED: Jdenticons are now used as the default icons
 * CHANGED: Upgrading libraries to: jdenticon 2.0.0
 * CHANGED: Upgrading libraries to: jdenticon 2.0.0
 * CHANGED: Minimum required PHP version is 7.4, due to a change in the jdenticon library
 * CHANGED: Minimum required PHP version is 7.4, due to a change in the jdenticon library
+* CHANGED: Set bootstrap5 template as default for PrivateBin (#1572)
 * FIXED: Name mismatches in attached files (#1584)
 * FIXED: Name mismatches in attached files (#1584)
 * FIXED: Unable to paste attachments from clipboard (#1589)
 * FIXED: Unable to paste attachments from clipboard (#1589)
 
 

+ 1 - 1
README.md

@@ -81,7 +81,7 @@ file](https://github.com/PrivateBin/PrivateBin/wiki/Configuration):
 * File upload support, image, media and PDF preview (disabled by default, size
 * File upload support, image, media and PDF preview (disabled by default, size
   limit adjustable)
   limit adjustable)
 
 
-* Templates: By default there are bootstrap CSS, darkstrap and "classic ZeroBin"
+* Templates: By default there are bootstrap5, bootstrap CSS and darkstrap
   to choose from and it is easy to adapt these to your own websites layout or
   to choose from and it is easy to adapt these to your own websites layout or
   create your own.
   create your own.
 
 

+ 5 - 5
cfg/conf.sample.php

@@ -42,7 +42,7 @@ defaultformatter = "plaintext"
 ; size limit per paste or comment in bytes, defaults to 10 Mebibytes
 ; size limit per paste or comment in bytes, defaults to 10 Mebibytes
 sizelimit = 10485760
 sizelimit = 10485760
 
 
-; by default PrivateBin use "bootstrap" template (tpl/bootstrap.php).
+; by default PrivateBin use "bootstrap5" template (tpl/bootstrap5.php).
 ; Optionally you can enable the template selection menu, which uses
 ; Optionally you can enable the template selection menu, which uses
 ; a session cookie to store the choice until the browser is closed.
 ; a session cookie to store the choice until the browser is closed.
 templateselection = false
 templateselection = false
@@ -56,12 +56,12 @@ availabletemplates[] = "bootstrap-dark-page"
 availabletemplates[] = "bootstrap-compact"
 availabletemplates[] = "bootstrap-compact"
 availabletemplates[] = "bootstrap-compact-page"
 availabletemplates[] = "bootstrap-compact-page"
 
 
-; set the template your installs defaults to, defaults to "bootstrap" (tpl/bootstrap.php), also
-; bootstrap variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page",
+; set the template your installs defaults to, defaults to "bootstrap5" (tpl/bootstrap5.php), also
+; bootstrap template (tpl/bootstrap.php) and it's variants: "bootstrap-dark", "bootstrap-compact", "bootstrap-page",
 ; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page",
 ; which can be combined with "-dark" and "-compact" for "bootstrap-dark-page",
-; "bootstrap-compact-page" and finally "bootstrap5" (tpl/bootstrap5.php) - previews at:
+; "bootstrap-compact-page" - previews at:
 ; https://privatebin.info/screenshots.html
 ; https://privatebin.info/screenshots.html
-; template = "bootstrap"
+; template = "bootstrap5"
 
 
 ; (optional) info text to display
 ; (optional) info text to display
 ; use single, instead of double quotes for HTML attributes
 ; use single, instead of double quotes for HTML attributes

+ 1 - 1
lib/Configuration.php

@@ -46,7 +46,7 @@ class Configuration
             'syntaxhighlightingtheme'  => '',
             'syntaxhighlightingtheme'  => '',
             'sizelimit'                => 10485760,
             'sizelimit'                => 10485760,
             'templateselection'        => false,
             'templateselection'        => false,
-            'template'                 => 'bootstrap',
+            'template'                 => 'bootstrap5',
             'availabletemplates'       => array(
             'availabletemplates'       => array(
                 'bootstrap5',
                 'bootstrap5',
                 'bootstrap',
                 'bootstrap',

+ 1 - 1
lib/TemplateSwitcher.php

@@ -25,7 +25,7 @@ class TemplateSwitcher
      * @static
      * @static
      * @var    string
      * @var    string
      */
      */
-    protected static $_templateFallback = 'bootstrap';
+    protected static $_templateFallback = 'bootstrap5';
 
 
     /**
     /**
      * available templates
      * available templates

+ 2 - 2
tst/TemplateSwitcherTest.php

@@ -10,7 +10,7 @@ class TemplateSwitcherTest extends TestCase
     {
     {
         $conf = new Configuration;
         $conf = new Configuration;
 
 
-        $defaultTemplateFallback        = 'bootstrap';
+        $defaultTemplateFallback        = 'bootstrap5';
         $existingTemplateFallback       = 'bootstrap-dark';
         $existingTemplateFallback       = 'bootstrap-dark';
         $wrongBootstrapTemplateFallback = 'bootstrap-wrong';
         $wrongBootstrapTemplateFallback = 'bootstrap-wrong';
         $wrongTemplateFallback          = 'wrong-template';
         $wrongTemplateFallback          = 'wrong-template';
@@ -38,7 +38,7 @@ class TemplateSwitcherTest extends TestCase
 
 
     public function testGetTemplate()
     public function testGetTemplate()
     {
     {
-        $defaultTemplateFallback = 'bootstrap';
+        $defaultTemplateFallback = 'bootstrap5';
         $customTemplate          = 'bootstrap-dark';
         $customTemplate          = 'bootstrap-dark';
         $customWrongTemplate     = 'bootstrap-wrong';
         $customWrongTemplate     = 'bootstrap-wrong';