Skip to content

Commit 996a218

Browse files
authored
Merge pull request #21 from leekelleher/dev/icons-tweaks1
Icon tweaks
2 parents 589385c + 2d03276 commit 996a218

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

src/Our.Umbraco.UiExamples/App_Plugins/uiexamples/icons/icons.controller.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
function exampleSectionIconsController(exampleResource, iconHelper, overlayService) {
55

66
var vm = this;
7+
78
vm.loading = true;
89
vm.linkAway = exampleResource.linkAway;
10+
vm.codeSnippet = `<umb-icon
11+
icon="icon-{name}"
12+
class="small | medium | large">
13+
</umb-icon>`;
914

1015
vm.openIconOverlay = openIconOverlay;
1116

1217
function init() {
13-
1418
if (iconHelper.getAllIcons !== undefined) {
15-
1619
iconHelper.getAllIcons().then(function (icons) {
1720
vm.icons = icons;
1821
vm.loading = false;
@@ -33,7 +36,6 @@
3336
/////////
3437

3538
function openIconOverlay(icon) {
36-
3739
var options = {
3840
view: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/uiexamples/icons/iconOverlay.html',
3941
title: icon.name,
@@ -44,6 +46,7 @@
4446
overlayService.close();
4547
}
4648
}
49+
4750
overlayService.open(options);
4851
}
4952

src/Our.Umbraco.UiExamples/App_Plugins/uiexamples/icons/icons.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,22 @@
1010
button-style="info">
1111
</umb-button>
1212
</umb-box-header>
13-
1413
<umb-box-content>
15-
<umb-code-snippet language="'html'">&lt;umb-icon
16-
icon="icon-{name}"&gt;
17-
class="small | medium | large"&gt;
18-
&lt;/umb-icon&gt;</umb-code-snippet>
14+
<umb-code-snippet language="'html'">{{vm.codeSnippet}}</umb-code-snippet>
1915
<p><localize key="uiexamplesIcons_parameterIcon"></localize></p>
2016
<p><localize key="uiexamplesIcons_parameterClass"></localize></p>
2117
<ul>
22-
<li><code>small </code> &nbsp; 14px <umb-icon icon="icon-alert" class="small"></umb-icon></li>
18+
<li><code>small</code> &nbsp; 14px <umb-icon icon="icon-alert" class="small"></umb-icon></li>
2319
<li><code>medium</code> &nbsp; 24px <umb-icon icon="icon-alert" class="medium"></umb-icon></li>
2420
<li><code>large </code> &nbsp; 32px <umb-icon icon="icon-alert" class="large"></umb-icon></li>
2521
</ul>
26-
<p><localize key="uiexamplesIcons_parameterClassNone"></localize></p></p>
22+
<p><localize key="uiexamplesIcons_parameterClassNone"></localize></p>
2723
</umb-box-content>
2824
</umb-box>
2925

3026
<umb-load-indicator ng-if="vm.loading"></umb-load-indicator>
3127

32-
<umb-box>
33-
28+
<umb-box ng-if="!vm.loading">
3429
<umb-box-header title-key="uiexamplesIcons_listTitle"
3530
description-key="uiexamplesIcons_listDescription">
3631
<umb-search-filter input-id="uiexamples-icon-search"
@@ -41,7 +36,6 @@
4136
auto-focus="true">
4237
</umb-search-filter>
4338
</umb-box-header>
44-
4539
<umb-box-content>
4640
<div class="flex justify-between flex-wrap">
4741
<div ng-repeat="icon in vm.icons | orderBy: 'name' | filter:vm.searchTerm"
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<language alias="en" intName="English (UK)" localName="English (UK)" lcid="" culture="en-GB">
33
<area alias="uiexamplesIcons">
4-
<key alias="headerTitle">umb-icon</key>
5-
<key alias="headerDescription">Use this directive to render a svg icon</key>
6-
<key alias="parameterIcon">The 'icon' parameter determines which icon to show. All names are prefixed with icon-, for example 'icon-alert' and 'icon-checkbox'. See below for a list of all icons and their names.</key>
7-
<key alias="parameterClass">The 'class' parameter can be used to render the icon with a fixed size:</key>
4+
<key alias="headerTitle">umb-icon</key>
5+
<key alias="headerDescription">Use this directive to render a SVG icon</key>
6+
<key alias="parameterIcon"><![CDATA[The <code>icon</code> parameter determines which icon to show. All names are prefixed with icon-, for example <code>icon-alert</code> and <code>icon-checkbox</code>. See below for a list of all icons and their names.]]></key>
7+
<key alias="parameterClass"><![CDATA[The <code>class</code> parameter can be used to render the icon with a fixed size:]]></key>
88
<key alias="parameterClassNone">Without a size class specified the icon will inherit the font-size of their parent container.</key>
9-
<key alias="listTitle">Available Icons</key>
10-
<key alias="listDescription">The core Umbraco backoffice svg icons</key>
9+
<key alias="listTitle">Available Icons</key>
10+
<key alias="listDescription">The core Umbraco backoffice SVG icons</key>
1111
</area>
1212
</language>

0 commit comments

Comments
 (0)