i download foundation 5 font icons
and pest this unzipped files into my styles folder,
foundation-icons.eot
foundation-icons.woff
foundation-icons.ttf
foundation-icons.svg
foundation-icons.css
and svg folder
i link the foundation-icons.css
<link href="{stylesheet=styles/foundation-icons}" rel="stylesheet">
but when i call the icons, <i class="fi-battery-empty">helo icon bettery</i>
i end up with unshaped icons
all my css foundation icon styles are all linked properly but i only get a square box icon to all icons i link it in site
at the root of your site, create a fonts folder and unzip your foundation icons there, so you'll have it like this
fonts/foundation-icons
then at the head section of your site just do something like
<link rel="stylesheet" href="{site_url}fonts/foundation-icons/foundation-icons.css" />
That should work.
I don't think its necessary to put the foundation fonts css file inside your expressionengine templates, but even if you do, just make sure the file is pointing to the correct fonts directory
Related
Set relative path folder in Svelte build
When I build my svelte app with the command npm run build, it's export the links like this:
<script type="module" crossorigin src="/assets/index-54c7d896.js"></script>
<link rel="stylesheet" href="/assets/index-d3d038e5.css">
More accurately it call to the root localhost/assets...
// src="/assets/index-54c7d896.js"
// href="/assets/index-d3d038e5.css"
And I get this:
Error from the navigator
From here:
where I want use the svelte app
And easy solution is using a relative path to:
// from "/assets/..." to "./assets/..."
src="./assets/index-54c7d896.js"
href="./assets/index-d3d038e5.css"
But the thing is I can't do that inside javascript and css files.
These still use an absolute path.
So this is what happens:
when a css file call other files using absolute path
I mean I could dig into a compiled file but it's not efficient
I tried change manually the paths on each file but it's a lot of work each time than I have to compile.
I'm using a hosting with php so I tried using .htaccess but it's hard too.
I am expecting this to be configurable from svelte.
I really love ❤️ this framework, thanks in advance for your help.
i have a question.
Im working on a Project and i finished the Logic Part. So this was my first Project with Django and Web in generell. And my .html files are really really bad! So, now i want to change this. Work with a new Template and rework this a bit.
The first "base.html" was from W3Schools and now i want to use a bootstrap Theme. The Question is, how can i import the Files?
So i know that i have to put css,js Files into my static Folder and then import them into my base.html.
The Thing now is, that i have much Folders and Files. I have a css, img, js, scss and vendor Folder and some Files like package.json, gulpfile.js and stuff like that.
In these Folders are files like .css or .min.css, .js and .min.js, much scss Files and in the Vendor File are even more Folders with Files!
So the question now is, how can i import this good? That i dont destroy anything, which File should be in css, js and ?scss? dont know if i need a file for this in django! And how can i import them correct? Maybe anyone has an Example?
Would be really nice if someone can help me a bit with this!
Thanks!
For now, don't use any of those downloaded files, and use the hosted versions - it will be simpler. From Bootstrap's introduction:
Copy-paste the stylesheet <link> into your <head> before all other stylesheets to load our CSS.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
And:
Many of our components require the use of JavaScript to function. Specifically, they require jQuery, Popper.js, and our own JavaScript plugins. Place the following s near the end of your pages, right before the closing tag, to enable them. jQuery must come first, then Popper.js, and then our JavaScript plugins.
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
Note, you might not need the popper.min.js - read the instructions on that page.
Once you get that working, you could replace them with local files if you want. In the downloaded Bootstrap directory, they'll be in dist/css/ and dist/js/. You'll also need to download jQuery (or keep linking to it remotely).
FontAwesome makes adding editable icons into HTML fairly easy:
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<i class="fa fa-camera-retro"></i>
I have tried adding a FontAwesome icon to a Qt widget, but it doesn't show:
QPushButton *qB = new QPushButton("TXT");
qB -> setProperty("class", "fa fa-camera-retro");
How can I go about it to make it work with Qt widgets?
Qt doesn't work like that.
You need to create a qrc file and bundle FontAwesome to your project, like this:
<RCC>
<qresource prefix="/">
<file alias="FontAwesome.otf">FontAwesome.otf</file>
</qresource>
</RCC>
Then include it in the .pro file:
RESOURCES += resources.qrc
Then load it and use it, like this, providing the unicode character of the icon you intend to display:
if (QFontDatabase::addApplicationFont(":/FontAwesome.otf") < 0)
qWarning() << "FontAwesome cannot be loaded !";
QFont font;
font.setFamily("FontAwesome");
font.setPixelSize(32);
ui->pushButton->setFont(font);
ui->pushButton->setText("\uf083");
In your case, the camera icon code is indicated here
Result:
I'm looking to do the same with Qt5 and the last version of FontAwesome 5.x. After some research, I found a very simple class in GitHub for using Font Icon in Qt 5 and Qt 6 projects with QWidget. This class provides helpers to use Font awesome (v4.7, v5.15 and v6.0) and Google Material Icon (v4).
The code is very small and provides all the functions needed to display icons in QPushButton, QToolButton, etc.
Here, the GitHub link : https://github.com/philvl/ZFontIcon.
I saw someone in youtube working in a JBs IDE and had a index.html file opened. He created the <script src="main.js"></script> at the bottom of the page and the IDE recognized that main.js did not exists on the project file structure. The file changed into a blue link, he clicked main.js inside the <script> tag and the IDE created the file in the directory and opened the file in a new window for editing. That is a nice feature.
Does any one know how to set this up in JBs IDE?
I have just started on designing for Opencart. The page here says
OpenCart uses a "default theme fallback system". This means that if you are missing a file in your custom theme folder, it will search the main "default" theme folder for the file.
Now i have created a folder stylesheet inside my template folder with all the files in the default directory. All css files except the stylesheet.css loads from my directory.
What am I missing? I have checked the spelling of stylesheet.css and even re-created it many times but still it loads from default directory.
Can anyone help?
When OpenCart says that it falls back, it literally means the template folder, that is
/catalog/view/theme/your-theme-name/template/
The stylesheet folder is outside of that, so you would need to add that manually to your theme <head> if you want to include the default stylesheet
EDIT
If you want your stylesheet to be loaded, you need to edit the template in
/catalog/view/theme/your-theme-name/template/common/header.tpl
and change the path in there
< link rel="stylesheet" type="text/css"
href="catalog/view/theme/default/stylesheet/stylesheet.css" />
needs to be changed in header.tpl
I had copied it from the default directory