So, I've been working on a modern, nice looking, easy on the eyes theme based on the Light theme but an issue I've run into is being unable to load fonts or images I've uploaded to my router. If I try to go directly to an image I'd like to use as a background, I'll just be redirected to the landing page for the router. This is the same with fonts.
I can get around this by using external sources (eg Imgur or Google's font server system), but I'd rather use local at all times; I don't like depending on 3rd parties if possible.
Does anyone know why I can't use local resources for my theme? Whats preventing me?
Can't load local resources for a custom theme, EG fonts
Moderator: Moderators
Re: Can't load local resources for a custom theme, EG fonts
Where are you putting them on the router, and how are you referencing them?
Please provide an example.
Also I'd suggest you base your theme on the new layout if you intend for it to become part of gargoyle
Please provide an example.
Also I'd suggest you base your theme on the new layout if you intend for it to become part of gargoyle
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Can't load local resources for a custom theme, EG fonts
I've tried /www/, /www/themes/, /www/themes/Light Themes/, /www/themes/Light Themes/images, and the /plugin_root/ version of those directories.
From my html element in common.css. background.png is currently in /plugin_root/www/themes/Light Theme/
I know this code works (the background loads) when loading a copy of the site from my machine, but the background does not download when loading from the router.
What new layout? By "based on" I mean I've used its codebase as a base. Visually it's rather different.
From my html element in common.css. background.png is currently in /plugin_root/www/themes/Light Theme/
Code: Select all
html
{
background: url("background.png");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-attachment: fixed;
padding: 0px;
margin: 0px;
border: 0px;
}
What new layout? By "based on" I mean I've used its codebase as a base. Visually it's rather different.
Re: Can't load local resources for a custom theme, EG fonts
Place image in
/www/themes/YOUR_THEME/images/YOUR_PICTURE.jpg
As for the new theme template, we can discuss that further if you tell me if you intend to submit this as a theme to the gargoyle repository or it is for personal use?
Otherwise it will be a large amount of explanation for not much gain.
/www/themes/YOUR_THEME/images/YOUR_PICTURE.jpg
Code: Select all
background: url("/themes/YOUR_THEME/images/YOUR_PICTURE.jpg");
As for the new theme template, we can discuss that further if you tell me if you intend to submit this as a theme to the gargoyle repository or it is for personal use?
Otherwise it will be a large amount of explanation for not much gain.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Can't load local resources for a custom theme, EG fonts
Currently the code that the entire theme is created from is still in the folder for the /Light Theme/ folder. My code should work as a simple look at my browsers network log in its dev tools shows it trying to load the png from the same folder as the css, but fails due to the redirect. Is there like a set list of "allowed" urls?
I have not renamed the folder simply because I don't have a name for it. Originally I was just planning on removing the ugly borders in certain tables. Then I wanted a better looking color pallet, and my wants kept growing from there.
I have no idea if I'll submit it to be included in the repo, but when I'm finally finished with the first version, I'll be hosting the code on github. An issue though is that I don't know the license for the background image, although I'm 90% sure that it's under a CC license or the GPL.
Plus, for an embedded system, its huge. Max size is 3200x200 at nearly 2 MB. Since I have, post install, about 8 MB of free storage on my router, I'm A-OK with using up about 1/4th of its space just for the theme's back ground.
The fonts I'm using are Noto Sans, Noto Sans Serif, and Oxygen Mono, all of which are under a copyleft license.
I have not renamed the folder simply because I don't have a name for it. Originally I was just planning on removing the ugly borders in certain tables. Then I wanted a better looking color pallet, and my wants kept growing from there.
I have no idea if I'll submit it to be included in the repo, but when I'm finally finished with the first version, I'll be hosting the code on github. An issue though is that I don't know the license for the background image, although I'm 90% sure that it's under a CC license or the GPL.
Plus, for an embedded system, its huge. Max size is 3200x200 at nearly 2 MB. Since I have, post install, about 8 MB of free storage on my router, I'm A-OK with using up about 1/4th of its space just for the theme's back ground.
The fonts I'm using are Noto Sans, Noto Sans Serif, and Oxygen Mono, all of which are under a copyleft license.
Re: Can't load local resources for a custom theme, EG fonts
Without having to figure out why it works this way, can't you just use the full reference?
It's not worth the time to figure it out when you can work around it in 5 seconds
It's not worth the time to figure it out when you can work around it in 5 seconds
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Can't load local resources for a custom theme, EG fonts
I've tried your suggestion, no change. Interesting tidbit, I tried changing the wait_icon.gif found in the ./images/ folder and *that* stopped loading as well. Same URL, different content. There is some check going on preventing use of new content beyond changing the CSS.
Generally if I'm going into my router (or one of my roommates), it's because net access has stopped working.
Online resources don't work in that instance, which just so happens to be the most common one (from my experience). Local is simply better and is worth the time to me.
Generally if I'm going into my router (or one of my roommates), it's because net access has stopped working.
Online resources don't work in that instance, which just so happens to be the most common one (from my experience). Local is simply better and is worth the time to me.
Re: Can't load local resources for a custom theme, EG fonts
Have you tried clearing cache and refreshing?
I didn't offer the advice without first testing it. It works.
I didn't offer the advice without first testing it. It works.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.