Skip to content

Commit

Permalink
viliusle#194 - config.js cleanup - moved icons to images/ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
viliusle committed Nov 22, 2020
1 parent b817035 commit 6d3ae4f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions images/icons/bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/icons/italic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions images/icons/strikethrough.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions images/icons/underline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/css/component.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@
display: block;
font-size: 1.6rem;
}
button img{
filter: var(--menu-icons-filter);
}

/****************\
| UI Input Group |
Expand Down
8 changes: 4 additions & 4 deletions src/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,19 @@ config.TOOLS = [
size: 40,
bold: {
value: false,
icon: `<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-type-bold" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg"><path d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13H8.21zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z"/></svg>`
icon: `bold.svg`
},
italic: {
value: false,
icon: `<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-type-italic" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg"><path d="M7.991 11.674L9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z"/></svg>`
icon: `italic.svg`
},
underline: {
value: false,
icon: `<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-type-underline" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg"><path d="M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57-1.709 0-2.687-1.08-2.687-2.57V3.136z"/><path fill-rule="evenodd" d="M12.5 15h-9v-1h9v1z"/></svg>`
icon: `underline.svg`
},
strikethrough: {
value: false,
icon: `<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-type-strikethrough" fill="currentColor" xmlns="http:https://www.w3.org/2000/svg"><path d="M8.527 13.164c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5h3.45c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967zM6.602 6.5H5.167a2.776 2.776 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607 0 .31.083.581.27.814z"/><path fill-rule="evenodd" d="M15 8.5H1v-1h14v1z"/></svg>`
icon: `strikethrough.svg`
},
fill: '#008800',
stroke: '#000000',
Expand Down
2 changes: 1 addition & 1 deletion src/js/core/gui/gui-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class GUI_tools_class {
element.classList.add('ui_icon_button');
element.classList.add('input_height');
element.innerHTML = icon;
element.setAttribute('title', title);
element.innerHTML = '<img alt="" src="images/icons/'+icon+'" />';
} else {
element.classList.add('ui_toggle_button');
}
Expand Down

0 comments on commit 6d3ae4f

Please sign in to comment.