Bundling Xenforo CSS File? - xenforo

Xenforo, the style file link is created as follows. Is it possible to optimize this as a single file?
<link async rel="stylesheet" href="https://***/css.php?css=public%3Anormalize.css%2Cpublic%3Afa.css%2Cpublic%3Acore.less%2Cpublic%3Aapp.less&amp ;s=9&l=8&d=1668370416&k=af056e1fb507ccfa25ecfcd7ee278a3aa6be64d0" />
I want to minify as a single file. Have you done it before? Do you have any plugin suggestions?

Related

Can't link local stylesheet on server?

I'm working on an HTML-based game using Node.js and I'm now working on the front end interface of it. I'm trying to link a CSS stylesheet, but I am getting a strange issue.
My folder structure is set up as follows:
C:\Users\myname\Documents\gamename, and within the gamename folder is the app.js file, and within client I have the index.html file to serve to the client. Within the client folder I also have the stylesheet, w3.css
Within the app.js I have the following line:
app.use('/client',express.static(__dirname + '/client'));
Inside index.html I have the following line:
<link rel="stylesheet" href='w3.css'>
However, when I run the server, it seems it cannot find the stylesheet. When I open the html file locally, it is able to find the CSS file.
Any ideas about how to fix this? I'm just using the link from W3schools that hosts the page, but I really need to edit and add my own parameters.
how did you tried to import your stylesheet in the link tag ?
did you write it something like that ?
<link rel="stylesheet" href="http://localhost:3000/client/w3.css" />
Use this in your app.js
app.use(express.static(__dirname + '/public'));
and add css like
<link rel="stylesheet" type="text/css" href="css/style.css" />
dont need / before css like
<link rel="stylesheet" type="text/css" href="/css/style.css" />
How can I include css files using node, express, and ejs?

Stylesheets aren't loading on sub-pages

Why isn't my HTML linking my CSS properly? using the Prologue template from html5up.com... In my main directory (I mean where index.html is) I created a subfolder for the different products I want to display. This folder contains a few files: 125st.html, 125stmain.css, and a folder called _notes created by Dreamweaver. Here is the code in the 125st.html that should be linking to the 125stmain.css:
<link rel="stylesheet" href="products/125st/125stmain.css" />
When I visit shercousa.com/products/125st/125st.html (It wont work for you, I've just tricked the hosts file to go to my local save instead of the live site while I work on it) it shows no CSS only the HTML. I just copied this line from the index.html file (which works) and changed the folder to try to direct it to the CSS clone I created. When this didn't work I tried copying and pasting the original line verbatim that works on the main site, but when linked in 125st.html still loads no CSS at all. I'm a bit new so sorry if I'm a bit hard to follow. I can elaborate or post any more code if anyone needs to see it.
Edit: Also my images are not loading, even the ones linked in the html file.
If i'm not wrong, this have an easy solution.
If you're on host/products/125st/125st.html and you linked CSS this way:
<link rel="stylesheet" href="products/125st/125stmain.css" />
What it's happening there is that your file 215st.html is trying to find: host/products/125st/125st.html/products7125st/125stmain.css
So you can either link your css with both this ways:
<link rel="stylesheet" href="/products/125st/125stmain.css" />
or
<link rel="stylesheet" href="125stmain.css" />
I hope this works for you :)
And sorry for my english!
Ga, I'm such a dope. There should be a slash in front of products like so:
<link rel="stylesheet" href="/products/125st/125stmain.css" />

How to import GSS files into GWT HTML file

Using this guide: http://www.gwtproject.org/articles/gss_migration.html I converted all my CSS files to GSS. 2 of my CSS were loaded via the entry point HTML file index.html:
<link type="text/css" rel="stylesheet" href="main.css">
<link type="text/css" rel="stylesheet" href="gwt.css">
Now that those 2 files are GSS files, how do I include them in the project? I tried simply doing those 2 lines above with the GSS files, and while they do get loaded, some things don't work properly, such as custom styling on checkboxes.
Am I doing this right? I'd like those 2 files above to have access to GSS features, but I feel like this type of import only sees the files as CSS files with the wrong extension.
No, I think you missed some important things.
GSS is a compile step with optimization and dead "code" removal. The be able to do this, you will have to create a Bundle and a GssResource. You cannot include it in the HTML-file. All is done vie interfaces in your code.
In you linked gss migration file, there is a chapter "Prerequisites".
Take a look at the ClientBundle tutorial.

I can't link css files to html is not working on eclipse

I downloaded some css template from the web, copied the folders containing the css files and pasted them in my project, i used their html code as well in order to test the page on the server. It just doesnt work and i went through all the steps on the internet to link css to html.
The css folder is inside WEB-INF, the jsp pages are inside web content, i can't yet post an image on the site so i'll hope you can picture the structure.
<link rel="stylesheet" href="/WEB-INF/css/animate.css" type = "text/css"/>
this is the link syntax i'm using copied from stackoverflow.com and even if i include the project name in the path, it still doesn't work.
Is the folder structures wrong ? or something with the link syntax ?
any help appreciated
change
href="/WEB-INF/css/animate.css"
to
href="/css/animate.css"
You don't need to write that... css, pages and images are usually put into the webcontent folder (as per practice).
I Think you have just to be simple and link your css like this:
This work in HTML, PHP
<link rel="stylesheet" type="text/css" href="css/animate.css" />
This is for ASP.NET
<link rel="stylesheet" type="text/css" runat="server" href="css/animate.css" />
I Hope it help!

Stylesheet link failure HTML/CSS

I've been working on a project with a HTML and an external CSS file. The link worked fine at school when i was doing it on adobe dreamweaver on a mac, but i sent both files home via dropbox, and the css doesnt seem to link with the html file. I believe i've got the file paths and everything right, but just to make sure:
<link rel="stylesheet" type="text/css" href="Desktop/Stylesheet.css" />
i also tried removing the "Desktop/" bit from the file directory, but it still didnt work. My Index file and Css file are both on my desktop. I am using windows. The same code worked at school, so i believe it might be something to do with with file location.
please help
Thanks in advance
This is how linking works,
Let's say your html file is in a folder named "xyz". Now when linking to css, the address is related to your html file's location. So if you mentioned
<link rel="stylesheet" type="text/css" href="Stylesheet.css" />
it would assume the css file is in the same folder as your html, while if you linked it as
<link rel="stylesheet" type="text/css" href="Desktop/Stylesheet.css" />
it would assume there is a folder named Desktop inside the folder xyz, and your css file is probably stored in Desktop.
Now im assuming you've simply placed both your html and css on your desktop directly, this is not good practice as you're probably going to move these files back to school as well. Hence I'd recommend you to place both in a folder and then link to your css with
<link rel="stylesheet" type="text/css" href="Stylesheet.css" />
and dont forget to pay attention to capitalization, yes html is non case sensitive but when it comes to linking external files, capitalization does matter.
Your directory structure should look as follows:
Root Directory
|
|-page.html
|-Desktop
|-StyleSheet.css
If it does not you need to modify your directory structure or change the href attribute on the link tag
If it is in the same directory simply set the path to href="Stylesheet.css"
The problem is with your file location .
If you are using Dreamweaver or any other code editor, simply browse to the path of the file to insert it in link href attribute, rather than manually entering the path .