[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [lukeraymonddowning]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. iOS]\n - Browser [e.g. chrome, safari]\n - Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Browser [e.g. stock browser, safari]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".gitignore",
    "content": "/node_modules/\n/vendor/\n/dist/\n/compiled/*.php\nstyle.css\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at lukeraymonddowning@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Pull requests are gladly accepted for bugs, improvements and features.\n\nPlease explain why you think a certain feature needs adding, in as much detail as possible, using Github comments. \nThis will make it much more likely for your code to make it into the repository.\n\nThank you so much for all your hard work. People like you make Open Source awesomesauce.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Luke Downing\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# MountainBreeze\nA Wordpress theme template for the modern web developer.\n\n# Features\n- [Tailwind CSS](https://tailwindcss.com) baked in\n- [Alpine JS](https://github.com/alpinejs/alpine) baked in\n- [The Laravel Blade templating engine](https://laravel.com/docs/6.x/blade)\n- [Laravel Collections](https://laravel.com/docs/6.x/collections)\n- [Laravel Mix](https://laravel-mix.com)\n- jQuery removed by default\n\n# Getting started\nWe've made Mountain Breeze super quick to get up and running, allowing you to start developing your theme in seconds.\n\nRequirements:\n- Composer\n- NPM\n\nFrom the `wp-content/themes` directory of your Wordpress development environment, run \n\n```bash\ncomposer create-project lukeraymonddowning/mountain-breeze\n```\n\nIf you want to do things manually, clone, fork or download the repository to your Wordpress 'wp-content/themes' directory.\n\nThen, from the theme directory, run ```$ composer install``` from the terminal or command prompt. The theme will automatically run ```$ npm install``` for you and even build the needed stylesheets for you.\n\n# Our motivation\nWordpress powers over 1/3rd of the internet, which is just insane when you think about it. Whilst it\nis a powerful platform with a low barrier to entry, we also think it can be a messy platform, \nand parts of it are beginning to show their age. \n\nEspecially when compared to a framework like Laravel, Wordpress can become a burden to develop in. \nBut it doesn't have to be. In fact, with just a little tweaking, you can have the best of both worlds.\n\nThis is our *opinionated* Wordpress theme setup. These opinions come from years of developing with Wordpress\nand Laravel, of using jQuery and Alpine, of using Bootstrap and Tailwind, and from seeing what made our lives as developers easier.\n\nWe include libraries that we think truly add value, remove ones we feel don't, \nand give you the flexibility to make any adjustments you want.\n\nOur thanks goes to the many creators and contributors behind Laravel, Tailwind CSS, Alpine JS and all of\ntheir components for providing such an outstanding experience for web developers. Without them, none of this\nwould be possible.\n\nHappy coding!\n\n# Building assets\nMountain Breeze builds your style.css and js files using Laravel Mix. This allows you to use the latest\nJavascript features and advanced CSS.\n\nTo build your assets for development, run ```$ npm run dev``` from the theme directory in the terminal.\n\nWhen you're ready for production, run ```$ npm run prod``` from the theme directory in the terminal. This\nwill minify and prepare your files ready for go live.\n\n# Using Blade\nMountain Breeze ships with Blade support baked in. Blade is a powerful templating engine provided in the \nLaravel framework, and developers love it for the power it offers whilst remaining easy and enjoyable\nto use.\n\nAll blade files are stored in the theme's 'templates' directory. Mountain Breeze can automatically detect\nwhich wordpress template file it should use and, if a matching blade file exists, will use that instead.\nYou don't even have to include the corresponding template file (eg: page.php) in the root directory.\n\nWe have already done this for you for the index.php file, which you can find at 'templates/index.blade.php'.\n\nBut it gets even better. The Wordpress Loop is one of the most common patterns in Wordpress development.\nTo help with this, Mountain Breeze includes a custom blade directive: ```@loop```. This allows you to \nquickly implement the Wordpress loop in any template file. Here is an example:\n\n```\n<div>\n    @loop\n        <h3>{{ the_title(); }}</h3>\n        <p>{{ the_excerpt(); }}</p>\n    @endloop\n</div>\n```\n\nPretty awesome, huh?\n\nFor more details on using blade, check out the documentation at https://laravel.com/docs/6.x/blade\n\n# Using Tailwind\nTailwind is baked right into Mountain Breeze, and you can start using it right away. In fact, \nyou can check out our example index file in 'templates/index.blade.php' to see it in use.\n\nIf you would like to customise Tailwind, you can edit the included tailwind.config.js file.\nAvailable options can be found at https://tailwindcss.com/docs/configuration\n\nBy default, we purge all `.blade.php` files in the `template` directory. If you have other files\nthat include Tailwind classes, you need to add them to the purge array in the tailwind config\nfile.\n\n# Using Alpine\nAlpine is baked right into Mountain Breeze, and you can start using it right away. In fact,\nyou can check out our example index file in 'templates/index.blade.php' to see it in use.\n\n# Using Collections\nLaravel Collections provide an awesome wrapper around arrays, and provide many useful utilities\nto make developing easier. You can create a Collection by calling the ```collect(array $array)```\nhelper function.\n\nFor more details on using collections, check out the documentation at https://laravel.com/docs/6.x/collections\n\n# Using Mix\nLaravel Mix is a webpack wrapper that take the complexity out of webpack. Especially for newer developers,\nwebpack can be one of the biggest hurdles to development, but the power it offers cannot be taken lightly.\n\nMix takes all the pain out of webpack, leaving you with the power you need. Our default mix configuration\nshould suffice for most projects, but if you want to customise it further, check out the documentation at\nhttps://laravel-mix.com\n\n# No jQuery?\njQuery has been and always will be close to our hearts. For years, it was the only real way to endure\njavascript development on the web. But the web has finally caught up, and the problems that once plagued\nit don't really exist anymore. Especially for simple Wordpress sites, jQuery is nothing more than an\nunnecessary burden that hogs resources and user bandwidth.\n\nWe believe libraries like Alpine JS offer a much nicer syntax at a much lower cost, so we opted to remove\njQuery by default in the theme. \n\nIf you really can't do without it, you can get it back by pasting the following code in your functions.php file:\n\n```\npublic function enablejQuery()\n{\n    return true;\n}\n``` \n"
  },
  {
    "path": "compiled/.gitignore",
    "content": ""
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"lukeraymonddowning/mountain-breeze\",\n    \"description\": \"A Wordpress theme implementing Tailwind CSS and Alpine JS, and removing jQuery once and for all.\",\n    \"type\": \"library\",\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Luke Downing\",\n            \"email\": \"lukeraymonddowning@gmail.com\"\n        }\n    ],\n    \"require\": {\n        \"illuminate/view\": \"^8.0\",\n        \"illuminate/events\": \"^8.0\",\n        \"illuminate/filesystem\": \"^8.0\"\n    },\n    \"scripts\": {\n        \"post-install-cmd\": \"npm install\"\n    }\n}\n"
  },
  {
    "path": "functions.php",
    "content": "<?php\n\n/**\n * In order to avoid cluttering your functions file, we include our file here at\n * the top. It is responsible for enqueuing our styles (such as Tailwind CSS),\n * script files (including Alpine), and enabling Blade templating support.\n */\nrequire_once __DIR__ . '/mountainbreeze/functions.php';\n\n/**\n * Build something amazing...\n */\n"
  },
  {
    "path": "index.php",
    "content": "<?php\n\n/**\n * We have to include this to be classed as a valid theme, but don't use it.\n * Mountain Breeze has the full power of Laravel Blade. Try editing the\n * included index.blade.php file in the templates directory!\n */\n\n"
  },
  {
    "path": "mix-manifest.json",
    "content": "{\n    \"/dist/app.js\": \"/dist/app.js\",\n    \"/style.css\": \"/style.css\"\n}\n"
  },
  {
    "path": "mountainbreeze/functions.php",
    "content": "<?php\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Illuminate\\View\\Factory;\nuse Illuminate\\Events\\Dispatcher;\nuse Illuminate\\View\\FileViewFinder;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\View\\Engines\\PhpEngine;\nuse Illuminate\\View\\Engines\\EngineResolver;\nuse Illuminate\\View\\Engines\\CompilerEngine;\nuse Illuminate\\View\\Compilers\\BladeCompiler;\n\n$GLOBALS['filesystem'] = new Filesystem;\n$GLOBALS['compiler'] = new BladeCompiler($GLOBALS['filesystem'], getCompiledTemplateDirectory());\n\nadd_action('init', function() {\n    $GLOBALS['compiler']->component('partials.the_loop', 'loop');\n});\n\nadd_action('wp_enqueue_scripts', function () {\n    if (!function_exists('enablejQuery') || !enablejQuery()) {\n        wp_deregister_script('jquery');\n    }\n    wp_enqueue_style('style', get_stylesheet_uri());\n    wp_enqueue_script('app', get_stylesheet_directory_uri() . '/dist/app.js');\n});\n\nadd_filter('template_include', function ($template) {\n    $templateName = wp_basename(wp_basename($template, '.php'), '.blade');\n    if (getBladeViewFactory()->exists($templateName)) {\n        $GLOBALS['template_name'] = $templateName;\n        $template = __DIR__ . '/../mountainbreeze/index.php';\n    }\n\n    return $template;\n});\n\ncollect([\n    'index',\n    '404',\n    'archive',\n    'author',\n    'category',\n    'tag',\n    'taxonomy',\n    'date',\n    'embed',\n    'home',\n    'frontpage',\n    'privacypolicy',\n    'page',\n    'paged',\n    'search',\n    'single',\n    'singular',\n    'attachment'\n])->each(function($type) {\n    add_filter(\"{$type}_template_hierarchy\", function($templates) {\n        return collect($templates)->map(function($template) {\n            $filename = wp_basename($template, '.php');\n            return [\"templates/$filename.blade.php\", $template];\n        })->flatten()\n          ->toArray();\n    });\n});\n\nfunction getBladeViewFactory()\n{\n    $viewResolver = new EngineResolver;\n\n    $viewResolver->register('blade', function () {\n        return new CompilerEngine($GLOBALS['compiler']);\n    });\n\n    $viewResolver->register('php', function () {\n        return new PhpEngine;\n    });\n\n    return new Factory(\n        $viewResolver,\n        new FileViewFinder($GLOBALS['filesystem'], getTemplateDirectory()),\n        new Dispatcher()\n    );\n}\n\nfunction getTemplateDirectory()\n{\n    return [__DIR__ . '/../templates/'];\n}\n\nfunction getCompiledTemplateDirectory()\n{\n    return __DIR__ . '/../compiled/';\n}\n"
  },
  {
    "path": "mountainbreeze/index.php",
    "content": "<?php\n\n/**\n * If the theme detects that there is a blade equivalent of the\n * template it is currently trying to load, it will instead\n * redirect here, which will then load the blade file\n */\n\necho getBladeViewFactory()->make($GLOBALS['template_name'], [\n    \"data\" => [1, 2, 3, 4]\n])->render();\n\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"mountain-breeze\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A Wordpress theme implementing Tailwind CSS and Alpine JS, and removing jQuery once and for all.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"development\": \"mix\",\n    \"dev\": \"npm run development\",\n    \"watch\": \"mix watch\",\n    \"watch-poll\": \"mix watch -- --watch-options-poll=1000\",\n    \"hot\": \"mix watch --hot\",\n    \"production\": \"mix --production\",\n    \"postinstall\": \"npm run dev\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/lukeraymonddowning/MountainBreeze.git#mountainbreeze\"\n  },\n  \"keywords\": [\n    \"wordpress\",\n    \"php\",\n    \"tailwindcss\",\n    \"alpinejs\",\n    \"jquery\",\n    \"theme\"\n  ],\n  \"author\": \"Luke Raymond Downing\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/lukeraymonddowning/MountainBreeze/issues\"\n  },\n  \"homepage\": \"https://github.com/lukeraymonddowning/MountainBreeze/tree/mountainbreeze#readme\",\n  \"dependencies\": {\n    \"alpinejs\": \"^2.0\",\n    \"tailwindcss\": \"^2.0\"\n  },\n  \"devDependencies\": {\n    \"cross-env\": \"^7.0.0\",\n    \"laravel-mix\": \"^6.0\"\n  }\n}\n"
  },
  {
    "path": "src/scripts/app.js",
    "content": "import 'alpinejs'\n\n"
  },
  {
    "path": "tailwind.config.js",
    "content": "module.exports = {\n  purge: [\n      \"./templates/**/*.blade.php\"\n  ],\n  theme: {\n    extend: {},\n  },\n  variants: {},\n  plugins: [],\n}\n"
  },
  {
    "path": "templates/index.blade.php",
    "content": "@extends('layouts.app')\n\n@section('content')\n    <div class=\"flex items-center h-screen bg-blue-900 bg-example\">\n        <div class=\"max-w-5xl m-auto bg-white rounded-lg w-3/4 h-64 flex items-center shadow-xl\" x-data=\"{ showPhrase: true }\">\n            <h1 class=\"w-full text-center text-3xl md:text-5xl font-mono\" @mouseover=\"showPhrase = false\" @mouseout=\"showPhrase = true\" x-text=\"showPhrase ? 'Build Something Amazing...' : '...With Mountain Breeze'\"></h1>\n        </div>\n    </div>\n@endsection\n"
  },
  {
    "path": "templates/layouts/app.blade.php",
    "content": "@include('partials.header')\n\n@yield('content')\n\n@include('partials.footer')\n"
  },
  {
    "path": "templates/partials/footer.blade.php",
    "content": "@php(wp_footer())\n</body>\n</html>\n"
  },
  {
    "path": "templates/partials/header.blade.php",
    "content": "<!DOCTYPE html>\n<html {{ language_attributes() }}>\n<head>\n    <meta charset=\"{{ get_bloginfo( 'charset' ) }}\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n    @php(wp_head())\n</head>\n<body @php(body_class())>\n@php(wp_body_open())\n"
  },
  {
    "path": "templates/partials/the_loop.blade.php",
    "content": "@if(have_posts())\n    @while(have_posts())\n        @php(the_post())\n        {{ $slot }}\n    @endwhile\n@endif\n"
  },
  {
    "path": "webpack.mix.js",
    "content": "let mix = require(\"laravel-mix\");\n\nmix.js(`src/scripts/app.js`, \"dist/\")\n    .postCss(`src/styles/style.css`, \"./\", [require(\"tailwindcss\")]);\n"
  }
]