Why did Polymer remove the hosted script and link from their site? - html

Recently I came to add some Paper-Elements to my web and I did not find hosted script and link for their Elements. I'm really lazy to upload all js and css files to my web. So is there any reason for Polymer to remove the hosted links in their latest version? Or did they not remove it?

Not sure why they removed or did anything to it, but you can use http://polygit.org/.
<script src="https://rawgit.com/webcomponents/webcomponentsjs/master/webcomponents.js"></script>
<base href="http://polygit.org/polymer:+v1.1.0/components/">
<link rel="import" href="polymer/polymer.html">
...
and for production deploy I'd suggest vulcanizing it: https://github.com/polymer/vulcanize .

Related

Github not loading css file when deployed by github pages

I was working on a preview card component and when I uploaded my code to a repo to deploy it, github doesn't seem to load my css file style.
note: not my first time to deploy on github pages.
thanks in advance!
repo link: https://github.com/HanyAyad/Stats-preview-card-component-
live-website link on github pages: https://hanyayad.github.io/Stats-preview-card-component-/
same website deployed on netlify (working fine): https://62116b02da6915993f04d79c--suspicious-hypatia-156ece.netlify.app/
Maybe because the folder is CSS/styles.css and your declaration in index.html is css/styles.css?
I just tested here and when importing your CSS file, you are using
<link rel="stylesheet" href="css/style.css">
when you should be using
<link rel="stylesheet" href="CSS/style.css" >
URLs may be case-sensitive, it depends on what file system you are running your website.
Try renaming the folder CSS to css.
The directory in your repo is named CSS and not css as expected. So, please rename the directory.
It only works on Netlify because it doesn't take casing into account, for some reason. (That is, https://62116b02da6915993f04d79c--suspicious-hypatia-156ece.netlify.app/CsS/sTyLe.css works fine.)

When I providing FontAwesome http link then icons are working but when host it locally its not working

When I provide cnd link:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
Then its showing icons and working fine.
Here is code jsfiddle
When I copy and host the same css file locally then its not working
Here is example jsfiddle code
Why its not working when I host locally? Is there any restrictions or license problem?
Thanks
I guess you are using a CDN network instead of Font Awesome's kit code. If that's the case, I'd recommend you using the Kit code of your kit. That'll help you in showing icon on your site, locally or hosted doesn't matter.
The fix I found is to save this css file locally and edit it. <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
Find url and replace ../ to ../../ because my web font folder location was assets/webfonts not root

How would I reference MDbootstrap stylesheet in html

I am aware that in HTML the way to reference stylesheets is something along these lines:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" >
But what is the stylesheet reference for MDboostrap. I have looked all over the website and I can't find it and the website says that all the resources are free. Have I got to install something?
I did a quick research and I could find that you can download MDBoostrap or use the CDN. Links bellow:
Download page: https://mdbootstrap.com/docs/jquery/getting-started/download/
CDN examples: https://mdbootstrap.com/md-bootstrap-cdn/

github pages doesn't display css for index.html but display for others

I read different questions on stackoverflow regarding this issue but i haven't got any solution for my case, the rest of my pages are displaying css well, but index.html doesn't display.
But surprisingly when i run my project locally it works very well.
What am i missing?
My github pages link :
https://huxaiphaer.github.io/-Ride-My-Way/index.html
My github project link , in the branch gh-pages:
https://github.com/huxaiphaer/-Ride-My-Way/tree/gh-pages
Your href was wrong for your css import. You were navigating up more folder.
<link rel="stylesheet" type="text/css" media="screen" href="UI/css/index.css">

Can't load angular or CSS file on Digital Ocean

I am completely new to Digital Ocean. I have a Ubuntu droplet set up on digital ocean and am able to access my index.html file on port 80. My app is set up as a single page application using angular routing.
It loads the navbar and seems to be loading bootstrap...but both angular and my own css file are not loading. I initially thought it was a problem with my bower installing angular dependencies, but even just my local css file is not being attached. My css file is included with:
<link rel="stylesheet" href="css/style.css" type="text/css"/>
For some reason bootstrap seems to be working though:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
Any tips or suggestions on what the problem might be? I'm completely lost.
The hrefs in all your links are set up to work in your local environment, but not on digital ocean. Bootstrap works because you are linking to an external url on a CDN.
You'll have to work through all the relative links in your hrefs. There are numerous approaches to this, including embedding the entire server path.
I'm not certain but it might be enough to replace href="css/style.css" with href="/css/style.css" to get a root relative path.
You should first load your styles to Digital Ocean and link to them.
Here - href="css/style.css" - you use local path, which you have to replace with a URL of file on virtual machine.