diff --git a/public/css/app.css b/public/css/app.css index 8e790a3..f680315 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1483,9 +1483,17 @@ striping: .pure-table-horizontal tbody > tr:last-child > td { border-bottom-width: 0; } +/****************************************************************************** + => Color definitions +*******************************************************************************/ + +/****************************************************************************** + => General +*******************************************************************************/ + body { color: #241f1e; - background-color: #fffbfa; + background-color: #fdfcfc; overflow-y: scroll; } @@ -1515,8 +1523,12 @@ p { line-height: 1.5rem; } +/****************************************************************************** + => Forms +*******************************************************************************/ + .pure-form textarea { - height: 30ch; + height: 20ch; } .pure-form input[type=text], @@ -1528,6 +1540,22 @@ p { margin-top: 1em; } +.pure-form .control { + padding-top: 1em; + width: 100%; + text-align: right; +} + +.pure-form { + border: 1px #241f1e solid; + background-color: #f3eeed; + padding: 1em; +} + +/****************************************************************************** + => Menu +*******************************************************************************/ + .pure-menu-horizontal { display: flex; padding-left: 40ch; @@ -1545,7 +1573,7 @@ p { } .pure-menu-link { - color: #212121; + color: #241f1e; } .pure-menu-link:hover, @@ -1560,6 +1588,10 @@ p { padding: 0.5em 0; } +/****************************************************************************** + => Buttons & Links +*******************************************************************************/ + .admin-link { color: #ee1155; } @@ -1571,26 +1603,49 @@ p { } .button-black-white { - background-color: #ffffff; - color: #212121; - border: #212121 solid 1px; + background-color: white; + color: #241f1e; + border: #241f1e solid 1px; + border-radius: 0; + min-width: 20ch; } +.button-black-white:focus, .button-black-white:hover { - background-color: #eeeeee; - color: #212121; - border: #212121 solid 1px; + background-color: white; + color: #241f1e; + border: #241f1e solid 1px; background-image: none; + box-shadow: inset 1px 1px 4px -2px #241f1e; } +.button-black-white:active { + background-color: white; + color: #241f1e; + border: #241f1e solid 1px; + background-image: none; + box-shadow: inset 1px 1px 2px #241f1e; +} + +/****************************************************************************** + => Tables +*******************************************************************************/ + .table-heading { margin-bottom: 1em; } -.pure-table { +.pure-table, +.pure-table thead, +.pure-table tbody { width: 100%; } +.pure-table thead { + background-color: white; + border: 1px black solid; +} + .pure-table, .pure-table td, .pure-table th { @@ -1602,17 +1657,25 @@ p { max-width: 30ch; } +.pure-table tr { + border-bottom: 1px black solid; +} + .pure-table .controls { - display: inline-flex; + width: 16ch; } -.pure-table .controls a:first-child { - padding-right: 1em; +.pure-table .controls > * { + display: inline-block; } -.pure-form .control { - padding-top: 1em; - width: 100%; - text-align: right; +.pure-table .controls .pure-button.button-black-white { + min-width: auto; + width: 7ch; + padding: 0.5em 0; +} + +.pure-table .controls :first-child { + margin-right: 1ch; } diff --git a/public/js/admin.js b/public/js/admin.js index 841bd19..ae72ad7 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -94,6 +94,10 @@ /***/ (function(module, exports) { switch (window.location.pathname) { + case "/admin": + document.getElementById("title-link").classList.add("pure-menu-highlight"); + break; + case "/admin/posts": document.getElementById("posts-link").classList.add("pure-menu-highlight"); break; diff --git a/resources/js/admin.js b/resources/js/admin.js index 19a273d..3095923 100644 --- a/resources/js/admin.js +++ b/resources/js/admin.js @@ -1,4 +1,7 @@ switch(window.location.pathname){ + case "/admin": + document.getElementById("title-link").classList.add("pure-menu-highlight"); + break; case "/admin/posts": document.getElementById("posts-link").classList.add("pure-menu-highlight"); break; diff --git a/resources/sass/app.scss b/resources/sass/app.scss index 0ca26c7..5202b6d 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -1,8 +1,19 @@ @import "~purecss/build/pure.css"; +/****************************************************************************** + => Color definitions +*******************************************************************************/ +$background-color: hsl(10, 20%, 99%); +$foreground-color: hsl(10, 10%, 13%); +$primary-color : #0fa0ce; +$admin-color : #ee1155; + +/****************************************************************************** + => General +*******************************************************************************/ body { - color: hsl(10, 10%, 13%); - background-color: hsl(10, 100%, 99%); + color: $foreground-color; + background-color: $background-color; overflow-y: scroll; } @@ -17,11 +28,11 @@ img { } a { - color: #0fa0ce; + color: $primary-color; } .link { - color: #0fa0ce; + color: $primary-color; border: none; background: none; text-decoration: underline; @@ -32,8 +43,11 @@ p { line-height: 1.5rem; } +/****************************************************************************** + => Forms +*******************************************************************************/ .pure-form textarea { - height: 30ch; + height: 20ch; } .pure-form input[type="text"], @@ -45,7 +59,21 @@ p { margin-top: 1em; } +.pure-form .control { + padding-top: 1em; + width:100%; + text-align: right; +} +.pure-form { + border: 1px $foreground-color solid; + background-color: darken($background-color, 5%); + padding: 1em; +} + +/****************************************************************************** + => Menu +*******************************************************************************/ .pure-menu-horizontal { display: flex; padding-left: 40ch; @@ -63,12 +91,12 @@ p { } .pure-menu-link { - color: #212121; + color: $foreground-color; } .pure-menu-link:hover, .pure-menu-highlight { - color: #0fa0ce; - border-bottom: 1px #0fa0ce solid; + color: $primary-color; + border-bottom: 1px $primary-color solid; background-color: transparent; } @@ -77,37 +105,63 @@ p { padding: .5em 0; } +/****************************************************************************** + => Buttons & Links +*******************************************************************************/ + .admin-link { - color: #ee1155; + color: $admin-color; } .admin-link:hover{ - color: #ee1155; - border-bottom: 1px #ee1155 solid; + color: $admin-color; + border-bottom: 1px $admin-color solid; background-color: transparent; } .button-black-white { - background-color: #ffffff; - color: #212121; - border: #212121 solid 1px; + background-color: lighten($background-color, 10%); + color: $foreground-color; + border: $foreground-color solid 1px; + border-radius: 0; + min-width: 20ch; } +.button-black-white:focus, .button-black-white:hover { - background-color: #eeeeee; - color: #212121; - border: #212121 solid 1px; + background-color: lighten($background-color, 10%); + color: $foreground-color; + border: $foreground-color solid 1px; background-image: none; + box-shadow: inset 1px 1px 4px -2px $foreground-color; +} +.button-black-white:active{ + background-color: lighten($background-color, 10%); + color: $foreground-color; + border: $foreground-color solid 1px; + background-image: none; + box-shadow: inset 1px 1px 2px $foreground-color; } +/****************************************************************************** + => Tables +*******************************************************************************/ .table-heading { margin-bottom: 1em; } -.pure-table { +.pure-table, +.pure-table thead, +.pure-table tbody{ width: 100%; } +.pure-table thead { + background-color: lighten($background-color, 10%); + border: 1px black solid; +} + + .pure-table, .pure-table td, .pure-table th { @@ -119,16 +173,25 @@ p { max-width: 30ch; } +.pure-table tr { + border-bottom: 1px black solid; +} + .pure-table .controls { - display: inline-flex; + width: 16ch; } -.pure-table .controls a:first-child{ - padding-right: 1em; +.pure-table .controls > *{ + display: inline-block; } -.pure-form .control { - padding-top: 1em; - width:100%; - text-align: right; +.pure-table .controls .pure-button.button-black-white{ + min-width: auto; + width: 7ch; + padding: .5em 0; } + +.pure-table .controls :first-child { + margin-right: 1ch; +} + diff --git a/resources/views/admin/base.blade.php b/resources/views/admin/base.blade.php index fd1323c..611b52f 100644 --- a/resources/views/admin/base.blade.php +++ b/resources/views/admin/base.blade.php @@ -7,20 +7,20 @@
- + -| Id | Fecha | - | @@ -23,13 +18,11 @@ | |
|---|---|---|---|---|
| {{$now->id}} | {{$now->created_at->format('Y-m-d')}} | -- Edit - | -+ | + Edit |