Skip to content
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

Personnalisation du theme #264

Open
Gaetanbrl opened this issue Jul 19, 2023 · 0 comments
Open

Personnalisation du theme #264

Gaetanbrl opened this issue Jul 19, 2023 · 0 comments

Comments

@Gaetanbrl
Copy link
Contributor

Gaetanbrl commented Jul 19, 2023

Description

En tant qu'administrateur, je souhaiterai pouvoir modifier les couleurs à partir d'un thème disponible (ou personnalisé) afin d'avoir un rendu graphique qui me convient

Solution technique

L'idée est de reprendre le fonctionnement mviewer avec un thème par défaut :

https://github.com/mviewer/mviewer/blob/1f655de1c93a614d1db20b4ba804f27927a98a8e/index.html#L629-L634

Dans studio, il faudrait alors pouvoir ajouter dans le config.json ou dans l'URL le nom du thème ou l'URL vers le CSS du thème directement.

Ce code serait à intégrer dans le fichier mviewestudio.js à l'ouverture de la configuration.

Le code à utiliser serait du type :

... ajouter un paramètre :

"theme": "css/theme/citrus.css",

  • dans le fichier js/mviewerstudio.js :

https://github.com/mviewer/mviewerstudio/blob/master/js/mviewerstudio.js#L24

_conf = data.app_conf;
const themeUrl = API.theme ? API.theme : (_conf.theme || "theme/default.css");
$('head').prepend(`<link rel="stylesheet" href="${themeUrl }" type="text/css" />`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant