How to add font-awesome to JsFiddle - jsfiddle

JsFiddle is my laboratory but everything is at a halt at the moment because I cant get font-awesome to work in it. I tried using the space provided for external links but to no avail. I even added the link directly and it still didn't work.
I'm in the middle of an experiment and I'm not able to get it working. What is the correct way to add font-awesome to JsFiddle?

Just paste the href part of the CDN link
//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css
to External Resourses (on the left hand side panel) and click the plus sign.
See this jsFiddle for example.

Check this JSFIDDLE out. It is using an cdn URL in the CSS area.
#font-face{
font-family:FontAwesome;
src:url(https://netdna.bootstrapcdn.com/font-awesome/2.0/font//fontawesome-webfont.eot?#iefix)

Import this script:
<script src="https://use.fontawesome.com/c3ef28c600.js"></script>
or
<script src="https://use.fontawesome.com/f83feeae10.js" ></script>
DEMO

Font Awesome 5
https://use.fontawesome.com/releases/v5.3.1/css/all.css
On the left sidebar of JSFiddle click Resources to open an input field.
Paste the above link into it.
Click the X button to add it to your fiddle.
For current versions and other options (free/pro versions etc) visit their info page on how to Use Font Awesome's Free CDN

Related

Can't use Bootstrap Icon in ASP.NET Core 6

I have installed Bootstrap icon like this link: https://icons.getbootstrap.com/#install
This is how I import the link and create the CSS file for Bootstrap Icon:
But then it still doesn't work. I still can't use the icon:
Did I do something wrong? Hope someone can explain this to me clearly because I am new to ASP.NET Core 6 and am still learning.
Thank you very much.
Here is a working demo:
Try to add the css into Views/Shared/_Layout.cshtml,or you can add it into the view you want to use the icons:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons#1.9.1/font/bootstrap-icons.css">
And then use the icons like this:
<i class="bi bi-train-front-fill"></i>
Then the result will be:
If you want a local Bootstrap Icon installation. Are the SVG files also available locally?
The Bootstrap icons are based on SVG files see link
https://getbootstrap.com/docs/5.2/extend/icons/#bootstrap-icons
"...While most icon sets include multiple file formats, we prefer SVG implementations for their improved accessibility and vector support..."
Therefore, the SVG files (over 1900) must be in the appropriate directory.
These can be downloaded via the ZIP file link
https://github.com/twbs/icons/releases/tag/v1.10.2

how to find out which component of Vue is being rendered in browser easily?

Table.vue contains Row.vue and Form.vue inside.
Wanted behavior:
Row of the table will say the component comes from Row.vue
I was right-clicking the Row and went on "View page source", "inspect" and explored, but I couldn't find the answer.
Any solutions?
Also it would be awesome if there's a tool that helps with what I explained above with visual like this: instead of margin, border and such. It would be like Table.vue, Row.vue, etc...
I'm sorry it's not clear to me what you're trying to achieve, but there is a browser-based tool that might help you with debugging. It is compatible with both v2 and v3 and can be installed on firefox or chromium-based browsers
https://devtools.vuejs.org/
use this icon to target the component

How do I link to a pdf in vue?

I'm trying to create a link on my vue app to local pdf files. Right now here's my problem.
My pdfs are located in assets/static/ and presently linking to them like this.
<template>
<div id="forms" class="view-wrapper">
<h3>Downloadable Forms</h3>
Claim Form
</div>
</template>
This brings up a link on the page, but when I click it, I'm taken to a blank page on my app with just the navbar and footer and nothing in between. I'm hoping to have it bring up the document in the browsers pdf viewer in another tab. Some help would be greatly appreciated.
Edit: SOLVED: #dan helped me realize that I just had to use one dot to access my assets folder.
To render a pdf in the browser use an <iframe src="path-to-pdf" />. Unless you're binding reactive data to the element you don't have to do anything different in vue. Check out https://stackoverflow.com/a/52644970/6890774 this is a similar issue.

Facebook Application Link and JS SDK

Hello guys I have two small questions about my facebook application link and JS SDK. So let me explain:
1- Well as I understood from Facebook JS SDK, the should be left just empty. But still I am a little dizzy and I want to make sure whether we should put our page content into it or it should be left empty?
Please make me sure about it.
2- I have put some changes in my css and markup of my page but after one day I can not see some of the changes in my facebook application link.
How can I see the result of changes if there is such a way??
Thank you very much indeed.
Let me answer this for you:
1) Yes, It should be left empty and here's the info on why it's required quoted from JS SDK docs:
The JavaScript SDK requires the fb-root element in order to load properly and a call to
FB.init to initialize the SDK with your app ID correctly.
The fb-root element must not be hidden using display: none or
visibility: hidden, or some parts of the SDK will not work properly in
Internet Explorer.
The SDK inserts elements into fb-root which expect to be positioned
relative to the body or relative to an element close to the top of the
page. It is best if the fb-root element is not inside of an element
with position: absolute or position: relative. If you must place the
fb-root element inside of a positioned element, then you should also
give it a position close to the top of the body or some parts of the
SDK may not work properly.
2) It's most probably a cache problem, there's a similar question with an issue of css which has been answered previously: Caching for css content for iphone FB APP
Also to get your browser/visitors browser to re-fetch your CSS file, The trick is to pass a query param/variable at the end of the CSS file url like so: ?v=1
<link rel="stylesheet" href="css/style.css?v=1">
This will automatically make your browser or maybe even facebook to fetch your CSS file again with the new changes. Make sure to change the number everytime you update your files so you could see the changes instantly.

colorbox with address bar

I am a javascript dummy. I downloaded colorbox and jquery. They work great. I followed tutorials and read the example code but I cant figure this out.
When I open a colorbox ,it opens to the correct url, I can then click links in the box and surf other sites. That is all great. I need to have the url show in a address block at the top of the window. When I use a java popup it will work fine. You can goto other urls and the address shows in the address bar at the top of the window.
So I assume that I can do it with colorbox. This would make my page look much better than a plain popup. Can this be done. here is my code.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script>
<script src="http://www.mysite.com/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" href="http://www.mysite.com/colorbox/colorbox.css" />
<script>
parent.jQuery.colorbox.close();
$(function ()
{
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
})
</script>
and my link to open the box
<a class='iframe' href="http://www.ebay.com">ebay </a></p>
If you chooes to help I beg you to show me where the new code go's. If you tell me to add a line of code I will not understand where to put it. I am trying hard to learn javascript but I am a very newbe. Thanks.
I don't think ColorBox is the right plugin for you to use, given its default design and your skill set. ColorBox is not designed to be "browser like" and let the user surf to other sites.
It is possible to change that design assumption, but it would require more advanced JS skills than you admit to.
Maybe you can achieve your aim by simply opening a new browser instance using a plain HTML anchor tag (<a>) and using the "target=" parameter.
Best,
KJM