atisawd / boxicons

High Quality web friendly icons
https://boxicons.com
MIT License
2.9k stars 289 forks source link

A template for usage with the web component instead of icon font requires some changes #547

Open linuxguist opened 1 year ago

linuxguist commented 1 year ago

Hi Atisa,

First of all, thank you very much for your contribution of boxicons to the world ! It is very useful indeed.

Secondly, some minor changes are required in the boxicons.js file to make it work.

Please check the revised file here : https://raw.githubusercontent.com/linuxguist/boxicons/main/boxicons-iv.js

in this file, the variable n is substituted 3 times, with my repository's location ( i.e. linuxguist ) and your web component template works well now. As my repository is just meant for one time testing, please revise your .js file too, similarly, to point to unpkg.com

Also, revise the example template like below:

<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>

<!-- Boxicons JS -->

<script src="https://cdn.jsdelivr.net/gh/linuxguist/boxicons@main/boxicons-iv.js" type="text/javascript"></script>

<!-- As link tag is used for .css files and script tag for .js files, please remove the following line
<link href='https://unpkg.com/boxicons@2.1.4/dist/boxicons.js' rel='stylesheet'>
-->

<title>Hello, Boxicons!</title>
</head>
<body>
<h1>Hello, Boxicons!</h1>
<box-icon name='hot'></box-icon>
<box-icon type='solid' name='hot'></box-icon>
<box-icon type='logo' name='facebook-square'></box-icon>
</body>
</html>

Thanks and Best Regards,

Nathan S.R.

atisawd commented 1 year ago

Thanks , i will check it out