Login page customization


#1

Hi,

Is there any way to customize the login page in ShinyProxy v2? With the 1.x version I could modify the templates/login.html in the jar. But in v2 there is no such a file.

Thanks.
Tibor


#2

Hi,
I found the lib/containerproxy.jar, which responsible for this. The good news: if we put the login.html (from that jar) to the template-path directory defined in application.yml (e.g. /etc/shinyproxy/templates/2col), we can customize the login-page “on-the-fly”, without restarting the shinyproxy.
Thanks OpenAnalytics, nice feature!
Plus: If we put the navbar.html one level up (relative to login.html) into the fragments directory (in my example: /etc/shinyproxy/templates/fragments/navbar.html) from the shinyproxy.jar, we can customize that too.
SuperNice feature!
Thanks again!..
Tibor


#3

@theja can you talk a little more where you found that login.html? Do I understand your structure correctly?

|- shinyproxy.jar
|- templates
   |- 2col
      |- index.html
      |- login.html

#4

Hi,

In shinyproxy-2.0.4.jar find the \BOOT-INF\lib\containerproxy-0.5.0.jar. In that jar there is the \templates\login.html.
Put this file to the directory what is defined in application.yml as “template-path”.

Tibor


#5

Found it, thank you.


#7

Note to self. login.html should be positioned like @theja mentioned, exactly where the template “base” is defined in the configuration.
For css, I placed login.css to .../2col/assets/css/login.css and used a new path in login.html:

<link rel="stylesheet" media="screen" th:href="@{/assets/css/login.css}"/>

#8

Note to self 2: I downloaded navbar.html from here and after modifying it, placed it into one folder as specified by @theja. Specifically, in application.xml I have template-path: ./04-custom-html-template/template/2col and I placed navbar.html into /fragments folder one folder above template-path.

|- shinyproxy_2.0.4.jar
|- 04-custom-html-template
   |- templates
     |+ 1col
     |+ 2col
     |- fragments
        |- navbar.html

I need to restart the server for changes to take effect.


Referencing from the Landing Page
#9

Is there a way to hide the navbar in certain Shiny Applications?

I have been able to modify the default navbar (after extracting and updating the jar file) but I found no way to hide it. I have several Shiny Applications and there are a few ones when the navbar should be hidden. In large applications, say, that already have some navbar with more details on it (messages, notifications, info and so forth) it would be great if I could hide the html-based navbar. In the meantime though, it would be great to have them at the top - especially where there is a little point in defining app-speciific header.

Best,

Tamas


#10

Hi @thomasthomas,
You can hide the navbar completely with the hide-navbar option (see https://www.shinyproxy.io/configuration/#general). Note that this is a general setting, so it will apply to all apps.


#11

Yeah, your right. But what I actually thought is that I would show the navbar at certain apps and hide it whenever its needed. It may sound like an unnecessary feature but I wonder how some of you handle this when you deploy small & large applications at the same time. For large apps, it sounds natural to build an app-specific navbar. For small apps though, it would be great to have a temlate and handle it through ShinyProxy rather than within the Shiny app.