diff --git a/public/css/app.css b/public/css/app.css index 8cbc7ef..8e790a3 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1484,10 +1484,15 @@ striping: border-bottom-width: 0; } body { + color: #241f1e; + background-color: #fffbfa; + overflow-y: scroll; +} + +.container { max-width: 70ch; - padding: 2ch; + padding-bottom: 2ch; margin: auto; - color: #212121; } img { @@ -1498,27 +1503,73 @@ a { color: #0fa0ce; } +.link { + color: #0fa0ce; + border: none; + background: none; + text-decoration: underline; + padding: 0; +} + p { line-height: 1.5rem; } -textarea { +.pure-form textarea { height: 30ch; } +.pure-form input[type=text], +.pure-form textarea { + width: 100%; +} + +.pure-form label { + margin-top: 1em; +} + +.pure-menu-horizontal { + display: flex; + padding-left: 40ch; + padding-right: 40ch; + padding-bottom: 1em; + padding-top: 1em; + margin-bottom: 1em; + box-shadow: 0 -5px 10px black; +} + +.pure-menu-horizontal .pure-menu-list { + display: flex; + justify-content: right; + width: 100%; +} + .pure-menu-link { color: #212121; } -.pure-menu-link:hover { +.pure-menu-link:hover, +.pure-menu-highlight { color: #0fa0ce; + border-bottom: 1px #0fa0ce solid; background-color: transparent; } +.pure-menu-heading { + letter-spacing: 0.5ch; + padding: 0.5em 0; +} + .admin-link { color: #ee1155; } +.admin-link:hover { + color: #ee1155; + border-bottom: 1px #ee1155 solid; + background-color: transparent; +} + .button-black-white { background-color: #ffffff; color: #212121; @@ -1532,7 +1583,36 @@ textarea { background-image: none; } -.u-align-right { - float: right; +.table-heading { + margin-bottom: 1em; +} + +.pure-table { + width: 100%; +} + +.pure-table, +.pure-table td, +.pure-table th { + border: none; +} + +.pure-table td { + word-wrap: break-word; + max-width: 30ch; +} + +.pure-table .controls { + display: inline-flex; +} + +.pure-table .controls a:first-child { + padding-right: 1em; +} + +.pure-form .control { + padding-top: 1em; + width: 100%; + text-align: right; } diff --git a/public/js/admin.js b/public/js/admin.js new file mode 100644 index 0000000..841bd19 --- /dev/null +++ b/public/js/admin.js @@ -0,0 +1,128 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./resources/js/admin.js": +/*!*******************************!*\ + !*** ./resources/js/admin.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +switch (window.location.pathname) { + case "/admin/posts": + document.getElementById("posts-link").classList.add("pure-menu-highlight"); + break; + + case "/admin/now": + document.getElementById("now-link").classList.add("pure-menu-highlight"); + break; + + case "/admin/projects": + document.getElementById("proyectos-link").classList.add("pure-menu-highlight"); + break; + + case "/admin/setup": + document.getElementById("setup-link").classList.add("pure-menu-highlight"); + break; +} + +/***/ }), + +/***/ 1: +/*!*************************************!*\ + !*** multi ./resources/js/admin.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! /home/data/src/www.danielcortes.xyz/resources/js/admin.js */"./resources/js/admin.js"); + + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 34ffdf8..376c529 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -93,7 +93,28 @@ /*! no static exports found */ /***/ (function(module, exports) { +switch (window.location.pathname) { + case "/": + document.getElementById("title-link").classList.add("pure-menu-highlight"); + break; + case "/blog": + case "/blog/archive": + document.getElementById("blog-link").classList.add("pure-menu-highlight"); + break; + + case "/now": + document.getElementById("now-link").classList.add("pure-menu-highlight"); + break; + + case "/projects": + document.getElementById("proyectos-link").classList.add("pure-menu-highlight"); + break; + + case "/setup": + document.getElementById("setup-link").classList.add("pure-menu-highlight"); + break; +} /***/ }), diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 2d60117..7c1dd90 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,5 @@ { + "/js/admin.js": "/js/admin.js", "/js/app.js": "/js/app.js", "/css/app.css": "/css/app.css" } diff --git a/resources/js/admin.js b/resources/js/admin.js new file mode 100644 index 0000000..19a273d --- /dev/null +++ b/resources/js/admin.js @@ -0,0 +1,14 @@ +switch(window.location.pathname){ + case "/admin/posts": + document.getElementById("posts-link").classList.add("pure-menu-highlight"); + break; + case "/admin/now": + document.getElementById("now-link").classList.add("pure-menu-highlight"); + break; + case "/admin/projects": + document.getElementById("proyectos-link").classList.add("pure-menu-highlight"); + break; + case "/admin/setup": + document.getElementById("setup-link").classList.add("pure-menu-highlight"); + break; +} diff --git a/resources/js/app.js b/resources/js/app.js index e69de29..a163735 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -0,0 +1,18 @@ +switch(window.location.pathname){ + case "/": + document.getElementById("title-link").classList.add("pure-menu-highlight"); + break; + case "/blog": + case "/blog/archive": + document.getElementById("blog-link").classList.add("pure-menu-highlight"); + break; + case "/now": + document.getElementById("now-link").classList.add("pure-menu-highlight"); + break; + case "/projects": + document.getElementById("proyectos-link").classList.add("pure-menu-highlight"); + break; + case "/setup": + document.getElementById("setup-link").classList.add("pure-menu-highlight"); + break; +} diff --git a/resources/sass/app.scss b/resources/sass/app.scss index 325f40e..0ca26c7 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -1,10 +1,15 @@ @import "~purecss/build/pure.css"; body { + color: hsl(10, 10%, 13%); + background-color: hsl(10, 100%, 99%); + overflow-y: scroll; +} + +.container { max-width: 70ch; - padding: 2ch; + padding-bottom: 2ch; margin: auto; - color: #212121; } img { @@ -15,26 +20,73 @@ a { color: #0fa0ce; } +.link { + color: #0fa0ce; + border: none; + background: none; + text-decoration: underline; + padding: 0; +} + p { line-height: 1.5rem; } -textarea { +.pure-form textarea { height: 30ch; } +.pure-form input[type="text"], +.pure-form textarea { + width: 100%; +} + +.pure-form label { + margin-top: 1em; +} + + +.pure-menu-horizontal { + display: flex; + padding-left: 40ch; + padding-right: 40ch; + padding-bottom: 1em; + padding-top: 1em; + margin-bottom: 1em; + box-shadow: 0 -5px 10px black; +} + +.pure-menu-horizontal .pure-menu-list { + display: flex; + justify-content: right; + width: 100%; +} + .pure-menu-link { color: #212121; } -.pure-menu-link:hover { + +.pure-menu-link:hover, .pure-menu-highlight { color: #0fa0ce; + border-bottom: 1px #0fa0ce solid; background-color: transparent; } +.pure-menu-heading { + letter-spacing: .5ch; + padding: .5em 0; +} + .admin-link { color: #ee1155; } +.admin-link:hover{ + color: #ee1155; + border-bottom: 1px #ee1155 solid; + background-color: transparent; +} + .button-black-white { background-color: #ffffff; color: #212121; @@ -48,6 +100,35 @@ textarea { background-image: none; } -.u-align-right { - float: right; +.table-heading { + margin-bottom: 1em; +} + +.pure-table { + width: 100%; +} + +.pure-table, +.pure-table td, +.pure-table th { + border:none; +} + +.pure-table td { + word-wrap: break-word; + max-width: 30ch; +} + +.pure-table .controls { + display: inline-flex; +} + +.pure-table .controls a:first-child{ + padding-right: 1em; +} + +.pure-form .control { + padding-top: 1em; + width:100%; + text-align: right; } diff --git a/resources/views/admin/base.blade.php b/resources/views/admin/base.blade.php index 43ac801..fd1323c 100644 --- a/resources/views/admin/base.blade.php +++ b/resources/views/admin/base.blade.php @@ -10,10 +10,10 @@
@@ -23,6 +23,7 @@ - + +