How to Dynamically apply our own custom themes in zk 8.5 - zk

I have made my own custom theme.
As i set this theme in zk.xml
<library-property>
<name>org.zkoss.theme.preferred</name>
<value>MYTheme</value>
</library-property>
the theme is being applied ,but as i will be creating My own multiple custom themes how do i choose it programitacally?

The available methods and a way to customize the theme resolution are described in our documentation on Switching Themes.
You can change the default theme for all users at runtime by setting the library property (after reloading the page the theme is applied):
Library.setProperty("org.zkoss.theme.preferred", "custom");
Executions.sendRedirect("");
To switch the theme for an individual user the following method sets a cookie (by default):
Themes.setTheme(Executions.getCurrent(), "custom");
Executions.sendRedirect("");
Robert

Related

Is it possible to access VS Codes theme properties programatically? Like, can a person use the VS Code API to change a theme color?

 
Programmatically Accessing VSCode Theme Properties
Is it possible to programmatically & dynamically get & set the colors of V.S. Code's theme property's using the V.S. Code API?
The snippet bellow demonstrates using The VSCode API, and its method, getConfiguration(), to change settings. I was hopping that something like this snippet would work from programmatically changing theme colors, but to no avail.
const workbenchConfig = vscode.workspace.getConfiguration('workspace');
const themeColor = workbenchConfig.get(`colorTheme.${themeProperty}`);
console.log(themeColor)
// The argument colorTheme.${someColor} would is obviously replaced with the
// theme's property that I want to access.
I wanted to access the same object that the workbench.ColorCustomizations setting accesses, using the snippet above. My thinking was that I could set the theme colors in the same scope, that is used by workbench.colorCustomizations setting, but my attempt was without success.
This has been a topic for a while. It depends where and how you want to use it. In webviews you can access theme colors as css variables as listed in the Theme Color reference and use them in your webview.
In the API you can get some workbench colors, like:
const wb_color = new vscode.ThemeColor ( 'activityBar.background' )
This is probably of limited use though. You can also get the theme kind (e.g. light, dark, high contrast) of the window with
const theme = window.activeColorTheme.kind
I am not aware of a proper way to set colors programmatically. Perhaps there are a few hackish solutions under the issue, dealing with this question here:
https://github.com/Microsoft/vscode/issues/32813

Why are the Luma Thema sample images from Magento2 sample data not visible when extending it to a custom theme?

I installed the Magento2 open source sample data and everything works fine. When I switch to the luma theme in the admin backend I can see everything. But when I create a custom theme based on luma theme the data/images is not visible anymore. What am I doing wrong? Should it be marked somewhere?
Ok, I figured it out. I had to make two sql queries in the database because it was a problem with the widgets assigned to the old theme:
UPDATE layout_link SET theme_id = '[CUSTOM_THEME_ID]'
UPDATE widget_instance SET theme_id = '[CUSTOM_THEME_ID]'

Customization of login screen is not working in Keycloak application?

provide configuration for customization of login page.
https://www.keycloak.org/docs/latest/server_development/index.html#_themes
Tried the above tutorial but its not working.
Do i need any permission for customization?
I wanted to change the logo, so I tried following the official tutorial, but it did not change. After all, I found that we should add few html lines containing the css class (resources/*.css) to display the logo instead of the default text. Steps below:
Select you Realm
Go to Realms Settings
Tab General
Fill the HTML Display Name field (by default it is blank) with the content having class kc-logo-text (login.css related) or your custom class (you can see the Master realm did it) in order to make the logo appeared.
Save
Tab Themes
Select your custom theme
Save
// For example:
HTML Display Name: <div class="kc-logo-text"><span>Keycloak</span></div>
Solution derived after I read https://lists.jboss.org/pipermail/keycloak-user/2019-September/019320.html

Liferay 7 Themes and AUI

I am having an issue with Liferay 7 Themes and AUI. First, it is my understanding each Liferay page is divided into sections, as defined here:
- https://dev.liferay.com/es/develop/tutorials/-/knowledge_base/6-2/setting-up-custom-css
And I must wrap any custom css with the appropriate wrapper, as defined in the above link. Any css defined in the theme applies to the appropriate section of the page, for all pages in the web application. I can also create custom wrappers within the theme, which individual portlets may reference using the 'com.liferay.portlet.css-class-wrapper' annotation.
I can therefore change the AUI Button's appearance by creating a css class and referring to it as follows:
< aui:button cssClass="btn-lg".../>
But it is less clear to me how I can apply custom css to AUI Data tables. Guidance is certainly appreciated.
You can use theme contributors.
And there create a .scss file and put customized styles for datatable there like :
.yui3-datatable{
& thead{
backgournd-color: red;
}
}
You can also use 'your-theme/css/custom.csss' to override default style with your custom styles.

Magento 2 with Porto theme Custom CSS from admin

Still learning Magento :)
I'm using Porto theme for my Magento 2 project and want to edit the css through:
Stores > Configuration > Porto > Porto - Settings Panel > Customization
They provided an area to put your css. But I'm not sure how to put image path for my background images background-image: url(???)
I don't think you'll be able to link to the background image as the static content renders a different URL when the contents are cleared (for example when you run php bin/magento setup:upgrade).
The best way to override or add CSS is by customizing the Porto theme's custom.css file in the Porto child theme. This way you can add a background image URL like ../images/foo.jpg.