diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..87ff957 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +node_modules/ +build/ +.prettierrc +.eslintrc +env.d.ts \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index bf8bb48..e27ed53 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,18 +1,29 @@ { - "env": { - "browser": true, - "es6" : true, - "node": true - }, - "extends": [ - "eslint:recommended" - ], - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module" - }, - "rules": { - "no-unused-vars": 0, - "no-undef": 2 + "parserOptions": { + "ecmaVersion": 2021, + "sourceType": "module" + }, + "extends": [ + "plugin:import/recommended", + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. + // Make sure it's always the last config, so it gets the chance to override other configs. + "eslint-config-prettier" + ], + "settings": { + "import/resolver": { + "node": { + "extensions": [".js", ".jsx", ".ts", ".tsx"], + "moduleDirectory": ["node_modules", "src/"] + } } + }, + "rules": { + "no-unused-vars": "off" + }, + "env": { + "browser": true, + "node": true + } } diff --git a/.nvmrc b/.nvmrc index d1c51cd..4a2c7c4 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.14.2 \ No newline at end of file +v17.7.1 \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5213b85 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +.prettierrc + +dist/ +node_modules/ +vendor/ +**/*.php diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..7b942a1 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,18 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "embeddedLanguageFormatting": "auto", + "endOfLine": "lf", + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "order": "alphabetical", + "printWidth": 120, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": true, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false +} diff --git a/.sass-lint.yml b/.sass-lint.yml deleted file mode 100644 index 1b36176..0000000 --- a/.sass-lint.yml +++ /dev/null @@ -1,184 +0,0 @@ -# sass-lint config generated by make-sass-lint-config v0.1.2 -# -# The following scss-lint Linters are not yet supported by sass-lint: -# ChainedClasses, DisableLinterReason, ElsePlacement, PrivateNamingConvention -# PropertyCount, PseudoElement, SelectorDepth, SpaceAfterComment -# SpaceAfterVariableColon, SpaceAroundOperator, TrailingWhitespace, UnnecessaryParentReference -# Compass::* -# -# The following settings/values are unsupported by sass-lint: -# Linter Comment, option "style" -# Linter Indentation, option "allow_non_nested_indentation" -# Linter Indentation, option "character" -# Linter NestingDepth, option "ignore_parent_selectors" -# Linter PropertySortOrder, option "min_properties" -# Linter PropertySortOrder, option "separate_groups" -# Linter PropertySpelling, option "disabled_properties" -# Linter SpaceBeforeBrace, option "allow_single_line_padding" -# Linter VendorPrefix, option "identifier_list" - -files: - include: '**/*.scss' -options: - formatter: stylish - merge-default-rules: false -rules: - bem-depth: - - 0 - - max-depth: 1 - border-zero: - - 1 - - convention: zero - brace-style: - - 1 - - style: stroustrup - - allow-single-line: true - class-name-format: - - 0 - - convention: hyphenatedlowercase - clean-import-paths: - - 1 - - filename-extension: false - leading-underscore: false - empty-line-between-blocks: - - 1 - - ignore-single-line-rulesets: true - extends-before-declarations: 1 - extends-before-mixins: 1 - final-newline: - - 0 - - include: true - force-attribute-nesting: 1 - force-element-nesting: 1 - force-pseudo-nesting: 1 - function-name-format: - - 1 - - allow-leading-underscore: true - convention: hyphenatedlowercase - hex-length: - - 1 - - style: short - hex-notation: - - 1 - - style: lowercase - id-name-format: - - 0 - - convention: hyphenatedlowercase - indentation: - - 1 - - size: 2 - leading-zero: - - 1 - - include: false - mixin-name-format: - - 1 - - allow-leading-underscore: true - convention: hyphenatedlowercase - mixins-before-declarations: 0 - nesting-depth: - - 1 - - max-depth: 4 - no-color-keywords: 1 - no-color-literals: 0 - no-css-comments: 1 - no-debug: 1 - no-duplicate-properties: 1 - no-empty-rulesets: 1 - no-extends: 0 - no-ids: 1 - no-important: 1 - no-invalid-hex: 1 - no-mergeable-selectors: 1 - no-misspelled-properties: - - 1 - - extra-properties: [] - no-qualifying-elements: - - 1 - - allow-element-with-attribute: true - allow-element-with-class: false - allow-element-with-id: false - no-trailing-zero: 1 - no-transition-all: 0 - no-url-protocols: 1 - no-vendor-prefixes: - - 1 - - additional-identifiers: [] - excluded-identifiers: [] - placeholder-in-extend: 0 - placeholder-name-format: - - 0 - - convention: hyphenatedlowercase - property-sort-order: - - 0 - - ignore-custom-properties: false - property-units: - - 1 - - global: - - ch - - em - - ex - - rem - - cm - - in - - mm - - pc - - pt - - px - - q - - vh - - vw - - vmin - - vmax - - deg - - grad - - rad - - turn - - ms - - s - - Hz - - kHz - - dpi - - dpcm - - dppx - - '%' - per-property: {} - quotes: - - 1 - - style: single - shorthand-values: - - 1 - - allowed-shorthands: - - 1 - - 2 - - 3 - - 4 - single-line-per-selector: 1 - space-after-bang: - - 1 - - include: false - space-after-colon: - - 1 - - include: true - space-after-comma: - - 1 - - include: true - space-before-bang: - - 1 - - include: true - space-before-brace: - - 1 - - include: true - space-before-colon: 1 - space-between-parens: - - 1 - - include: false - trailing-semicolon: 1 - url-quotes: 1 - variable-for-property: - - 0 - - properties: [] - variable-name-format: - - 1 - - allow-leading-underscore: true - convention: hyphenatedlowercase - zero-unit: 1 \ No newline at end of file diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..8198b4a --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,9 @@ +{ + "extends": ["stylelint-config-standard", "stylelint-config-prettier"], + "ignoreFiles": ["./build/**/*.css"], + "rules": { + "alpha-value-notation": "number", + "at-rule-no-unknown": null, + "color-function-notation": "legacy" + } +} diff --git a/404.php b/404.php index 73aa626..9b7eb22 100755 --- a/404.php +++ b/404.php @@ -7,28 +7,26 @@ get_header(); ?> -
-
-
-
-

- -

-
+
+
+
+

+ +

+
-
- It seems we can’t find what you’re looking for. Perhaps searching can help.

', - 'mc-starter' - ); - get_search_form(); - ?> -
-
+
+ It seems we can’t find what you’re looking for. Perhaps searching can help.

', + 'mc-starter' + ); + get_search_form(); + ?> +
+ - -
+
-theme_location) { return $title; } - + if ($args->walker->has_children && $depth === 0) { $title .= ' '; } diff --git a/App/Scripts.php b/App/Scripts.php index 0d0986c..9079e06 100644 --- a/App/Scripts.php +++ b/App/Scripts.php @@ -26,15 +26,9 @@ public function addHooks() */ public function enqueueScripts() { - // set the unminified file type if we're in development env. - $filename = '.min'; - if (isset($_ENV['WP_ENV']) && 'development' === $_ENV['WP_ENV']) { - $filename = ''; - } - wp_enqueue_script( 'mc-theme', - get_template_directory_uri() . "/build/js/theme{$filename}.js", + get_template_directory_uri() . "/build/scripts/theme-scripts.min.js", [], THEME_VERSION, true @@ -52,7 +46,7 @@ public function enqueueStyles() { wp_enqueue_style( 'mc-styles', - get_template_directory_uri() . '/build/css/theme.min.css', + get_template_directory_uri() . '/build/styles/theme-styles.min.css', [], THEME_VERSION ); diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b6a2a..2f1de4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,45 @@ # Change Log + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [3.2.0] - 2023-01-30 + +### Changed + +- Require PHP 8.0 as minimimum version +- Add Vue 3 to build +- Add Tailwind to build +- Upgrade to Vite 4 +- Remove UIKit + +## [3.1.0] - 2022-11-11 + +### Changed + +- Switched from [Gulp](https://gulpjs.com/) to [Vite](https://vitejs.dev/) for theme task runner (more succinct and much faster) +- Use prettier to format php files on pre-commit +- Add autoformat file configs for css, scss, js, ts, php, etc +- Added some theme scripts to help replace namespaces, text-domains and uptick theme version + ## [3.0.2] - 2022-10-26 + ### Changed + - Switch RegisterFieldGroups init hook to `acf/init` from `admin_init` ## [3.0.1] - 2022-10-24 + ### Changed + - Switch style/script enqueue to use get_template_directory_uri instead of get_stylesheet_directory_uri as requirement to support child theming. ## [3.0.0] - 2022-03-29 ### Changed + - Switched build process to use Rollup.js to support ES modules rather than modular pattern - Remove Bootstrap - Add UIKit for front end components @@ -24,71 +49,101 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Require PHP >= 7.4 ## [2.4.0] - 2019-03-29 + ### Changed + - Updated Gulp to v4 ### Added + - Added PHP CodeSniffer to gulp tasks and builds. ## [2.3.2] - 2018-10-26 + ### Changed + - Updated Bootstrap to 4.1.3. ## [2.3.2] - 2018-10-25 + ### Added + - Post Types and Taxonomies classes for consistent object registration. ### Removed + - Environment file. Will be handled in root directory in the future. ## [2.3.1] - 2018-10-16 -- Fix SQL query in getPostMeta() where the '_' was treated as a wildcard pattern. + +- Fix SQL query in getPostMeta() where the '\_' was treated as a wildcard pattern. ## [2.3.0] - 2018-05-07 + - Wrap ACF PHP field exports in text domain. ## [2.2.0] - 2018-01-15 + ### Added + - ACF Pro dependency - Page Builder template ## [2.1.1] - 2017-11-07 + ### Added + - ACF Helper function `getPostMeta()` to more efficiently get post meta fields from the DB. ### Changed + - Updated vendor autoload require to not interfere with vendor directories in the root. ## [2.1.0] - 2017-10-09 + ### Added + - Sass Lint task in Gulp ## [2.0.3] - 2017-10-09 + ### Added + - Transients class to APP/Core to help standardized data caching. ## [2.0.2] - 2017-10-03 + ### Added + - Added Yarn package manager to replace Bower ### Changed + - Default JS module in `assets/themes/` since we no longer have fluidVids as a package option. ### Removed + - Removed Bower dependencies ## [2.0.1] - 2017-09-26 + ### Changed + - Fixed sidebar widget markup elements ### Removed + - Removed leftover hybrid core elements ## [2.0.0] - 2017-08-23 + ### Removed + - Hybrid Core Framework - Build assets that were in .gitignore ## [1.0.1] - 2017-01-31 + ### Added + - Media Class to be used when registering additional image sizes diff --git a/README.md b/README.md index 5668c4c..0fa1b2c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # Modern Climate Starter Theme -Starter WordPress theme. Features [UIKit](https://getuikit.com/docs/introduction), SCSS compiler, JS linting and minifying and class based functions.php -Requires a minimum of WordPress 5.3, PHP 7.4, and Composer 2 +Starter WordPress theme. Features [Tailwind](https://tailwindcss.com/), [Vue](https://vuejs.org/), SCSS compiler, TS/JS linting and minifying and class based functions.php -MC Starter Theme is built with **Composer** and **Gulp** usage in mind and is the recommended way to use this theme. +Requires a minimum of WordPress 6.0, PHP 8.0, and Composer 2 + +MC Starter Theme is built with **Composer** and **Vite** usage in mind and is the recommended way to use this theme. ## What tools do I need to use the theme? + 1. [Node.js](https://github.com/ModernClimate/mc-wp-starter-theme/wiki/Install-Node.js) 2. [NVM](https://github.com/nvm-sh/nvm) 3. [Yarn](https://yarnpkg.com/en/docs/install) @@ -13,64 +15,59 @@ MC Starter Theme is built with **Composer** and **Gulp** usage in mind and is th 5. [PHP](https://www.php.net/supported-versions.php) ## Instructions -1. `$ nvm i` : Installs and switches to necessary node defined in `.nvmrc` -2. `$ yarn install` : Install yarn packages _(postinstall will run composer install and gulp build)_ - -## Gulp Commands -All minified assets are created to the `/build/` directory of the theme. -ex: `yarn gulp styles` to run commands exported from gulpfile.js - -`$ gulp` : Runs linters and PHPCS, then compiles both minified and non-minified assets - -`$ gulp watch` : Watches assets/scss, assets/js, then compiles non-minified build assets - -`$ gulp watchDev` : Watches assets/scss, assets/js, then compiles minified build assets - -`$ gulp build` : Runs linters and PHPCS, then compiles minified assets - -`$ gulp buildDev` : Runs linters and PHPCS, then compiles non-minified assets -`$ gulp js` : Compiles theme.min.js file from assets/js/theme directory. - -`$ gulp jsDev` : Compiles theme.js file from assets/js/theme directory. +1. `$ nvm i` : Installs and switches to necessary node defined in `.nvmrc` +2. `$ yarn install` : Install yarn packages _(postinstall will run composer install and vite build)_ -`$ gulp styles` : Compiles minified (_.min.css) files based on root scss files in assets/scss directory. +## Vite Commands -`$ gulp stylesDev` : Compiles non-minified files based on root scss files in assets/scss directory. +All minified assets are created to the `/build/` directory of the theme. -`$ gulp phpcs` : Runs PHP Code Sniffer on all *.php files within the theme directory. +`$ yarn run build` : Builds assets folder, then compiles minified assets -`$ gulp phpcbf` : Runs PHP Code Beautifier on all *.php files within the theme directory. +`$ yarn run watch` : Watches assets folder for changes, then compiles minified assets ## Composer notes + If you decide to update the `psr-4` namespace prefix, you can use dump-autoload to do that without having to go through an install or update. + ``` composer dump-autoload ``` ## Resources + 1. [PSR-4 Autoloader](http://www.php-fig.org/psr/psr-4/) 2. [PSR-2 PHP Coding Style Guide](http://www.php-fig.org/psr/psr-2/) -3. [BEM Introduction](http://getbem.com/introduction/) -4. [Sass 7-1 Pattern](https://sass-guidelin.es/#the-7-1-pattern) -5. [Sass Lint](https://github.com/sasstools/sass-lint) -6. [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) -7. [Wordplate Extended ACF](https://github.com/wordplate/extended-acf) -7. [UIkit](https://getuikit.com/) +3. [Wordplate Extended ACF](https://github.com/wordplate/extended-acf) +4. [Vite](https://vitejs.dev/) +5. [Vue](https://vuejs.org/) +6. [TypeScript](https://www.typescriptlang.org/) +7. [Tailwind](https://tailwindcss.com/) +8. [BEM Introduction](http://getbem.com/introduction/) +9. [Sass 7-1 Pattern](https://sass-guidelin.es/#the-7-1-pattern) +10. [Sass Lint](https://github.com/sasstools/sass-lint) +11. [Prettier](https://prettier.io/) ## ACF Documentation + - Wordplate Extended ACF is included as the means to build fields, field groups, reusable fields - Custom `ACF Utility Functions` are included in the theme to retrieve ACF data in a more effecient way: (https://github.com/ModernClimate/mc-wp-starter-theme/blob/master/doc/acf/README.md) ## Extensions + Check out the [Code Snippets Repo](https://github.com/ModernClimate/ad-code-snippets) for additional functionality. ## Documentation -* [ACF Utility Functions](https://github.com/ModernClimate/mc-wp-starter-theme/blob/master/doc/acf/README.md) + +- [ACF Utility Functions](https://github.com/ModernClimate/mc-wp-starter-theme/blob/master/doc/acf/UtilityFunctions.md) +- [ACF Field Registration](https://github.com/ModernClimate/mc-wp-starter-theme/blob/master/doc/acf/FieldRegistration.md) +- [Setting up autoformat on save in your code editor](https://github.com/ModernClimate/mc-wp-starter-theme/blob/master/doc/Autoformatting.md) ## Copyright and License + The following resources are included or used in part within the theme package. -* [Underscores](http://underscores.me/) by Automattic, Inc. - Licensed under the [GPL, version 2 or later](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). +- [Underscores](http://underscores.me/) by Automattic, Inc. - Licensed under the [GPL, version 2 or later](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). All other resources and theme elements are licensed under the [GNU GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html), version 2 or later. diff --git a/archive.php b/archive.php index 9646315..eed999b 100755 --- a/archive.php +++ b/archive.php @@ -9,25 +9,23 @@ get_header(); ?> -
-
-
- +
+ -
+ } else { + // Loads the content/singular/page.php template. + get_template_part('content/content', 'none'); + } + ?> + - -
+
{ - -} - -export default init diff --git a/assets/js/theme.js b/assets/js/theme.js deleted file mode 100755 index 9684e08..0000000 --- a/assets/js/theme.js +++ /dev/null @@ -1,3 +0,0 @@ -import initSlideshows from './theme/slideshow' - -initSlideshows() diff --git a/assets/js/theme/UIkit.js b/assets/js/theme/UIkit.js deleted file mode 100644 index cbce946..0000000 --- a/assets/js/theme/UIkit.js +++ /dev/null @@ -1,15 +0,0 @@ -import UIkit from 'uikit/dist/js/uikit-core' -import Slider from 'uikit/src/js/components/slider' -import Slideshow from 'uikit/src/js/components/slideshow' - -// Add individual components imported from UIKit below -const components = [ - {name: 'slider', component: Slider}, - {name: 'slideshow', component: Slideshow}, -] - -components.forEach(({ name, component }) => { - UIkit.component(name, component) -}) - -export default UIkit diff --git a/assets/js/theme/jqExample.js b/assets/js/theme/jqExample.js deleted file mode 100644 index 14e5768..0000000 --- a/assets/js/theme/jqExample.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Be sure to add jquery as a dependency in App/Scripts.php so that it is available - * to this script before it initializes - */ - -/* eslint-env jquery */ -const $ = jQuery - -const initWithJq = () => { - if (typeof $ === 'undefined') { - console.log('jQuery is not loaded.') - return false - } - - const body = $('body') - console.log('jQuery is loaded.', body.length) -} - -export default initWithJq diff --git a/assets/js/theme/slideshow.js b/assets/js/theme/slideshow.js deleted file mode 100644 index a68eb92..0000000 --- a/assets/js/theme/slideshow.js +++ /dev/null @@ -1,8 +0,0 @@ -import UIkit from './UIKit' - -const initSlideshows = () => { - const slideshows = UIkit - .slideshow('.uk-slideshow', {}) -} - -export default initSlideshows diff --git a/assets/scripts/@types/global.d.ts b/assets/scripts/@types/global.d.ts new file mode 100644 index 0000000..1d76adb --- /dev/null +++ b/assets/scripts/@types/global.d.ts @@ -0,0 +1,7 @@ +declare module '*.vue' { + // NOTE: ts-loader + import { defineComponent } from 'vue'; + + const component: ReturnType; + export default component; +} diff --git a/assets/scripts/admin-scripts.ts b/assets/scripts/admin-scripts.ts new file mode 100644 index 0000000..fcebe1a --- /dev/null +++ b/assets/scripts/admin-scripts.ts @@ -0,0 +1,3 @@ +import init from './admin/jsModule'; + +init(); diff --git a/assets/scripts/admin/jsModule.ts b/assets/scripts/admin/jsModule.ts new file mode 100644 index 0000000..bd20256 --- /dev/null +++ b/assets/scripts/admin/jsModule.ts @@ -0,0 +1,5 @@ +const init = () => { + console.log('theme admin scripts initialized'); +}; + +export default init; diff --git a/assets/scripts/theme-scripts.ts b/assets/scripts/theme-scripts.ts new file mode 100755 index 0000000..94f817a --- /dev/null +++ b/assets/scripts/theme-scripts.ts @@ -0,0 +1,11 @@ +import { createApp } from 'vue'; +import Component1 from './theme/components/Component1.vue'; +import Carousel from './theme/components/Carousel.vue'; + +const app1 = createApp(Component1); +app1.mount('#component-1'); + +document.querySelectorAll('.component-2').forEach((el) => { + const app2 = createApp(Carousel); + app2.mount(el); +}); diff --git a/assets/scripts/theme/components/Carousel.vue b/assets/scripts/theme/components/Carousel.vue new file mode 100644 index 0000000..56d587e --- /dev/null +++ b/assets/scripts/theme/components/Carousel.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/assets/scripts/theme/components/Component1.vue b/assets/scripts/theme/components/Component1.vue new file mode 100644 index 0000000..ae7c38e --- /dev/null +++ b/assets/scripts/theme/components/Component1.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/assets/scripts/theme/slideshow.ts b/assets/scripts/theme/slideshow.ts new file mode 100644 index 0000000..e0b7301 --- /dev/null +++ b/assets/scripts/theme/slideshow.ts @@ -0,0 +1,5 @@ +const initSlideshows = () => { + console.log('slideshows loaded'); +}; + +export default initSlideshows; diff --git a/assets/scss/abstracts/_variables.scss b/assets/scss/abstracts/_variables.scss deleted file mode 100755 index 9e522e7..0000000 --- a/assets/scss/abstracts/_variables.scss +++ /dev/null @@ -1,53 +0,0 @@ -// Variables - -// Directories -$images: '../../assets/images'; - -// Colors -$black: #000; -$white: #fff; - -$black-10: rgba($black, .1); -$black-20: rgba($black, .2); -$black-30: rgba($black, .3); -$black-40: rgba($black, .4); -$black-50: rgba($black, .5); -$black-60: rgba($black, .6); -$black-70: rgba($black, .7); -$black-80: rgba($black, .8); -$black-90: rgba($black, .9); - -$white-10: rgba($white, .1); -$white-20: rgba($white, .2); -$white-30: rgba($white, .3); -$white-40: rgba($white, .4); -$white-50: rgba($white, .5); -$white-60: rgba($white, .6); -$white-70: rgba($white, .7); -$white-80: rgba($white, .8); -$white-90: rgba($white, .9); - -// UIkit custom variables - -// For more variables that can be overridden: -// /node_modules/uikit/src/scss/variables-theme.scss - -// Borders -$global-border-radius: 0; - -// Screen widths -$container-max-width: 1200px; -$container-xsmall-max-width: 750px; -$container-small-max-width: 900px; -$container-large-max-width: 1400px; -$container-xlarge-max-width: 1600px; - -// Breakpoints -$breakpoint-small: 640px; -$breakpoint-medium: 960px; -$breakpoint-large: 1200px; -$breakpoint-xlarge: 1600px; -$breakpoint-xsmall-max: ($breakpoint-small - 1); -$breakpoint-small-max: ($breakpoint-medium - 1); -$breakpoint-medium-max: ($breakpoint-large - 1); -$breakpoint-large-max: ($breakpoint-xlarge - 1); diff --git a/assets/scss/vendors/.gitkeep b/assets/scss/vendors/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/assets/scss/vendors/_custom-ui-kit.scss b/assets/scss/vendors/_custom-ui-kit.scss deleted file mode 100644 index 1620df1..0000000 --- a/assets/scss/vendors/_custom-ui-kit.scss +++ /dev/null @@ -1,15 +0,0 @@ -// Required for imported component styles to work. Override any of these imported variables under /assets/scss/abstracts/_variables.scss -@import "node_modules/uikit/src/scss/variables-theme.scss"; -@import "node_modules/uikit/src/scss/mixins-theme.scss"; - -// Import component styles from UIkit here. Documentation can be found at [https://getuikit.com/docs/introduction]. -@import "node_modules/uikit/src/scss/components/container.scss"; -@import "node_modules/uikit/src/scss/components/dotnav.scss"; -@import "node_modules/uikit/src/scss/components/flex.scss"; -@import "node_modules/uikit/src/scss/components/grid.scss"; -@import "node_modules/uikit/src/scss/components/position.scss"; -@import "node_modules/uikit/src/scss/components/slidenav.scss"; -@import "node_modules/uikit/src/scss/components/slider.scss"; -@import "node_modules/uikit/src/scss/components/slideshow.scss"; -@import "node_modules/uikit/src/scss/components/visibility.scss"; -@import "node_modules/uikit/src/scss/components/width.scss"; diff --git a/assets/scss/abstracts/_mixins.scss b/assets/styles/abstracts/_mixins.scss similarity index 98% rename from assets/scss/abstracts/_mixins.scss rename to assets/styles/abstracts/_mixins.scss index eef58b8..7c3f0ae 100644 --- a/assets/scss/abstracts/_mixins.scss +++ b/assets/styles/abstracts/_mixins.scss @@ -4,4 +4,4 @@ @function _calc-rem($size) { $rem-size: $size / 16px; @return #{$rem-size}rem; -} \ No newline at end of file +} diff --git a/assets/styles/abstracts/_variables.scss b/assets/styles/abstracts/_variables.scss new file mode 100755 index 0000000..d6955f8 --- /dev/null +++ b/assets/styles/abstracts/_variables.scss @@ -0,0 +1,4 @@ +// Variables + +// Directories +$images: '../../assets/images'; diff --git a/assets/scss/base/_accessibility.scss b/assets/styles/base/_accessibility.scss similarity index 93% rename from assets/scss/base/_accessibility.scss rename to assets/styles/base/_accessibility.scss index 57485ee..0dbe393 100644 --- a/assets/scss/base/_accessibility.scss +++ b/assets/styles/base/_accessibility.scss @@ -4,17 +4,17 @@ // Text meant only for screen readers. .screen-reader-text { clip: rect(1px, 1px, 1px, 1px); - position: absolute !important; + word-wrap: normal !important; // Many screen reader and browser combinations announce broken words as they would appear visually. height: 1px; - width: 1px; overflow: hidden; - word-wrap: normal !important; // Many screen reader and browser combinations announce broken words as they would appear visually. + position: absolute !important; + width: 1px; &:focus { + clip: auto !important; background-color: #f1f1f1; border-radius: 3px; - box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6); - clip: auto !important; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); color: #494949; display: block; font-size: 1rem; @@ -28,4 +28,4 @@ width: auto; z-index: 100000; // Above WP toolbar. } -} \ No newline at end of file +} diff --git a/assets/scss/base/_base.scss b/assets/styles/base/_base.scss similarity index 98% rename from assets/scss/base/_base.scss rename to assets/styles/base/_base.scss index 4266ce6..df26fb3 100644 --- a/assets/scss/base/_base.scss +++ b/assets/styles/base/_base.scss @@ -7,4 +7,4 @@ body { word-wrap: break-word; text-rendering: optimizeLegibility; -} \ No newline at end of file +} diff --git a/assets/scss/base/_entry-content.scss b/assets/styles/base/_entry-content.scss similarity index 96% rename from assets/scss/base/_entry-content.scss rename to assets/styles/base/_entry-content.scss index 52174a5..9ee8240 100644 --- a/assets/scss/base/_entry-content.scss +++ b/assets/styles/base/_entry-content.scss @@ -30,12 +30,12 @@ } table { - width: 100%; - margin: 0 0 1.6em; - table-layout: fixed; - border-spacing: 0; border-collapse: separate; + border-spacing: 0; border-width: 1px 0 0 1px; + margin: 0 0 1.6em; + table-layout: fixed; + width: 100%; } caption, @@ -45,8 +45,8 @@ } th { - font-weight: bold; border-width: 0 1px 1px 0; + font-weight: bold; } td { @@ -55,7 +55,7 @@ th, td { - padding: .4em; + padding: 0.4em; } ol, @@ -64,7 +64,6 @@ } ol { - li { list-style-type: decimal; margin-bottom: 5px; @@ -72,13 +71,10 @@ ol { margin-bottom: 0; } - } - } ul { - li { list-style-type: disc; margin-bottom: 5px; @@ -86,9 +82,7 @@ ul { margin-bottom: 0; } - } - } blockquote { @@ -96,8 +90,8 @@ } img { - max-width: 100%; height: auto; + max-width: 100%; } .alignleft { @@ -111,8 +105,8 @@ } .aligncenter { - margin: 0 auto 15px; display: block; + margin: 0 auto 15px; } .wp-caption-text { @@ -123,16 +117,15 @@ p { margin-bottom: 0; } - } pre { - font-family: monospace; + background: #eee; display: block; + font-family: monospace; margin: 15px 0; padding: 15px; white-space: pre; - background: #eee; } sub, @@ -144,11 +137,10 @@ } sup { - top: -.5em; + top: -0.5em; } sub { - bottom: -.25em; + bottom: -0.25em; } - } diff --git a/assets/scss/base/_media.scss b/assets/styles/base/_media.scss similarity index 100% rename from assets/scss/base/_media.scss rename to assets/styles/base/_media.scss diff --git a/assets/scss/base/_reset.scss b/assets/styles/base/_reset.scss similarity index 99% rename from assets/scss/base/_reset.scss rename to assets/styles/base/_reset.scss index 407fa34..71f153c 100644 --- a/assets/scss/base/_reset.scss +++ b/assets/styles/base/_reset.scss @@ -81,11 +81,11 @@ time, mark, audio, video { - margin: 0; - padding: 0; border: 0; font-size: 100%; font: inherit; + margin: 0; + padding: 0; vertical-align: baseline; } @@ -129,4 +129,4 @@ q:after { table { border-collapse: collapse; border-spacing: 0; -} \ No newline at end of file +} diff --git a/assets/scss/base/_typography.scss b/assets/styles/base/_typography.scss similarity index 100% rename from assets/scss/base/_typography.scss rename to assets/styles/base/_typography.scss diff --git a/assets/scss/components/blocks/_shared.scss b/assets/styles/components/blocks/_shared.scss similarity index 93% rename from assets/scss/components/blocks/_shared.scss rename to assets/styles/components/blocks/_shared.scss index 8ebdbf7..7bde769 100644 --- a/assets/scss/components/blocks/_shared.scss +++ b/assets/styles/components/blocks/_shared.scss @@ -1,3 +1,3 @@ .wp-block { max-width: 100%; -} \ No newline at end of file +} diff --git a/assets/scss/editor.scss b/assets/styles/editor-styles.scss similarity index 88% rename from assets/scss/editor.scss rename to assets/styles/editor-styles.scss index e67c9bd..1e7b3a4 100644 --- a/assets/scss/editor.scss +++ b/assets/styles/editor-styles.scss @@ -5,7 +5,6 @@ // Framework @import 'abstracts/mixins'; @import 'abstracts/variables'; -@import 'vendors/custom-ui-kit'; // Base @import 'base/typography'; diff --git a/assets/scss/layout/.gitkeep b/assets/styles/layout/.gitkeep similarity index 100% rename from assets/scss/layout/.gitkeep rename to assets/styles/layout/.gitkeep diff --git a/assets/scss/pages/.gitkeep b/assets/styles/pages/.gitkeep similarity index 100% rename from assets/scss/pages/.gitkeep rename to assets/styles/pages/.gitkeep diff --git a/assets/scss/theme.scss b/assets/styles/theme-styles.scss similarity index 89% rename from assets/scss/theme.scss rename to assets/styles/theme-styles.scss index a811307..24f2cd3 100644 --- a/assets/scss/theme.scss +++ b/assets/styles/theme-styles.scss @@ -4,7 +4,6 @@ // Framework @import 'abstracts/mixins'; @import 'abstracts/variables'; -@import 'vendors/custom-ui-kit'; // Base @import 'base/reset'; diff --git a/blocks/src/content/index.js b/blocks/src/content/index.js index 3e78614..d35ccdb 100755 --- a/blocks/src/content/index.js +++ b/blocks/src/content/index.js @@ -1,22 +1,20 @@ /** * WordPress dependencies */ -import { __ } from "@wordpress/i18n"; -import { Fragment } from "@wordpress/element"; -import { InnerBlocks } from "@wordpress/block-editor"; +import { __ } from '@wordpress/i18n'; +import { Fragment } from '@wordpress/element'; +import { InnerBlocks } from '@wordpress/block-editor'; -const name = "mc-blocks/content"; +const name = 'mc-blocks/content'; const settings = { - title: __("Content", "mc-starter"), - category: "mc_blocks", - description: __("Standard content display", "mc-starter"), - icon: "format-aside", + title: __('Content', 'mc-starter'), + category: 'mc_blocks', + description: __('Standard content display', 'mc-starter'), + icon: 'format-aside', edit: () => { const ALLOWED_BLOCKS = ['core/classic']; - const TEMPLATE = [ - ['core/freeform'] - ]; + const TEMPLATE = [['core/freeform']]; return ( @@ -41,4 +39,4 @@ const settings = { }, }; -export { settings, name }; \ No newline at end of file +export { settings, name }; diff --git a/blocks/src/index.js b/blocks/src/index.js index 831ec66..377a7e4 100755 --- a/blocks/src/index.js +++ b/blocks/src/index.js @@ -1,10 +1,10 @@ -import "@wordpress/block-editor"; -import { registerBlockType } from "@wordpress/blocks"; +import '@wordpress/block-editor'; +import { registerBlockType } from '@wordpress/blocks'; /** * Import blocks */ -import * as content from "./content"; +import * as content from './content'; /** * Function to register an individual block. diff --git a/components/modules/carousel.php b/components/modules/carousel.php index 9279276..5507991 100644 --- a/components/modules/carousel.php +++ b/components/modules/carousel.php @@ -1,4 +1,5 @@