mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Propagate previous changes to other themes
This commit is contained in:
parent
36fd40fa91
commit
b28d4ee5d7
13 changed files with 175 additions and 29 deletions
17
portal/assets/themes/clouds/custom_overlay.css
Normal file
17
portal/assets/themes/clouds/custom_overlay.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file may contain extra CSS rules loaded on all apps page (*if* the app
|
||||
nginx's conf does include the appropriate snippet) for the small YunoHost
|
||||
button in bottom-right corner + portal overlay.
|
||||
|
||||
The yunohost button corresponds to : #ynh-overlay-switch
|
||||
The yunohost portal overlay / iframe corresponds to : #ynh-overlay
|
||||
|
||||
BE CAREFUL that you should *not* add too-general rules that apply to
|
||||
non-yunohost elements (for instance all 'a' or 'p' elements...) as it will
|
||||
likely break app's rendering
|
||||
===============================================================================
|
||||
*/
|
||||
#ynh-overlay-switch {
|
||||
background-image: url("./cloud.png");
|
||||
}
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file contain extra CSS rules to customize the YunoHost user portal and
|
||||
can be used to customize app tiles, buttons, etc...
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/* Make page texts black */
|
||||
.user-container h2,
|
||||
.user-container small,
|
||||
|
@ -9,8 +16,6 @@ a.app-tile,
|
|||
color: black !important;
|
||||
}
|
||||
|
||||
/* The layout is slightly different, the apps are scollable but not the headers and footers */
|
||||
|
||||
.ynh-user-portal {
|
||||
background-image: url("background.jpg");
|
||||
background-repeat: no-repeat;
|
||||
|
@ -36,7 +41,3 @@ a.app-tile,
|
|||
z-index: 10;
|
||||
background-image: url("./cloud.png");
|
||||
}
|
||||
|
||||
#ynh-overlay-switch {
|
||||
background-image: url("./cloud.png");
|
||||
}
|
33
portal/assets/themes/clouds/custom_portal.js
Normal file
33
portal/assets/themes/clouds/custom_portal.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This JS file may be used to customize the YunoHost user portal *and* also
|
||||
will be loaded in all app pages if the app nginx's conf does include the
|
||||
appropriate snippet.
|
||||
|
||||
You can monkeypatch init_portal (loading of the user portal) and
|
||||
init_portal_button_and_overlay (loading of the button and overlay...) to do
|
||||
custom stuff
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
* Monkeypatch init_portal to customize the app tile style
|
||||
*
|
||||
init_portal_original = init_portal;
|
||||
init_portal = function()
|
||||
{
|
||||
init_portal_original();
|
||||
// Some stuff here
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Monkey patching example to do custom stuff when loading inside an app
|
||||
*
|
||||
init_portal_button_and_overlay_original = init_portal_button_and_overlay;
|
||||
init_portal_button_and_overlay = function()
|
||||
{
|
||||
init_portal_button_and_overlay_original();
|
||||
// Custom stuff to do when loading inside an app
|
||||
}
|
||||
*/
|
|
@ -2,7 +2,7 @@
|
|||
===============================================================================
|
||||
This file may contain extra CSS rules loaded on all apps page (*if* the app
|
||||
nginx's conf does include the appropriate snippet) for the small YunoHost
|
||||
button in bottom-right corner + portal overlay.
|
||||
button in bottom-right corner + portal overlay.
|
||||
|
||||
The yunohost button corresponds to : #ynh-overlay-switch
|
||||
The yunohost portal overlay / iframe corresponds to : #ynh-overlay
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
.app-tile:focus:after,
|
||||
.app-tile:hover:after,
|
||||
.app-tile:focus:before,
|
||||
.app-tile:hover:before {
|
||||
background:var(--background-color, red) !important;
|
||||
}
|
14
portal/assets/themes/random/custom_overlay.css
Normal file
14
portal/assets/themes/random/custom_overlay.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file may contain extra CSS rules loaded on all apps page (*if* the app
|
||||
nginx's conf does include the appropriate snippet) for the small YunoHost
|
||||
button in bottom-right corner + portal overlay.
|
||||
|
||||
The yunohost button corresponds to : #ynh-overlay-switch
|
||||
The yunohost portal overlay / iframe corresponds to : #ynh-overlay
|
||||
|
||||
BE CAREFUL that you should *not* add too-general rules that apply to
|
||||
non-yunohost elements (for instance all 'a' or 'p' elements...) as it will
|
||||
likely break app's rendering
|
||||
===============================================================================
|
||||
*/
|
13
portal/assets/themes/random/custom_portal.css
Normal file
13
portal/assets/themes/random/custom_portal.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file contain extra CSS rules to customize the YunoHost user portal and
|
||||
can be used to customize app tiles, buttons, etc...
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
.app-tile:focus:after,
|
||||
.app-tile:hover:after,
|
||||
.app-tile:focus:before,
|
||||
.app-tile:hover:before {
|
||||
background:var(--background-color, red) !important;
|
||||
}
|
|
@ -1,3 +1,14 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This JS file may be used to customize the YunoHost user portal *and* also
|
||||
will be loaded in all app pages if the app nginx's conf does include the
|
||||
appropriate snippet.
|
||||
|
||||
You can monkeypatch init_portal (loading of the user portal) and
|
||||
init_portal_button_and_overlay (loading of the button and overlay...) to do
|
||||
custom stuff
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
var ynhLib = {
|
||||
|
||||
|
@ -75,10 +86,6 @@ var ynhLib = {
|
|||
return fullQueue;
|
||||
},
|
||||
|
||||
onWindowLoad: function(func){
|
||||
window.onload = ynhLib.queue(window.onload, func);
|
||||
},
|
||||
|
||||
//
|
||||
// SET APP ICON STYLE
|
||||
|
||||
|
@ -106,20 +113,33 @@ var ynhLib = {
|
|||
// ######################################################################
|
||||
// ######################################################################
|
||||
|
||||
ynhLib.onWindowLoad(function () {
|
||||
/* Monkeypatch init_portal to customize the app tile style */
|
||||
init_portal_original = init_portal;
|
||||
init_portal = function()
|
||||
{
|
||||
init_portal_original();
|
||||
|
||||
// set apps colors
|
||||
Array.each(document.getElementsByClassName("app-tile"), ynhLib.set_app_tile_style);
|
||||
// set apps colors
|
||||
Array.each(document.getElementsByClassName("app-tile"), ynhLib.set_app_tile_style);
|
||||
|
||||
// log color css string
|
||||
var chosenLogoStyleString = ynhLib.logo.makeLogoStyleString();
|
||||
// log color css string
|
||||
var chosenLogoStyleString = ynhLib.logo.makeLogoStyleString();
|
||||
|
||||
// set logo color in portal
|
||||
var ynhLogo = document.getElementById("ynh-logo");
|
||||
if (ynhLogo) ynhLogo.setAttribute("style", chosenLogoStyleString);
|
||||
// set logo color in portal
|
||||
var ynhLogo = document.getElementById("ynh-logo");
|
||||
if (ynhLogo) ynhLogo.setAttribute("style", chosenLogoStyleString);
|
||||
}
|
||||
|
||||
// set overlay switch color in apps (NOTE: this is not always working, there is probably a problem of loading order)
|
||||
var overlaySwitch = document.getElementById("ynh-overlay-switch");
|
||||
if (overlaySwitch) overlaySwitch.setAttribute("style", chosenLogoStyleString);
|
||||
/*Monkey patching example to do custom stuff when loading inside an app */
|
||||
init_portal_button_and_overlay_original = init_portal_button_and_overlay;
|
||||
init_portal_button_and_overlay = function()
|
||||
{
|
||||
init_portal_button_and_overlay_original();
|
||||
|
||||
});
|
||||
// log color css string
|
||||
var chosenLogoStyleString = ynhLib.logo.makeLogoStyleString();
|
||||
|
||||
// set overlay switch color in apps (NOTE: this is not always working, there is probably a problem of loading order)
|
||||
var overlaySwitch = document.getElementById("ynh-overlay-switch");
|
||||
if (overlaySwitch) overlaySwitch.setAttribute("style", chosenLogoStyleString);
|
||||
}
|
14
portal/assets/themes/vapor/custom_overlay.css
Normal file
14
portal/assets/themes/vapor/custom_overlay.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file may contain extra CSS rules loaded on all apps page (*if* the app
|
||||
nginx's conf does include the appropriate snippet) for the small YunoHost
|
||||
button in bottom-right corner + portal overlay.
|
||||
|
||||
The yunohost button corresponds to : #ynh-overlay-switch
|
||||
The yunohost portal overlay / iframe corresponds to : #ynh-overlay
|
||||
|
||||
BE CAREFUL that you should *not* add too-general rules that apply to
|
||||
non-yunohost elements (for instance all 'a' or 'p' elements...) as it will
|
||||
likely break app's rendering
|
||||
===============================================================================
|
||||
*/
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This file contain extra CSS rules to customize the YunoHost user portal and
|
||||
can be used to customize app tiles, buttons, etc...
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/* ==========================================================================
|
||||
Vaporwave theme
|
||||
========================================================================== */
|
33
portal/assets/themes/vapor/custom_portal.js
Normal file
33
portal/assets/themes/vapor/custom_portal.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
===============================================================================
|
||||
This JS file may be used to customize the YunoHost user portal *and* also
|
||||
will be loaded in all app pages if the app nginx's conf does include the
|
||||
appropriate snippet.
|
||||
|
||||
You can monkeypatch init_portal (loading of the user portal) and
|
||||
init_portal_button_and_overlay (loading of the button and overlay...) to do
|
||||
custom stuff
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
* Monkeypatch init_portal to customize the app tile style
|
||||
*
|
||||
init_portal_original = init_portal;
|
||||
init_portal = function()
|
||||
{
|
||||
init_portal_original();
|
||||
// Some stuff here
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Monkey patching example to do custom stuff when loading inside an app
|
||||
*
|
||||
init_portal_button_and_overlay_original = init_portal_button_and_overlay;
|
||||
init_portal_button_and_overlay = function()
|
||||
{
|
||||
init_portal_button_and_overlay_original();
|
||||
// Custom stuff to do when loading inside an app
|
||||
}
|
||||
*/
|
Loading…
Add table
Reference in a new issue