How to change or modify a default theme


#1

Hi Cornelius!
Could you please shed some light on the topic of how to change the default
theme?
I know there’s a
doc http://privacyidea.readthedocs.org/en/latest/installation/system/inifile.html?highlight=bootstrap
which says that this is pretty simple, just specify a path to your
bootstrap theme in PI_CSS and that’s it.

I tried to place a file called “bootstrap.css” taken
from http://bootswatch.com/ to the newly created
privacyidea/static/custom/css/ folder then specify
PI_CSS =
’/usr/lib/python2.7/dist-packages/privacyidea/static/custom/css/bootstrap.css
then issued
service nginx restart
this didn’t affect the look of PI but I checked source of a web-page:

1) seems that PI ignored the PI_CSS setting because I specified one path but in html code is another 2) There are two .css files being used - bootstrap.css and bootstrap-theme.css . Which one should be taken and maybe replaced from http://bootswatch.com/? Which one suppose to be replaced with the one specified in PI_CSS?

#2

Awesome!
Thank you for help! Indeed, I was needed to restart uwsgi service.On Wednesday, February 3, 2016 at 4:22:16 PM UTC+2, Cornelius Kölbel wrote:

HI Sergey,

the 2nd stylesheet is the theme stylesheet and is set according to the
settings.
See the template:

https://github.com/privacyidea/privacyidea/blob/master/privacyidea/static/templates/header.html#L21

This is set in the controller:

https://github.com/privacyidea/privacyidea/blob/v2.9/privacyidea/webui/login.py#L46

But your issue arises from the fact, that you do not need to restart
nginx (as this only works as a proxy) but you probably need to restart
uwsgi.

Kind regards
Cornelius


#3

Glad to be of help and that it works out! :-)Am Mittwoch, den 03.02.2016, 06:32 -0800 schrieb Sergey Kolosovski:

Awesome!
Thank you for help! Indeed, I was needed to restart uwsgi service.

On Wednesday, February 3, 2016 at 4:22:16 PM UTC+2, Cornelius Kölbel wrote:
HI Sergey,

    the 2nd stylesheet is the theme stylesheet and is set
    according to the 
    settings. 
    See the template: 
    https://github.com/privacyidea/privacyidea/blob/master/privacyidea/static/templates/header.html#L21 
    
    This is set in the controller: 
    https://github.com/privacyidea/privacyidea/blob/v2.9/privacyidea/webui/login.py#L46 
    
    But your issue arises from the fact, that you do not need to
    restart 
    nginx (as this only works as a proxy) but you probably need to
    restart 
    uwsgi. 
    
    Kind regards 
    Cornelius 


Please read the blog post about getting help
https://www.privacyidea.org/getting-help/.

For professional services and consultancy regarding two factor
authentication please visit
https://netknights.it/en/leistungen/one-time-services/

In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
https://netknights.it/en/leistungen/service-level-agreements/

You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
Visit this group at https://groups.google.com/group/privacyidea.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/e5ed5cef-616e-4313-af55-191d6e1fcb23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH


Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)


#4

HI Sergey,

the 2nd stylesheet is the theme stylesheet and is set according to the
settings.
See the template:

This is set in the controller:

But your issue arises from the fact, that you do not need to restart
nginx (as this only works as a proxy) but you probably need to restart
uwsgi.

Kind regards
CorneliusAm Mittwoch, den 03.02.2016, 05:43 -0800 schrieb Sergey Kolosovski:

Hi Cornelius!
Could you please shed some light on the topic of how to change the
default theme?
I know there’s a
doc http://privacyidea.readthedocs.org/en/latest/installation/system/inifile.html?highlight=bootstrap which says that this is pretty simple, just specify a path to your bootstrap theme in PI_CSS and that’s it.

I tried to place a file called “bootstrap.css” taken
from http://bootswatch.com/ to the newly
created privacyidea/static/custom/css/ folder then specify

PI_CSS =
’/usr/lib/python2.7/dist-packages/privacyidea/static/custom/css/bootstrap.css

then issued
service nginx restart
this didn’t affect the look of PI but I checked source of a web-page:

  1. seems that PI ignored the PI_CSS setting because I specified one
    path but in html code is another
  2. There are two .css files being used - bootstrap.css
    and bootstrap-theme.css. Which one should be taken and maybe replaced
    from http://bootswatch.com/? Which one suppose to be replaced with
    the one specified in PI_CSS?


Please read the blog post about getting help
https://www.privacyidea.org/getting-help/.

For professional services and consultancy regarding two factor
authentication please visit
https://netknights.it/en/leistungen/one-time-services/

In an enterprise environment you should get a SERVICE LEVEL AGREEMENT
which suites your needs for SECURITY, AVAILABILITY and LIABILITY:
https://netknights.it/en/leistungen/service-level-agreements/

You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
Visit this group at https://groups.google.com/group/privacyidea.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/2144da51-3109-459f-99ac-e997a349a628%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH


Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)


#5

Good afternoon:
I have a problem when I change the default theme.
I’ve downloaded the Sketchy theme from https://bootswatch.com
I copied it at: /static/custom/css/bootstrap-Sketchy.css

Then I modified the file pi.cfg
/etc/privacyidea/pi.cfg

Adding the following:
PI_CSS = ‘/static/custom/css/bootstrap-Sketchy.css’
I have also tried like this:
#PI_CSS = ‘/opt/privacyidea/lib/python2.7/site-packages/privacyidea/static/custom/css/bootstrap-Sketchy.css’

In principle it seems that the theme is loaded and displayed correctly, but links do not work, when you pass over a link or active element, the cursor is not modified and you can not click on it, you can not select anything.

<!DOCTYPE html>
<html ng-app="privacyideaApp">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Cornelius Kölbel" >
    <link rel="icon" href="../../favicon.ico">
    <!-- Custom styles for this template -->
    <link href="/static/css/signin.css" rel="stylesheet">
    <link href="/static/contrib/css/animate.css" rel="stylesheet">
    <link href="/static/css/navbar-fixed-top.css" rel="stylesheet">
    <link href="/static/contrib/css/angular-multi-select.css"
          rel="stylesheet"/>
    <link href="/static/contrib/css/angular-inform.css"
          rel="stylesheet"/>
    <link href="/static/contrib/css/hotkeys.min.css"
          rel="stylesheet"/>
    <link href="/static/contrib/css/bootstrap.css" rel="stylesheet">
    <link href="/static/custom/css/bootstrap-Sketchy.css" rel="stylesheet"/>

    <script type="application/javascript">
        // Pass the browser Language to our Javascript code
        var browserLanguage = "es";
    </script>
    <title idle-disabled="true">privacyIDEA Authentication System</title>

I send a screenshot with the cursors indicating where active elements should appear.
image

Greetings and thank you.