mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
Add logo option
This commit is contained in:
parent
2006403a37
commit
2fafae3184
3 changed files with 60 additions and 2188 deletions
2215
build/index.php
2215
build/index.php
File diff suppressed because it is too large
Load diff
19
core.php
19
core.php
|
@ -407,10 +407,27 @@ class page_renderer
|
|||
if($body_template === false)
|
||||
$body_template = self::$main_content_template;
|
||||
|
||||
if(strlen($settings->logo_url) > 0)
|
||||
{
|
||||
// A logo url has been specified
|
||||
$logo_html = "<img class='logo' src='$settings->logo_url' />";
|
||||
switch($settings->logo_position)
|
||||
{
|
||||
case "left":
|
||||
$logo_html = "$logo_html $settings->sitename";
|
||||
break;
|
||||
case "right":
|
||||
$logo_html .= " $settings->sitename";
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid logo_position '$settings->logo_position'. Valid values are either \"left\" or \"right\" and are case sensitive.");
|
||||
}
|
||||
}
|
||||
|
||||
$parts = [
|
||||
"{body}" => $body_template,
|
||||
|
||||
"{sitename}" => $settings->sitename,
|
||||
"{sitename}" => $logo_html,
|
||||
"{favicon-url}" => $settings->favicon,
|
||||
"{header-html}" => self::get_css_as_html(),
|
||||
|
||||
|
|
|
@ -16,9 +16,19 @@
|
|||
$settings = new stdClass();
|
||||
|
||||
// The site's name. Used all over the place.
|
||||
// Note that by default the session cookie is perfixed with a variant of the sitename so changing this will log everyone out!
|
||||
// Note that by default the session cookie is perfixed with a variant of the
|
||||
// sitename so changing this will log everyone out!
|
||||
$settings->sitename = "Pepperminty Wiki";
|
||||
|
||||
// A url that points to the site's logo. Leave blank to disable. When enabled
|
||||
// the logo will be inserted next to the site name on every page.
|
||||
$settings->logo_url = "//starbeamrainbowlabs.com/images/logos/peppermint.png";
|
||||
|
||||
// The side of the site name at which the logo should be placed. May be set to
|
||||
// either "left" or "right". Only has an effect if the above is not set to an
|
||||
// empty string.
|
||||
$settings->logo_position = "left";
|
||||
|
||||
// The url from which to fetch updates. Defaults to the master (development)
|
||||
// branch If there is sufficient demand, a separate stable branch will be
|
||||
// created. Note that if you use the automatic updater currently it won't save
|
||||
|
@ -179,7 +189,6 @@ input[type=search] { width: 14rem; padding: 0.3rem 0.4rem; font-size: 1rem; colo
|
|||
input[type=search]::-webkit-input-placeholder { color : rgba(255, 255, 255, 0.75); }
|
||||
input[type=button], input[type=submit] { cursor: pointer; }
|
||||
|
||||
|
||||
.sidebar { position: relative; z-index: 100; margin-top: 0.6rem; padding: 1rem 3rem 2rem 0.4rem; background: #9e7eb4; box-shadow: inset -0.6rem 0 0.8rem -0.5rem rgba(50, 50, 50, 0.5); }
|
||||
.sidebar a { color: #ffa74d; }
|
||||
|
||||
|
@ -194,6 +203,7 @@ input[type=button], input[type=submit] { cursor: pointer; }
|
|||
|
||||
h1 { text-align: center; }
|
||||
.sitename { margin-top: 5rem; margin-bottom: 3rem; font-size: 2.5rem; }
|
||||
.logo { max-width: 4rem; max-height: 4rem; vertical-align: middle; }
|
||||
main:not(.printable) { padding: 2rem; background: #faf8fb; box-shadow: 0 0.1rem 1rem 0.3rem rgba(50, 50, 50, 0.5); }
|
||||
|
||||
label { display: inline-block; min-width: 7rem; }
|
||||
|
|
Loading…
Reference in a new issue