Skip to content

Commit

Permalink
website - add icon set website button
Browse files Browse the repository at this point in the history
  • Loading branch information
spilymp committed May 28, 2021
1 parent 9a4c705 commit 9c2c897
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
15 changes: 15 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,19 @@ hr {

footer {
font-size: 0.8em;
}

.icon-set-website .column:nth-child(2) {
padding-right: 0rem;
}

.icon-set-website .column:nth-child(3) a {
padding: 0 !important;
width: 100%;
}

.icon-set-website .column:nth-child(3) a i {
padding-bottom: 0.3rem;
font-size: 2rem;
vertical-align: middle;
}
35 changes: 31 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@
document.getElementById("download").setAttribute("href", image);
}

function populateIconSetWebsite() {
switch (document.getElementById('iconSet').value) {
case "Font Awesome 5 Brands":
document.getElementById('iconSetWebsite').href = "https://fontawesome.com/icons?d=gallery&p=2&s=brands&m=free"
break;
case "bootstrap-icons":
document.getElementById('iconSetWebsite').href = "https://icons.getbootstrap.com/"
break;
case "simple-line-icons":
document.getElementById('iconSetWebsite').href = "https://simplelineicons.github.io/"
break;
case "remixicon":
document.getElementById('iconSetWebsite').href = "https://remixicon.com/"
break;
default:
document.getElementById('iconSetWebsite').href = "https://fontawesome.com/icons?d=gallery&p=2&s=solid&m=free"
break;
}
}

</script>

</head>
Expand Down Expand Up @@ -100,19 +120,26 @@ <h1>IBO - Icon Builder for Odoo</h1>
</div>
</div>

<div class="row">
<div class="column column-center">
<div class="row icon-set-website">
<div class="column column-center column-50">
<label for="iconSet">Icon Set</label>
</div>
<div class="column">
<select id="iconSet">

<div class="column column-40">
<select id="iconSet" onchange="populateIconSetWebsite()">
<option value="Font Awesome 5 Free">Font Awesome 5 Solid</option>
<option value="Font Awesome 5 Brands">Font Awesome 5 Brands</option>
<option value="bootstrap-icons">Bootstrap Icons</option>
<option value="simple-line-icons">Simple Line Icons</option>
<option value="remixicon">Remix Icon</option>
</select>
</div>

<div class="column">
<a href="https://fontawesome.com/icons?d=gallery&p=2&s=brands&m=free" id="iconSetWebsite" class="button button-outline" target="_blank">
<i class="fas fa-globe-europe"></i>
</a>
</div>
</div>

<div class="row">
Expand Down

1 comment on commit 9c2c897

@TadeuszKarpinski
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Please sign in to comment.