simpilify style on mobile

This commit is contained in:
sentriz
2019-06-27 22:54:40 +01:00
parent c9ca5b01b7
commit 111ca565c8
4 changed files with 42 additions and 29 deletions

View File

@@ -20,7 +20,7 @@
{{ template "content" . }} {{ template "content" . }}
</div> </div>
</div> </div>
<div id="footer" class="padded mono"> <div id="footer" class="padded mono text-right">
senan kelly, 2019 senan kelly, 2019
<span class="light">&#124;</span> <span class="light">&#124;</span>
<a href="https://github.com/sentriz/gonic">github</a> <a href="https://github.com/sentriz/gonic">github</a>

View File

@@ -49,7 +49,7 @@
<div class="text-right"> <div class="text-right">
{{ range $user := .AllUsers }} {{ range $user := .AllUsers }}
<i>{{ $user.Name }}</i> <i>{{ $user.Name }}</i>
<span class="light">{{ $user.CreatedAt.Format "jan 02, 2006" }}</span> <span class="light no-small">{{ $user.CreatedAt.Format "jan 02, 2006" }}</span>
<span class="light">&#124;</span> <span class="light">&#124;</span>
<a href="/admin/change_password?user={{ $user.Name }}">change password</a> <a href="/admin/change_password?user={{ $user.Name }}">change password</a>
<span class="light">&#124;</span> <span class="light">&#124;</span>
@@ -71,12 +71,12 @@
<div class="box-title"> <div class="box-title">
<i class="mdi mdi-folder-multiple"></i> recent folders <i class="mdi mdi-folder-multiple"></i> recent folders
</div> </div>
<div class="left-cut block-right"> <div class="block-right">
<table id="recent-folders"> <table id="recent-folders">
{{ range $folder := .RecentFolders }} {{ range $folder := .RecentFolders }}
<tr> <tr>
<td><span>{{ $folder.RightPath }}</span></td> <td class="text-right">{{ $folder.RightPath }}</td>
<td><span class="light">{{ $folder.CreatedAt | humanDate }}</span></td> <td class="no-small"><span class="light">{{ $folder.CreatedAt | humanDate }}</span></td>
</tr> </tr>
{{ end }} {{ end }}
</table> </table>

View File

@@ -4,5 +4,5 @@
<link rel="stylesheet" href="/admin/static/stylesheets/main.css"> <link rel="stylesheet" href="/admin/static/stylesheets/main.css">
<link rel="shortcut icon" href="/admin/static/images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/admin/static/images/favicon.ico" type="image/x-icon">
<link rel="icon" href="/admin/static/images/favicon.ico" type="image/x-icon"> <link rel="icon" href="/admin/static/images/favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=0.8, user-scalable=no">
{{ end }} {{ end }}

View File

@@ -1,3 +1,28 @@
body {
max-width: 780px;
margin: 0 auto;
padding: 20px;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 1rem;
}
@media only screen and (max-width: 780px) {
.no-small {
display: none;
}
}
@media only screen and (min-width: 780px) {
table#stats td:first-child::after,
table#recent-folders td:first-child::after {
content: " ";
white-space: pre;
}
}
form input[type], form input[type],
form select, form select,
form textarea { form textarea {
@@ -13,10 +38,16 @@ form {
align-items: flex-end; align-items: flex-end;
} }
form>* { form > * {
width: 100%; width: 100%;
} }
form input {
padding: 3px;
border: 1px solid #ccc;
box-sizing: border-box;
}
form input[type=password], form input[type=password],
form input[type=text] { form input[type=text] {
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
@@ -24,6 +55,8 @@ form input[type=text] {
form input[type=submit] { form input[type=submit] {
width: 8rem; width: 8rem;
background-color: white;
cursor: pointer;
} }
div { div {
@@ -31,16 +64,6 @@ div {
padding: 0; padding: 0;
} }
body {
max-width: 800px;
margin: 0 auto;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 1rem;
}
table td, table td,
table th { table th {
border: none; border: none;
@@ -52,12 +75,6 @@ table {
white-space: nowrap; white-space: nowrap;
} }
table#stats td:first-child,
table#recent-folders td:first-child {
display: inline-block;
margin-right: 10px;
}
a, a,
a:visited { a:visited {
color: #0064c1; color: #0064c1;
@@ -69,7 +86,7 @@ a:hover {
} }
#content>* { #content > * {
margin: 2rem 0; margin: 2rem 0;
} }
@@ -85,10 +102,6 @@ a:hover {
height: auto; height: auto;
} }
#footer {
text-align: right;
}
#flashes { #flashes {
background-color: #fd1b1b1c; background-color: #fd1b1b1c;
border-right: 2px solid #fd1b1b1c; border-right: 2px solid #fd1b1b1c;
@@ -99,7 +112,7 @@ a:hover {
text-align: right; text-align: right;
} }
.block-right>* { .block-right > * {
margin-left: auto; margin-left: auto;
} }