Style block list links

This commit is contained in:
Luis Cielak 2018-07-31 10:29:22 -04:00 committed by richard-dds
parent 1db88a8191
commit b4b99de7de
4 changed files with 45 additions and 43 deletions

View File

@ -54,14 +54,25 @@
.block-list { .block-list {
@include block-list; @include block-list;
.icon-link {
margin: -$gap 0;
}
.icon-link {
&:first-child {
margin-left: -$gap;
}
&:last-child {
margin-right: -$gap;
}
}
} }
.block-list__header { .block-list__header {
@include block-list-header; @include block-list-header;
.block-list__header__link {
@include icon-link;
}
} }
.block-list__title { .block-list__title {

View File

@ -59,4 +59,8 @@
&.icon-link--large { &.icon-link--large {
@include icon-link-large; @include icon-link-large;
} }
&.icon-link--danger {
@include icon-link-color($color-red, $color-red-lightest);
}
} }

View File

@ -48,7 +48,7 @@
<div class='block-list project-list-item'> <div class='block-list project-list-item'>
<header class='block-list__header'> <header class='block-list__header'>
<h2 class='block-list__title'>Code.mil</h2> <h2 class='block-list__title'>Code.mil</h2>
<a class="block-list__header__link icon-link icon-link--danger">revoke all access</a> <a href="#" class="icon-link icon-link--danger">revoke all access</a>
</header> </header>
<ul> <ul>
<li class='block-list__item project-list-item__environment'> <li class='block-list__item project-list-item__environment'>
@ -56,7 +56,7 @@
Development Development
</span> </span>
<div class='project-list-item__environment__actions'> <div class='project-list-item__environment__actions'>
<span>no access</span><a href="#" class="icon-link">set role</a> <span>no access </span><a href="#" class="icon-link">set role</a>
</div> </div>
</li> </li>
<li class='block-list__item project-list-item__environment'> <li class='block-list__item project-list-item__environment'>

View File

@ -2,44 +2,31 @@
{% block workspace_content %} {% block workspace_content %}
{% if not projects %} {% for project in projects %}
<div class='block-list project-list-item'>
{% module EmptyState( <header class='block-list__header'>
'There are currently no projects set up for this Workspace.', <h2 class='block-list__title'>{{ project['name'] }} ({{ len(project['environments'])}} environments)</h2>
actionLabel='Create a new Project', <a class='icon-link' href='/workspaces/123456/projects/789/edit'>
actionHref='/project/new', {% module Icon('edit') %}
icon='cloud' <span>edit</span>
)%} </a>
</header>
{% else %} <ul>
{% for environment in project['environments'] %}
{% for project in projects %} <li class='block-list__item project-list-item__environment'>
<div class='block-list project-list-item'> <a href='/' target='_blank' rel='noopener noreferrer' class='project-list-item__environment__link'>
<header class='block-list__header'> {% module Icon('link') %}
<h2 class='block-list__title'>{{ project['name'] }} ({{ len(project['environments'])}} environments)</h2> <span>{{ environment["name"]}}</span>
<a class='block-list__header__link' href='/workspaces/123456/projects/789/edit'> </a>
{% module Icon('edit') %}
<span>edit</span>
</a>
</header>
<ul>
{% for environment in project['environments'] %}
<li class='block-list__item project-list-item__environment'>
<a href='/' target='_blank' rel='noopener noreferrer' class='project-list-item__environment__link'>
{% module Icon('link') %}
<span>{{ environment["name"]}}</span>
</a>
<div class='project-list-item__environment__members'>
<div class='label'>0</div>
<span>members</span>
</div>
</li>
{% end %}
</ul>
</div>
{% end %}
<div class='project-list-item__environment__members'>
<div class='label'>0</div>
<span>members</span>
</div>
</li>
{% end %}
</ul>
</div>
{% end %} {% end %}
{% end %} {% end %}