-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When setting custom theme (outside of Theme app) it isn't taken #5036
Comments
Please make sure you disable the theming app when using custom themes. Why should /core/css/styles.scss and /themes/example/core/css/styles.css be equal? |
Sorry should have mentioned that I also disabled the theming app. You would expect that an example would follow the same structure as the original theme. How else can somebody make changes to a theme, without having a similar file structure. I have had 'styles.css' (as pre NC12) but this isn't loaded in the browser. |
Been able to have my own background working (which is located in /themes/[theme name]/core/img/background.jpg) by copying the /core/css/guests.scss to /themes/[theme name]/core/css/guest.css I do this since I have a separate script running which cycles through a few different backgrounds. Have not been able to have my own fav-icon and logo to work yet. |
Same problem here. i have a folder in /themes and a logo in /themes/mytheme/core/img and some css changes in /themes/mytheme/core/css In the config file i have my theme activated but no logo and no custom login background is shown. I didnt have this behavior in the past. |
Looks like the styles.css inside the theme folder is not applied because of the newly added guest.css. |
We should add a guest.css to the example theme and update the documentation on that. cc @nextcloud/documentation |
But isn't the guest.css only used for guest and login views? it wouldn't seem obvious that to change the logo on the top left corner once you are logged in, you will need to add that to the guest.css file. |
I just tried to add the logo-icon css section to the guest.css file, without success. Looking at the browser details it shows that the .logo-icon css details comes from server.css (which is still the default one) |
Ah those are two issues. So styles.css will not be loaded anymore since Nextcloud 12 has a merged css file called server.css. Can you test if it will be fixed when you rename that file in your theme? |
but is should work, because if a factory or a private person want have his own theme, where he have long time developed .. :\ should work again .. |
I can confirm that the logo-icon in the server.css file now works. So I had to do the following to change the logos:
The only thing that doesn't get changed at this moment is the fav-icon |
i am confirm it too, this works.. io-node, if you whant test my theme, there edit: copy style.css to server and guest.css , background of the login have it self not changed, like it should be. And i mus rewrite the fully theme.. it is works nothing like it should :\ behind root login this is a remarkable and heavy changing of the theme structure and nobody know it ! also it is in the Adminarea the information about opcache still available (i have adjust it in the php.ini and no change) i guess, the "theme" including it is before the whole theme default it is used, the soulution with server.css and guest.css it is a bad "specially,extra solution who make more code as it must be. where i see that, i have open the firefox and "Inspect element" on the login and see at bottom the code, the default code mus overwritten with the custom code.. so we see, the default css code best regards best regards |
Works fine here with the example theme from #5061. Can you check what files are loaded in the |
In the head section it only shows:
not the source file it comes from. I assume this is from the template files Only work around I can think of is copying both the |
Works for me, too. I renamed the styles.css in server.css and now the theme is working. But there is one thing i dont understand. Is the guest.css necessary? My theme looks good without the guest.css. |
True, you can do it with server.css only. Also just removed the guest.css and have all details in server.css and all looks fine (excl the favicon) |
please read ^^ : #5036 (comment) because overwrite the custom css code .. so why mus rename the style.css if it mus be only setting up in the code and use behind the default design. best regards |
Thanks io-node. Thats strange because i see my favicon ... |
When I check the code it states |
Good catch. I've adjusted the pull request to that. @io-node I cannot reproduce that. Maybe the url is cached somewhere. |
It is strange, I done a "Emtpy Cache and Hard Reload" in Chrome, and still goes to the default favicon. Not giving up yet :) |
#body-login {background-image: url(https://blackysgate.net/test/core/img/background.jpg?v=0);}
/*this is bad ! this is to overwriting , i have color if you see at bottom,
but the picture it is over all, and this is bad ! if i disable that do i see the colors from back
i have try with :
#body-login { background-image: url();}
but it works not !
*/
#header .logo {
background-image: url('../img/logo.png');
}
#body-login {
/* Permalink - use to edit and share this gradient:
http://colorzilla.com/gradient-editor/#001659+0,7a7a7a+72,aaaaaa+100 */
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#0079c4+0,353535+39,000000+100 */
background: rgb(0,121,196); /* Old browsers */
background: -moz-linear-gradient(top, rgba(0,121,196,1) 0%, rgba(53,53,53,1) 39%, rgba(0,0,0,1) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgba(0,121,196,1) 0%,rgba(53,53,53,1) 39%,rgba(0,0,0,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(0,121,196,1) 0%,rgba(53,53,53,1) 39%,rgba(0,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0079c4', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
} ``` |
That doesn't change the favicon of the browser-tab. I have now been able to fix it. It seems, during testing, I disabled the Theming app. Once I enabled the Theming app it did generate the correct favicon link. |
if i have the theming app enabled i got this: if i disable the theming app i got this: |
oky, i have disable the themeingapp too, and the backgroundpicture it is away, so 2 things, disable theme-app (woh it exist a theme app?!) and rename the style.css to server.css .. |
For me to get my theme to work again was:
|
na, the theme-app must not work, but the changing the name of the style.css and what it is with the icons.. i have custom upload png and something.. like it looks .. |
It would have been good to have known this in advance of this change, so people could have prepared this better and incorporate it into the upgrade process, so they don't loose their own theme. |
++1 |
The theming app has been created for a reason. Custom themes were breaking on update since ages 😉 But yes, this should be states somewhere in the changelog so people are aware of this before upgrading. |
I also noticed a problem with custom mail notification templates for the activity app. I have a custom theme and a custom mail template for the activity app under /themes/<custom_theme>/apps/activity/templates/email.notification.php This templates was correctly used with NC11. After the upgrade to NC12, I get the default mail notifications. |
imho should it reedit the line where it is fixed as server.css back to style.css Ben you right, i say +1 also should programmed in, if setting up a theme in config.php, should the theme-app automatical disable ! best regards |
@BenS89 Can you open a separate issue for that? @blackcrack This is because the number of css files requested with Nc12 has been reduced by using a combined server.css file. I see no change for adding a fallback to old files, but you can basically add a server.css file to your theme that just includes all your old css files. |
i have see the scss files and the "@include" the files, i have try it with best regards und liebe Grüße |
I have now also noticed that the favicon only works on the login page, not when a user is logged in: Scenario 1:
Result = favicon comes from themes folder Scenario 2:
Result = favicon comes from default core folder |
Hi, there is just another problem on my NC12 installation. In my mail template is the default icon used, not my custom icon i use in the custom theme. Where can i change this? Is this the same problem? Is it necessary to rename the css file in the mail template too? Where can i find the mail template? |
@phatair See nextcloud/activity#160 @io-node I cannot reproduce the wrong favicon here. In case it still exists, can you open a separate bug report for that? |
@juliushaertl it seems I am unable to reproduce the issue with the favicon. I assume it had something to do with caching. At least I have tried it few times and as for now the favicon is working as expected. |
Hi, thats funny - juliushaertl linked me to nextcloud/activity#160 and nickvergessen linked me back to this issue :-) The problem is still the same - in my mail notification is used the default "custom cloud" logo and not my own logo. How can i change the logo in the mail notification? The logo in the mail notification is linked to: I replaced the logo.png with my logo.png. But the logo is still the "custom cloud" logo. Thanks for your help. |
Fixed in #5061 |
So what about 12.0.1? :) |
I have the same issue on 13.0.1 |
Steps to reproduce
Expected behaviour
Expect background on login page to change
Actual behaviour
Default NC background is shown
Also original core/css file structure has changed. The example theme folder is also not consistent as the file /themes/example/core/css/styles.css is not equal to /core/css/styles.scss
Server configuration
Operating system: Debian 16.04
Web server: Apache 2.4.18
Database: MySQL 5.5.53
PHP version: 7.0.15
Nextcloud version: 12.0.0
Updated from an older Nextcloud/ownCloud or fresh install: Upgrade from 12.0.0RC3
Where did you install Nextcloud from: NC website
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
Disabled:
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "occ3bgzu13dp",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"cloud.domain.tld",
"192.168.7.245"
],
"forwarded_for_headers": [
"HTTP_X_FORWARDED",
"HTTP_FORWARDED_FOR"
],
"datadirectory": "/media/nextcloud",
"overwrite.cli.url": "https://cloud.domain.tld",
"dbtype": "mysql",
"version": "12.0.0.29",
"dbname": "nextcloud",
"dbhost": "192.168.7.244",
"dbtableprefix": "nc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"trusted_proxies": [
"192.168.7.241",
"127.0.0.1"
],
"overwriteprotocol": "https",
"overwritehost": "cloud.domain.tld",
"overwritewebroot": "/",
"overwritecondaddr": "^192\.168\.7\.[1-254]$",
"mail_from_address": "cloud",
"mail_smtpmode": "smtp",
"mail_domain": "domain.tld",
"memcache.local": "\OC\Memcache\Redis",
"filelocking.enabled": true,
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379
},
"maintenance": false,
"log_type": "owncloud",
"logfile": "/var/log/nextcloud.log",
"loglevel": "2",
"log_rotate_size": "104857600",
"mail_smtpauthtype": "PLAIN",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"htaccess.RewriteBase": "/",
"htaccess.IgnoreFrontController": true,
"updater.server.url": "https://updates.nextcloud.org/updater_server/",
"filesystem_check_changes": 1,
"enable_previews": true,
"preview_max_x": 800,
"preview_max_y": 800,
"preview_max_scale_factor": 4,
"skeletondirectory": "/media/nextcloud/skeleton",
"session_keepalive": true,
"activity_expire_days": 365,
"theme": "theme name",
"mail_smtpsecure": "tls",
"enabledPreviewProviders": [
"OC\Preview\PNG",
"OC\Preview\JPEG",
"OC\Preview\GIF",
"OC\Preview\BMP",
"OC\Preview\XBitmap",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown",
"OC\Preview\PDF"
],
"asset-pipeline.enabled": true,
"share_folder": "/Shares"
}
}
Are you using external storage, if yes which one: SMB
Are you using encryption: no
Are you using an external user-backend, if yes which one: N/A
Client configuration
Browser: Google Chrome 58.0.3029.96
Operating system: Debian 8
Logs
Logs don't show any issues regarding theming.
The text was updated successfully, but these errors were encountered: