Introduce actions table style

This commit is contained in:
Robert Marshall 2021-05-08 12:24:03 +01:00
parent aabbe281be
commit ab9a3b92e9
3 changed files with 30 additions and 11 deletions

View file

@ -6,10 +6,10 @@
<a href="/blog/edit">New Post</a>
<table class="post-list">
<table class="actions">
@foreach (var post in Model) {
<tr class="post-list__post">
<td><a href="/blog/view/@post.Url">@post.Title</a></td>
<tr>
<td class="stretch"><a href="/blog/view/@post.Url">@post.Title</a></td>
<td><a href="edit?id=@post.Id"><img src="/images/edit.svg" alt="Edit" title="Edit"/></a></td>
<td><a href="/blog/view/@post.Url?preview=true"><img src="/images/blog.svg" alt="Preview" title="Preview"/></a></td>
<td><a href="publish?id=@post.Id"><img src="/images/send.svg" alt="Publish" title="Publish" onclick="return confirm('Are you sure?')"/></a></td>

View file

@ -168,12 +168,4 @@
.CodeMirror *{
transition: none; // Fix weird scroll issue as a result of site-wide transition.
}
}
.post-list {
border-collapse: collapse;
&__post:hover {
background: $Grey-300;
}
}

View file

@ -227,6 +227,33 @@ form {
}
}
table.actions {
border-collapse: collapse;
width:100%;
tr:hover {
background: $Grey-300;
}
td {
&.stretch{
width: 99%;
}
&.nowrap{
white-space: nowrap;
}
&:not(:first-child) {
padding-left: 5px;
pre {
margin: 0;
}
}
}
}
@import "blog.scss";
@import "home.scss";