Browse Source

Getting started.

pull/3/merge
Ned Zimmerman 7 years ago
parent
commit
3b04dcd2f3
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 2
      app/filters.php
  2. 6
      app/helpers.php
  3. 28
      app/setup.php
  4. 5
      dist/assets.json
  5. 100
      dist/scripts/customizer.js
  6. 1
      dist/scripts/customizer.js.map
  7. 1
      dist/scripts/customizer_6ea252c4.js
  8. 253
      dist/scripts/main.js
  9. 1
      dist/scripts/main.js.map
  10. 1
      dist/scripts/main_6ea252c4.js
  11. 78
      dist/styles/main.css
  12. 1
      dist/styles/main.css.map
  13. 1
      dist/styles/main_6ea252c4.css
  14. 33
      resources/assets/styles/common/_global.scss
  15. 5
      resources/assets/styles/common/_variables.scss
  16. 19
      resources/assets/styles/layouts/_header.scss
  17. 20
      resources/assets/styles/layouts/_pages.scss
  18. 2
      resources/assets/styles/main.scss
  19. 12
      resources/functions.php
  20. 2
      resources/views/404.blade.php
  21. 29
      resources/views/index.blade.php
  22. 1
      resources/views/layouts/app.blade.php
  23. 8
      resources/views/partials/comments.blade.php
  24. 2
      resources/views/partials/content-page.blade.php
  25. 2
      resources/views/partials/content-single.blade.php
  26. 2
      resources/views/partials/entry-meta.blade.php
  27. 3
      resources/views/partials/header.blade.php
  28. 9
      resources/views/partials/uio.blade.php
  29. 2
      resources/views/search.blade.php

2
app/filters.php

@ -30,7 +30,7 @@ add_filter('body_class', function (array $classes) {
* Add "… Continued" to the excerpt
*/
add_filter('excerpt_more', function () {
return ' &hellip; <a href="' . get_permalink() . '">' . __('Continued', 'sage') . '</a>';
return ' &hellip; <a href="' . get_permalink() . '">' . __('Continued', 'pressbooks-aldine') . '</a>';
});
/**

6
app/helpers.php

@ -132,16 +132,16 @@ function title()
if ($home = get_option('page_for_posts', true)) {
return get_the_title($home);
}
return __('Latest Posts', 'sage');
return __('Latest Posts', 'pressbooks-aldine');
}
if (is_archive()) {
return get_the_archive_title();
}
if (is_search()) {
return sprintf(__('Search Results for %s', 'sage'), get_search_query());
return sprintf(__('Search Results for %s', 'pressbooks-aldine'), get_search_query());
}
if (is_404()) {
return __('Not Found', 'sage');
return __('Not Found', 'pressbooks-aldine');
}
return get_the_title();
}

28
app/setup.php

@ -11,8 +11,14 @@ use Roots\Sage\Template\BladeProvider;
* Theme assets
*/
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), false, null);
wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
wp_enqueue_style(
'aldine/webfonts',
'https://fonts.googleapis.com/css?family=Karla:400,400i,700|Spectral:400,400i,600',
false,
null
);
wp_enqueue_style('aldine/main.css', asset_path('styles/main.css'), false, null);
wp_enqueue_script('aldine/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
}, 100);
/**
@ -40,7 +46,7 @@ add_action('after_setup_theme', function () {
* @link https://developer.wordpress.org/reference/functions/register_nav_menus/
*/
register_nav_menus([
'primary_navigation' => __('Primary Navigation', 'sage')
'primary_navigation' => __('Primary Navigation', 'pressbooks-aldine')
]);
/**
@ -79,12 +85,20 @@ add_action('widgets_init', function () {
'after_title' => '</h3>'
];
register_sidebar([
'name' => __('Primary', 'sage'),
'id' => 'sidebar-primary'
'name' => __('Home Block One', 'pressbooks-aldine'),
'id' => 'home-block-one'
] + $config);
register_sidebar([
'name' => __('Footer', 'sage'),
'id' => 'sidebar-footer'
'name' => __('Home Block Two', 'pressbooks-aldine'),
'id' => 'home-block-two'
] + $config);
register_sidebar([
'name' => __('Home Block Three', 'pressbooks-aldine'),
'id' => 'home-block-three'
] + $config);
register_sidebar([
'name' => __('Home Block Four', 'pressbooks-aldine'),
'id' => 'home-block-four'
] + $config);
});

5
dist/assets.json vendored

@ -0,0 +1,5 @@
{
"scripts/customizer.js": "scripts/customizer_6ea252c4.js",
"styles/main.css": "styles/main_6ea252c4.css",
"scripts/main.js": "scripts/main_6ea252c4.js"
}

100
dist/scripts/customizer.js vendored

@ -1,100 +0,0 @@
/******/ (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, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // 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 = "app/themes/pressbooks-aldine/dist/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 9);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, exports) {
module.exports = jQuery;
/***/ }),
/***/ 10:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
wp.customize('blogname', function (value) {
value.bind(function (to) { return __WEBPACK_IMPORTED_MODULE_0_jquery___default()('.brand').text(to); });
});
/***/ }),
/***/ 9:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(10);
/***/ })
/******/ });
//# sourceMappingURL=customizer.js.map

1
dist/scripts/customizer.js.map vendored

@ -1 +0,0 @@
{"version":3,"sources":["webpack:///webpack/bootstrap d7af810e16cb2f4684f6","webpack:///external \"jQuery\"","webpack:///./scripts/customizer.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AC7DA,wB;;;;;;;;;;;ACAuB;;AAEvB,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,UAAC,KAAK,EAAK;EAClC,KAAK,CAAC,IAAI,CAAC,YAAE,EAAI,uDAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAC,CAAC;CACxC,CAAC,CAAC","file":"scripts/customizer.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"app/themes/pressbooks-aldine/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d7af810e16cb2f4684f6","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 0\n// module chunks = 0 1","import $ from 'jquery';\n\nwp.customize('blogname', (value) => {\n value.bind(to => $('.brand').text(to));\n});\n\n\n\n// WEBPACK FOOTER //\n// ./scripts/customizer.js"],"sourceRoot":""}

1
dist/scripts/customizer_6ea252c4.js vendored

@ -0,0 +1 @@
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="app/themes/pressbooks-aldine/dist/",t(t.s=9)}({0:function(e,t){e.exports=jQuery},10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n.n(r);wp.customize("blogname",function(e){e.bind(function(e){return o()(".brand").text(e)})})},9:function(e,t,n){e.exports=n(10)}});

253
dist/scripts/main.js vendored

@ -1,253 +0,0 @@
/******/ (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, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // 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 = "app/themes/pressbooks-aldine/dist/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
module.exports = jQuery;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2);
module.exports = __webpack_require__(8);
/***/ }),
/* 2 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_Router__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_common__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routes_home__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__routes_about__ = __webpack_require__(7);
// import external dependencies
// Import everything from autoload
// import local dependencies
/** Populate Router instance with DOM routes */
var routes = new __WEBPACK_IMPORTED_MODULE_1__util_Router__["a" /* default */]({
// All pages
common: __WEBPACK_IMPORTED_MODULE_2__routes_common__["a" /* default */],
// Home page
home: __WEBPACK_IMPORTED_MODULE_3__routes_home__["a" /* default */],
// About Us page, note the change from about-us to aboutUs.
aboutUs: __WEBPACK_IMPORTED_MODULE_4__routes_about__["a" /* default */],
});
// Load Events
jQuery(document).ready(function () { return routes.loadEvents(); });
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0)))
/***/ }),
/* 3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__camelCase__ = __webpack_require__(4);
/**
* DOM-based Routing
*
* Based on {@link http://goo.gl/EUTi53|Markup-based Unobtrusive Comprehensive DOM-ready Execution} by Paul Irish
*
* The routing fires all common scripts, followed by the page specific scripts.
* Add additional events for more control over timing e.g. a finalize event
*/
var Router = function Router(routes) {
this.routes = routes;
};
/**
* Fire Router events
* @param {string} route DOM-based route derived from body classes (`<body class="...">`)
* @param {string} [event] Events on the route. By default, `init` and `finalize` events are called.
* @param {string} [arg] Any custom argument to be passed to the event.
*/
Router.prototype.fire = function fire (route, event, arg) {
if ( event === void 0 ) event = 'init';
var fire = route !== '' && this.routes[route] && typeof this.routes[route][event] === 'function';
if (fire) {
this.routes[route][event](arg);
}
};
/**
* Automatically load and fire Router events
*
* Events are fired in the following order:
** common init
** page-specific init
** page-specific finalize
** common finalize
*/
Router.prototype.loadEvents = function loadEvents () {
var this$1 = this;
// Fire common init JS
this.fire('common');
// Fire page-specific init JS, and then finalize JS
document.body.className
.toLowerCase()
.replace(/-/g, '_')
.split(/\s+/)
.map(__WEBPACK_IMPORTED_MODULE_0__camelCase__["a" /* default */])
.forEach(function (className) {
this$1.fire(className);
this$1.fire(className, 'finalize');
});
// Fire common finalize JS
this.fire('common', 'finalize');
};
/* harmony default export */ __webpack_exports__["a"] = (Router);
/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
* the most terrible camelizer on the internet, guaranteed!
* @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD
* @return {string} String converted to camel-case, e.g., camelCaseIsHard
*/
/* harmony default export */ __webpack_exports__["a"] = (function (str) { return ("" + (str.charAt(0).toLowerCase()) + (str.replace(/[\W_]/g, '|').split('|')
.map(function (part) { return ("" + (part.charAt(0).toUpperCase()) + (part.slice(1))); })
.join('')
.slice(1))); });;
/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
init: function init() {
// JavaScript to be fired on all pages
},
finalize: function finalize() {
// JavaScript to be fired on all pages, after page specific JS is fired
},
});
/***/ }),
/* 6 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
init: function init() {
// JavaScript to be fired on the home page
},
finalize: function finalize() {
// JavaScript to be fired on the home page, after the init JS
},
});
/***/ }),
/* 7 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
init: function init() {
// JavaScript to be fired on the about us page
},
});
/***/ }),
/* 8 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ })
/******/ ]);
//# sourceMappingURL=main.js.map

1
dist/scripts/main.js.map vendored

File diff suppressed because one or more lines are too long

1
dist/scripts/main_6ea252c4.js vendored

@ -0,0 +1 @@
!function(t){function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="app/themes/pressbooks-aldine/dist/",n(n.s=1)}([function(t,n){t.exports=jQuery},function(t,n,e){e(2),t.exports=e(8)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(t){var n=e(0),o=(e.n(n),e(3)),i=e(5),r=e(6),u=e(7),c=new o.a({common:i.a,home:r.a,aboutUs:u.a});t(document).ready(function(){return c.loadEvents()})}.call(n,e(0))},function(t,n,e){"use strict";var o=e(4),i=function(t){this.routes=t};i.prototype.fire=function(t,n,e){void 0===n&&(n="init"),""!==t&&this.routes[t]&&"function"==typeof this.routes[t][n]&&this.routes[t][n](e)},i.prototype.loadEvents=function(){var t=this;this.fire("common"),document.body.className.toLowerCase().replace(/-/g,"_").split(/\s+/).map(o.a).forEach(function(n){t.fire(n),t.fire(n,"finalize")}),this.fire("common","finalize")},n.a=i},function(t,n,e){"use strict";n.a=function(t){return""+t.charAt(0).toLowerCase()+t.replace(/[\W_]/g,"|").split("|").map(function(t){return""+t.charAt(0).toUpperCase()+t.slice(1)}).join("").slice(1)}},function(t,n,e){"use strict";n.a={init:function(){},finalize:function(){}}},function(t,n,e){"use strict";n.a={init:function(){},finalize:function(){}}},function(t,n,e){"use strict";n.a={init:function(){}}},function(t,n){}]);

78
dist/styles/main.css vendored

@ -1,78 +0,0 @@
/** Colors */
/** Box Model */
/** Import everything from autoload */
/**
* Import npm dependencies
*
* Prefix your imports with `~` to grab from node_modules/
* @see https://github.com/webpack-contrib/sass-loader#imports
*/
/** Import theme styles */
/** Search form */
/**
* WordPress Generated Classes
* @see http://codex.wordpress.org/CSS#WordPress_Generated_Classes
*/
/** Media alignment */
.alignnone {
margin-left: 0;
margin-right: 0;
max-width: 100%;
height: auto;
}
.aligncenter {
display: block;
margin: 1rem auto;
height: auto;
}
.alignleft,
.alignright {
margin-bottom: 1rem;
height: auto;
}
@media (min-width: 30rem) {
.alignleft {
float: left;
margin-right: 1rem;
}
.alignright {
float: right;
margin-left: 1rem;
}
}
/** Captions */
/** Text meant only for screen readers */
.screen-reader-text {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
color: #000;
background: #fff;
}
body#tinymce {
margin: 12px !important;
}
/*# sourceMappingURL=main.css.map*/

1
dist/styles/main.css.map vendored

@ -1 +0,0 @@
{"version":3,"sources":["webpack:///./styles/resources/assets/styles/common/_variables.scss","webpack:///./styles/resources/assets/styles/main.scss","webpack:////Users/ned/Desktop/pressbooks-aldine/main.scss","webpack:///./styles/resources/assets/styles/components/_forms.scss","webpack:///./styles/resources/assets/styles/components/_wp-classes.scss","webpack:///./styles/resources/assets/styles/layouts/_tinymce.scss"],"names":[],"mappings":"AAAA;;AAGA;;ACDA;;AAGA;;;;;GCMG;;ADEH;;AEbA;;ACAA;;;GFoBG;;AEfH;;AACA;EACE;EACA;EACA;EACA;CFmBD;;AEhBD;EACE;EACA;EACA;CFmBD;;AEhBD;;EAEE;EACA;CFmBD;;AEhBD;EACE;IACE;IACA;GFmBD;;EEhBD;IACE;IACA;GFmBD;CACF;;AEhBD;;AAMA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CFgBD;;AGtED;EACE;CHyED","file":"styles/main.css","sourcesContent":["/** Colors */\n$brand-primary: #27ae60;\n\n/** Box Model */\n$spacer: 2rem;\n\n\n\n// WEBPACK FOOTER //\n// ./styles/resources/assets/styles/common/_variables.scss","@import \"common/variables\";\n\n/** Import everything from autoload */\n;\n\n/**\n * Import npm dependencies\n *\n * Prefix your imports with `~` to grab from node_modules/\n * @see https://github.com/webpack-contrib/sass-loader#imports\n */\n// @import \"~some-node-module\";\n\n/** Import theme styles */\n@import \"common/global\";\n@import \"components/buttons\";\n@import \"components/comments\";\n@import \"components/forms\";\n@import \"components/wp-classes\";\n@import \"layouts/header\";\n@import \"layouts/sidebar\";\n@import \"layouts/footer\";\n@import \"layouts/pages\";\n@import \"layouts/posts\";\n@import \"layouts/tinymce\";\n\n\n\n// WEBPACK FOOTER //\n// ./styles/resources/assets/styles/main.scss","/** Colors */\n\n/** Box Model */\n\n/** Import everything from autoload */\n\n/**\n * Import npm dependencies\n *\n * Prefix your imports with `~` to grab from node_modules/\n * @see https://github.com/webpack-contrib/sass-loader#imports\n */\n\n/** Import theme styles */\n\n/** Search form */\n\n/**\n * WordPress Generated Classes\n * @see http://codex.wordpress.org/CSS#WordPress_Generated_Classes\n */\n\n/** Media alignment */\n\n.alignnone {\n margin-left: 0;\n margin-right: 0;\n max-width: 100%;\n height: auto;\n}\n\n.aligncenter {\n display: block;\n margin: 1rem auto;\n height: auto;\n}\n\n.alignleft,\n.alignright {\n margin-bottom: 1rem;\n height: auto;\n}\n\n@media (min-width: 30rem) {\n .alignleft {\n float: left;\n margin-right: 1rem;\n }\n\n .alignright {\n float: right;\n margin-left: 1rem;\n }\n}\n\n/** Captions */\n\n/** Text meant only for screen readers */\n\n.screen-reader-text {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n color: #000;\n background: #fff;\n}\n\nbody#tinymce {\n margin: 12px !important;\n}\n\n\n\n\n// WEBPACK FOOTER //\n// /Users/ned/Desktop/pressbooks-aldine/main.scss","/** Search form */\n// TODO: .search-form {}\n// TODO: .search-form label {}\n// TODO: .search-form .search-field {}\n// TODO: .search-form .search-submit {}\n\n\n\n// WEBPACK FOOTER //\n// ./styles/resources/assets/styles/components/_forms.scss","/**\n * WordPress Generated Classes\n * @see http://codex.wordpress.org/CSS#WordPress_Generated_Classes\n */\n\n/** Media alignment */\n.alignnone {\n margin-left: 0;\n margin-right: 0;\n max-width: 100%;\n height: auto;\n}\n\n.aligncenter {\n display: block;\n margin: ($spacer / 2) auto;\n height: auto;\n}\n\n.alignleft,\n.alignright {\n margin-bottom: ($spacer / 2);\n height: auto;\n}\n\n@media (min-width: 30rem) {\n .alignleft {\n float: left;\n margin-right: ($spacer / 2);\n }\n\n .alignright {\n float: right;\n margin-left: ($spacer / 2);\n }\n}\n\n/** Captions */\n\n// TODO: .wp-caption {}\n// TODO: .wp-caption img {}\n// TODO: .wp-caption-text {}\n\n/** Text meant only for screen readers */\n.screen-reader-text {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n color: #000;\n background: #fff;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./styles/resources/assets/styles/components/_wp-classes.scss","body#tinymce {\n margin: 12px !important;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./styles/resources/assets/styles/layouts/_tinymce.scss"],"sourceRoot":""}

1
dist/styles/main_6ea252c4.css vendored

@ -0,0 +1 @@
body{color:#444;font-family:Spectral,serif}h1,h2,h3,h4,h5,h6{font-family:Karla,sans-serif}h1{font-size:30px;font-weight:600;text-transform:uppercase;letter-spacing:2px;line-height:36px}h1,h2{margin:0}h2{font-size:16px;font-weight:400;line-height:30px}a{color:#b01109}.alignnone{margin-left:0;margin-right:0;max-width:100%;height:auto}.aligncenter{display:block;margin:1rem auto;height:auto}.alignleft,.alignright{margin-bottom:1rem;height:auto}@media (min-width:30rem){.alignleft{float:left;margin-right:1rem}.alignright{float:right;margin-left:1rem}}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;color:#000;background:#fff}.banner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:560px}.banner h1{text-align:center}.banner h1 a{text-decoration:none}.banner h2,.home .block h3{text-align:center}.home .block h3{font-size:30px;font-weight:600;text-transform:uppercase;letter-spacing:2px;line-height:36px;margin:0}.home .block h3:before{display:block;width:46px;height:5px;color:#b01109}body#tinymce{margin:12px!important}

33
resources/assets/styles/common/_global.scss

@ -0,0 +1,33 @@
body {
color: $dark-grey;
font-family: Spectral, serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: Karla, sans-serif;
}
h1 {
font-size: 30px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 2px;
line-height: 36px;
margin: 0;
}
h2 {
font-size: 16px;
font-weight: normal;
line-height: 30px;
margin: 0;
}
a {
color: $brand-primary;
}

5
resources/assets/styles/common/_variables.scss

@ -1,5 +1,8 @@
/** Colors */
$brand-primary: #27ae60;
$brand-primary: #b01109;
$brand-secondary: #015d75;
$dark-grey: #444;
$black: #000;
/** Box Model */
$spacer: 2rem;

19
resources/assets/styles/layouts/_header.scss

@ -1,2 +1,21 @@
// TODO: .banner .nav li {}
// TODO: .banner .nav a {}
.banner {
display: flex;
align-items: center;
justify-content: center;
height: 560px;
}
.banner h1 {
text-align: center;
a {
text-decoration: none;
}
}
.banner h2 {
text-align: center;
}

20
resources/assets/styles/layouts/_pages.scss

@ -0,0 +1,20 @@
.home {
.block {
h3 {
font-size: 30px;
font-weight: 600;
text-align: center;
text-transform: uppercase;
letter-spacing: 2px;
line-height: 36px;
margin: 0;
&::before {
display: block;
width: 46px;
height: 5px;
color: $brand-primary;
}
}
}
}

2
resources/assets/styles/main.scss

@ -9,7 +9,7 @@
* Prefix your imports with `~` to grab from node_modules/
* @see https://github.com/webpack-contrib/sass-loader#imports
*/
// @import "~some-node-module";
// @import "~something";
/** Import theme styles */
@import "common/global";

12
resources/functions.php

@ -14,7 +14,7 @@ use Roots\Sage\Container;
* @param string $title
*/
$sage_error = function ($message, $subtitle = '', $title = '') {
$title = $title ?: __('Sage &rsaquo; Error', 'sage');
$title = $title ?: __('Sage &rsaquo; Error', 'pressbooks-aldine');
$footer = '<a href="https://roots.io/sage/docs/">roots.io/sage/docs/</a>';
$message = "<h1>{$title}<br><small>{$subtitle}</small></h1><p>{$message}</p><p>{$footer}</p>";
wp_die($message, $title);
@ -24,14 +24,14 @@ $sage_error = function ($message, $subtitle = '', $title = '') {
* Ensure compatible version of PHP is used
*/
if (version_compare('5.6.4', phpversion(), '>=')) {
$sage_error(__('You must be using PHP 5.6.4 or greater.', 'sage'), __('Invalid PHP version', 'sage'));
$sage_error(__('You must be using PHP 5.6.4 or greater.', 'pressbooks-aldine'), __('Invalid PHP version', 'pressbooks-aldine'));
}
/**
* Ensure compatible version of WordPress is used
*/
if (version_compare('4.7.0', get_bloginfo('version'), '>=')) {
$sage_error(__('You must be using WordPress 4.7.0 or greater.', 'sage'), __('Invalid WordPress version', 'sage'));
$sage_error(__('You must be using WordPress 4.7.0 or greater.', 'pressbooks-aldine'), __('Invalid WordPress version', 'pressbooks-aldine'));
}
/**
@ -40,8 +40,8 @@ if (version_compare('4.7.0', get_bloginfo('version'), '>=')) {
if (!class_exists('Roots\\Sage\\Container')) {
if (!file_exists($composer = __DIR__.'/../vendor/autoload.php')) {
$sage_error(
__('You must run <code>composer install</code> from the Sage directory.', 'sage'),
__('Autoloader not found.', 'sage')
__('You must run <code>composer install</code> from the Sage directory.', 'pressbooks-aldine'),
__('Autoloader not found.', 'pressbooks-aldine')
);
}
require_once $composer;
@ -56,7 +56,7 @@ if (!class_exists('Roots\\Sage\\Container')) {
array_map(function ($file) use ($sage_error) {
$file = "../app/{$file}.php";
if (!locate_template($file, true, true)) {
$sage_error(sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file), 'File not found');
$sage_error(sprintf(__('Error locating <code>%s</code> for inclusion.', 'pressbooks-aldine'), $file), 'File not found');
}
}, ['helpers', 'setup', 'filters', 'admin']);

2
resources/views/404.blade.php

@ -5,7 +5,7 @@
@if (!have_posts())
<div class="alert alert-warning">
{{ __('Sorry, but the page you were trying to view does not exist.', 'sage') }}
{{ __('Sorry, but the page you were trying to view does not exist.', 'pressbooks-aldine') }}
</div>
{!! get_search_form(false) !!}
@endif

29
resources/views/index.blade.php

@ -1,18 +1,19 @@
@extends('layouts.app')
@section('content')
@include('partials.page-header')
@if (!have_posts())
<div class="alert alert-warning">
{{ __('Sorry, no results were found.', 'sage') }}
</div>
{!! get_search_form(false) !!}
@endif
@while (have_posts()) @php(the_post())
@include('partials.content-'.get_post_type())
@endwhile
{!! get_the_posts_navigation() !!}
<div class="block block-one">
@php(dynamic_sidebar('home-block-one'))
</div>
<div class="block block-two">
@php(dynamic_sidebar('home-block-two'))
</div>
<div class="block block-three">
@php(dynamic_sidebar('home-block-three'))
</div>
<div class="block block-four">
@php(dynamic_sidebar('home-block-four'))
</div>
<div class="block block-five">
@php(dynamic_sidebar('home-block-five'))
</div>
@endsection

1
resources/views/layouts/app.blade.php

@ -2,6 +2,7 @@
<html @php(language_attributes())>
@include('partials.head')
<body @php(body_class())>
{{-- @include('partials.uio') --}}
@php(do_action('get_header'))
@include('partials.header')
<div class="wrap container" role="document">

8
resources/views/partials/comments.blade.php

@ -7,7 +7,7 @@ if (post_password_required()) {
<section id="comments" class="comments">
@if (have_comments())
<h2>
{!! sprintf(_nx('One response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sage'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>') !!}
{!! sprintf(_nx('One response to &ldquo;%2$s&rdquo;', '%1$s responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'pressbooks-aldine'), number_format_i18n(get_comments_number()), '<span>' . get_the_title() . '</span>') !!}
</h2>
<ol class="comment-list">
@ -18,10 +18,10 @@ if (post_password_required()) {
<nav>
<ul class="pager">
@if (get_previous_comments_link())
<li class="previous">@php(previous_comments_link(__('&larr; Older comments', 'sage')))</li>
<li class="previous">@php(previous_comments_link(__('&larr; Older comments', 'pressbooks-aldine')))</li>
@endif
@if (get_next_comments_link())
<li class="next">@php(next_comments_link(__('Newer comments &rarr;', 'sage')))</li>
<li class="next">@php(next_comments_link(__('Newer comments &rarr;', 'pressbooks-aldine')))</li>
@endif
</ul>
</nav>
@ -30,7 +30,7 @@ if (post_password_required()) {
@if (!comments_open() && get_comments_number() != '0' && post_type_supports(get_post_type(), 'comments'))
<div class="alert alert-warning">
{{ __('Comments are closed.', 'sage') }}
{{ __('Comments are closed.', 'pressbooks-aldine') }}
</div>
@endif

2
resources/views/partials/content-page.blade.php

@ -1,2 +1,2 @@
@php(the_content())
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'pressbooks-aldine'), 'after' => '</p></nav>']) !!}

2
resources/views/partials/content-single.blade.php

@ -7,7 +7,7 @@
@php(the_content())
</div>
<footer>
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'pressbooks-aldine'), 'after' => '</p></nav>']) !!}
</footer>
@php(comments_template('/partials/comments.blade.php'))
</article>

2
resources/views/partials/entry-meta.blade.php

@ -1,6 +1,6 @@
<time class="updated" datetime="{{ get_post_time('c', true) }}">{{ get_the_date() }}</time>
<p class="byline author vcard">
{{ __('By', 'sage') }} <a href="{{ get_author_posts_url(get_the_author_meta('ID')) }}" rel="author" class="fn">
{{ __('By', 'pressbooks-aldine') }} <a href="{{ get_author_posts_url(get_the_author_meta('ID')) }}" rel="author" class="fn">
{{ get_the_author() }}
</a>
</p>

3
resources/views/partials/header.blade.php

@ -1,6 +1,7 @@
<header class="banner">
<div class="container">
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
<h1><a href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a></h1>
<h2>{{ get_bloginfo('description', 'display') }}</h2>
<nav class="nav-primary">
@if (has_nav_menu('primary_navigation'))
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']) !!}

9
resources/views/partials/uio.blade.php

@ -0,0 +1,9 @@
<div class="flc-prefsEditor-separatedPanel fl-prefsEditor-separatedPanel">
<div class="flc-slidingPanel-panel flc-prefsEditor-iframe"></div>
<div class="fl-panelBar">
<span class="fl-prefsEditor-buttons">
<button id="reset" class="flc-prefsEditor-reset fl-prefsEditor-reset"><span class="fl-icon-undo"></span>{{ __('Reset', 'pressbooks-aldine') }}</button>
<button id="show-hide" class="flc-slidingPanel-toggleButton fl-prefsEditor-showHide">{{ __('Show/Hide', 'pressbooks-aldine') }}</button>
</span>
</div>
</div>

2
resources/views/search.blade.php

@ -5,7 +5,7 @@
@if (!have_posts())
<div class="alert alert-warning">
{{ __('Sorry, no results were found.', 'sage') }}
{{ __('Sorry, no results were found.', 'pressbooks-aldine') }}
</div>
{!! get_search_form(false) !!}
@endif

Loading…
Cancel
Save