todo: use inline icons

This commit is contained in:
Felix Niklas 2016-02-05 12:29:26 +01:00
parent 10a61558f7
commit 34f8604a25
2 changed files with 55 additions and 52 deletions

View file

@ -8,22 +8,58 @@
<div class="box box--paper"> <div class="box box--paper">
<% if @isAdmin: %> <% if @isAdmin: %>
<h3><%- @T('Configuration') %></h3> <h3><%- @T('Configuration') %></h3>
<div class="todo is-done"><%- @T('Branding') %></div> <a class="todo is-done">
<div class="todo"><%- @T('Your Email Configuration') %></div> <%- @Icon('checkmark') %>
<div class="todo"><%- @T('Invite Agents/Colleges') %></div> <%- @T('Branding') %>
</a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Your Email Configuration') %>
</a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Invite Agents/Colleges') %>
</a>
<% end %> <% end %>
<h3><%- @T('How to use it') %></h3> <h3><%- @T('How to use it') %></h3>
<div class="todo"><a href="#" class="intro"><%- @T('Intro') %></a></div> <a class="todo">
<div class="todo is-done"><%- @T('Create a Test Ticket') %></div> <%- @Icon('small-dot') %>
<div class="todo"><%- @T('Create new Overviews') %></div> <%- @T('Intro') %></a>
<div class="todo is-done"><%- @T('Create Text Modues') %></div> </a>
<div class="todo"><%- @T('Create Macros') %></div> <a class="todo is-done">
<%- @Icon('checkmark') %>
<%- @T('Create a Test Ticket') %>
</a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Create new Overviews') %>
</a>
<a class="todo is-done">
<%- @Icon('checkmark') %>
<%- @T('Create Text Modues') %>
</a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Create Macros') %>
</a>
<% if @isAdmin: %> <% if @isAdmin: %>
<h3><%- @T('Additionals Channels') %></h3> <h3><%- @T('Additionals Channels') %></h3>
<div class="todo"><%- @T('Twitter') %></div> <a class="todo">
<div class="todo"><%- @T('Facebook') %></div> <%- @Icon('small-dot') %>
<div class="todo is-done"><%- @T('Chat') %></div> <%- @T('Twitter') %>
<div class="todo"><%- @T('Widget') %></div> </a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Facebook') %>
</a>
<a class="todo is-done">
<%- @Icon('checkmark') %>
<%- @T('Chat') %>
</a>
<a class="todo">
<%- @Icon('small-dot') %>
<%- @T('Widget') %>
</a>
<% end %> <% end %>
</div> </div>
</div> </div>

View file

@ -17,28 +17,6 @@ $highlight-color: hsl(205,90%,60%);
$largeScreenBreakpoint: 1280px; $largeScreenBreakpoint: 1280px;
/// Replace `$search` with `$replace` in `$string`
/// @author Hugo Giraudel
/// @param {String} $string - Initial string
/// @param {String} $search - Substring to replace
/// @param {String} $replace ('') - New value
/// @return {String} - Updated string
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@function icon($name, $color) {
$data-uri: asset-data-url("/assets/images/icons/#{$name}");
$replace-src: str-replace("@{data-uri}", "#50E3C2", $color);
@return $replace-src;
}
html { html {
height: 100%; height: 100%;
} }
@ -7765,28 +7743,17 @@ output {
} }
.todo { .todo {
padding: 0 22px;
position: relative; position: relative;
display: block;
/* circle */ .icon {
&:before { fill: hsl(0,0%,80%);
content: ""; vertical-align: middle;
position: absolute; margin: -2px 3px 0 0;
left: 5px;
top: 12px;
width: 6px;
height: 6px;
border-radius: 100%;
background: rgba(0,0,0,.1);
} }
&.is-done { &.is-done .icon {
// background: icon("checkmark.svg", $supergood-color) no-repeat 0 9px; fill: $supergood-color;
background: url("images/icons/checkmark.svg") no-repeat 0 9px;
&:before {
display: none;
}
} }
} }