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

Theme: CSS link to the custom file #525

Closed
cynetix opened this issue Aug 5, 2016 · 8 comments
Closed

Theme: CSS link to the custom file #525

cynetix opened this issue Aug 5, 2016 · 8 comments
Labels

Comments

@cynetix
Copy link

cynetix commented Aug 5, 2016

If I wish to link to the logo.png inside the etc/webmin/authentic-theme directory from styles.css in the etc/webmin/authentic-theme directory, what's the relative path?

No matter what I try I can't seem to access it.

Many thanks.

@cynetix cynetix changed the title CSS Linking to Logo.png - Relative path from ? CSS Linking to Logo.png - Relative path from etc/webmin/authentic-theme directory? Aug 5, 2016
@iliajie
Copy link
Collaborator

iliajie commented Aug 5, 2016

What are you trying to do?

Obviously you will not be able to load it from etc directory.

Theme automatically does it and copies the logo to the theme's directory/images.

@cynetix
Copy link
Author

cynetix commented Aug 5, 2016

Qooob,

Yes we are just seeing that, I had assumed that was the correct directory based on the CSS file and the logo.png image. However I have located the image in the authentic-theme/images directory but I still can't link to it.

What I am trying to eventually do is add a background image to some CSS. I want to store that image with all the other images and link to it relatively so I can copy the CSS to other installs without having to change the absolute links if possible.

@cynetix
Copy link
Author

cynetix commented Aug 5, 2016

Sorry, I should clarify what I wrote.

I CAN link to logo.png, and any other file that's there, but I can't link to any new file I place in that directory.

@iliajie iliajie changed the title CSS Linking to Logo.png - Relative path from etc/webmin/authentic-theme directory? Theme: CSS link to the custom file Aug 5, 2016
@iliajie
Copy link
Collaborator

iliajie commented Aug 5, 2016

Do you only need background image?

Do you know that you could encode background-image url with base64 and thus not use any files?

Read more

@iliajie
Copy link
Collaborator

iliajie commented Aug 5, 2016

However, 18.08 will have this new feature:

  • Added ability to embed custom Perl scripts under /etc/webmin/authentic-theme/scripts.pm to be able to run arbitrary code that survives updates. The file scripts.pm must end with 1; to work successfully

In case it's not blamed with the team it will go to the next Webmin release.

@cynetix
Copy link
Author

cynetix commented Aug 5, 2016

Hi Qooob,

I have used the base64 approach which has allowed me to do what I needed. Thank you!

@cynetix cynetix closed this as completed Aug 5, 2016
@iliajie
Copy link
Collaborator

iliajie commented Aug 5, 2016

Sure, cool, no problem, pal! ;)

@iliajie
Copy link
Collaborator

iliajie commented Aug 5, 2016

Please update to 18.08.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants