added NCP custom theme with new logo

This commit is contained in:
nachoparker 2017-11-07 16:47:49 +01:00
parent 7e2abc9133
commit 958beefdd7
12 changed files with 348 additions and 6 deletions

BIN
etc/background Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

127
etc/logo Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -94,6 +94,21 @@ EOF
sudo -u www-data php occ config:system:set mail_from_address --value="admin"
sudo -u www-data php occ config:system:set mail_domain --value="ownyourbits.com"
# NCP theme
local ID=$( grep instanceid config/config.php | awk -F "=> " '{ print $2 }' | sed "s|[,']||g" )
[[ "$ID" == "" ]] && { echo "failed to get ID"; return 1; }
mkdir -p data/appdata_${ID}/theming/images
cp /usr/local/etc/logo /usr/local/etc/background data/appdata_${ID}/theming/images
chown -R www-data:www-data data/appdata_${ID}
mysql nextcloud <<EOF
replace into oc_appconfig values ( 'theming', 'name', "NextCloudPi" );
replace into oc_appconfig values ( 'theming', 'slogan', "keep your data close" );
replace into oc_appconfig values ( 'theming', 'url', "https://ownyourbits.com" );
replace into oc_appconfig values ( 'theming', 'logoMime', "image/svg+xml" );
replace into oc_appconfig values ( 'theming', 'backgroundMime', "image/png" );
EOF
# other
sudo -u www-data php occ config:system:set overwriteprotocol --value=https

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
ncp-web/img/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

127
ncp-web/img/ncp-logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -32,9 +32,9 @@
ini_set('session.cookie_secure', 1);
// HTTP2 push headers
header("Link: </minified.js>; rel=preload; as=script;,</ncp.js>; rel=preload; as=script;,</ncp.css>; rel=preload; as=style;,</ncp-logo.png>; rel=preload; as=image;, </loading-small.gif>; rel=preload; as=image;, rel=preconnect href=ncp-launcher.php;");
header("Link: </minified.js>; rel=preload; as=script;,</ncp.js>; rel=preload; as=script;,</ncp.css>; rel=preload; as=style;,</img/ncp-logo.svg>; rel=preload; as=image;, </loading-small.gif>; rel=preload; as=image;, rel=preconnect href=ncp-launcher.php;");
?>
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="icon" type="image/png" href="img/favicon.png" />
<link rel="stylesheet" href="ncp.css">
</head>
<body id="body-user">
@ -66,7 +66,7 @@
<h2 id="config-box-title">NextCloudPi First Run</h2>
<p>Click to start the configuration wizard</p>
<br>
<a href="wizard"><img class="wizard-btn" src="wizard/img/ncp-logo.png" class="wizard"></a>
<a href="wizard"><img class="wizard-btn" src="wizard/img/ncp-logo.svg" class="wizard"></a>
<br>
<button type="button" class="wizard-btn" id="go-wizard" >run </button>
<button type="button" class="first-run-close" id="skip-wizard" >skip </button>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -424,7 +424,7 @@ input[type='checkbox'].checkbox--white:indeterminate:disabled + label:after,inpu
}
#header .logo-icon {
display:inline-block;
background-image:url('ncp-logo.png');
background-image:url('img/ncp-logo.svg');
background-repeat:no-repeat;
background-position:center center;
background-size:contain;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -22,6 +22,7 @@
if ( isset($_SERVER['HTTPS']) )
ini_set('session.cookie_secure', 1);
?>
<link rel="icon" type="image/png" href="../img/favicon.png" />
</head>
<body>
<div id="rootwizard">
@ -39,7 +40,7 @@
<div class="tab-pane" id="tab1">
<div class="ncp-tab-pane">
<h1>Welcome to NextCloudPi</h1>
<img id="ncp-welcome-logo" src="img/ncp-logo.png">
<img id="ncp-welcome-logo" src="img/ncp-logo.svg">
<p>This wizard will help you configure your personal cloud.</p>
</div>
</div>
@ -188,7 +189,7 @@
<br>go to your Nextcloud
</div>
<div class="linkbox">
<a href=".."><img id="ncp-web" src="img/ncp-logo.png"></a>
<a href=".."><img id="ncp-web" src="img/ncp-logo.svg"></a>
<br>go back to NextCloudPi web panel
</div>