diff --git a/bartik/.browserslistrc b/bartik/.browserslistrc new file mode 100644 index 0000000..9dee646 --- /dev/null +++ b/bartik/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not ie <= 8 diff --git a/bartik/.editorconfig b/bartik/.editorconfig new file mode 100644 index 0000000..7053c49 --- /dev/null +++ b/bartik/.editorconfig @@ -0,0 +1,5 @@ +[*.{js,jsx,ts,tsx,vue}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/bartik/.envrc b/bartik/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/bartik/.envrc @@ -0,0 +1 @@ +use flake diff --git a/bartik/.eslintrc.js b/bartik/.eslintrc.js new file mode 100644 index 0000000..98d0431 --- /dev/null +++ b/bartik/.eslintrc.js @@ -0,0 +1,17 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/essential', + '@vue/standard' + ], + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' + }, + parserOptions: { + parser: 'babel-eslint' + } +} diff --git a/bartik/.gitignore b/bartik/.gitignore new file mode 100644 index 0000000..3556dee --- /dev/null +++ b/bartik/.gitignore @@ -0,0 +1,24 @@ +.DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw* + +# Nix +.direnv/ diff --git a/bartik/README.md b/bartik/README.md new file mode 100644 index 0000000..f3126b5 --- /dev/null +++ b/bartik/README.md @@ -0,0 +1,29 @@ +# Rebuilding Bartik + +[![Netlify Status](https://api.netlify.com/api/v1/badges/7e49981e-951a-41ae-b0b9-d5b09989d448/deploy-status)](https://app.netlify.com/sites/rebuilding-bartik/deploys) + +A clone of [Drupal](https://www.drupal.org)’s default theme, Bartik, built with [Vue.js](https://vuejs.org) and [Tailwind CSS](https://tailwindcss.com). + +![A screenshot of the Rebuilding Bartik website](screenshot.png) + +[View the site live on Netlify →](https://rebuilding-bartik.oliverdavies.uk) + +## Project setup +``` +yarn install +``` + +### Compiles and hot-reloads for development +``` +yarn run serve +``` + +### Compiles and minifies for production +``` +yarn run build +``` + +### Lints and fixes files +``` +yarn run lint +``` diff --git a/bartik/babel.config.js b/bartik/babel.config.js new file mode 100644 index 0000000..ba17966 --- /dev/null +++ b/bartik/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/app' + ] +} diff --git a/bartik/flake.lock b/bartik/flake.lock new file mode 100644 index 0000000..ed2ccf1 --- /dev/null +++ b/bartik/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/bartik/flake.nix b/bartik/flake.nix new file mode 100644 index 0000000..450a365 --- /dev/null +++ b/bartik/flake.nix @@ -0,0 +1,23 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; + + outputs = + { nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + + inherit (pkgs) mkShell nodejs; + inherit (pkgs.nodePackages) yarn; + in + { + devShells.${system}.default = mkShell { + buildInputs = [ + nodejs + yarn + ]; + }; + + formatter.${system} = pkgs.nixfmt-rfc-style; + }; +} diff --git a/bartik/netlify.toml b/bartik/netlify.toml new file mode 100644 index 0000000..c549a3c --- /dev/null +++ b/bartik/netlify.toml @@ -0,0 +1,3 @@ +[build] + command = "yarn build" + publish = "dist" diff --git a/bartik/package.json b/bartik/package.json new file mode 100644 index 0000000..3bf6974 --- /dev/null +++ b/bartik/package.json @@ -0,0 +1,27 @@ +{ + "name": "rebuilding-bartik", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "postcss-import": "^12.0.1", + "tailwindcss": "^1.1.3", + "tailwindcss-skip-link": "^1.0.1", + "vue": "^2.6.6" + }, + "devDependencies": { + "@fullhuman/postcss-purgecss": "^1.3.0", + "@vue/cli-plugin-babel": "^3.11.0", + "@vue/cli-plugin-eslint": "^3.11.0", + "@vue/cli-service": "^3.11.0", + "@vue/eslint-config-standard": "^4.0.0", + "babel-eslint": "^10.0.3", + "eslint": "^5.8.0", + "eslint-plugin-vue": "^5.0.0", + "vue-template-compiler": "^2.5.21" + } +} diff --git a/bartik/postcss.config.js b/bartik/postcss.config.js new file mode 100644 index 0000000..93e3e9b --- /dev/null +++ b/bartik/postcss.config.js @@ -0,0 +1,15 @@ +module.exports = { + plugins: [ + require('postcss-import'), + require('tailwindcss'), + require('autoprefixer'), + process.env.NODE_ENV === 'production' && require('@fullhuman/postcss-purgecss')({ + content: [ + './src/**/*.vue', + './public/index.html', + ], + defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [] + }) + ] +} + diff --git a/bartik/public/_redirects b/bartik/public/_redirects new file mode 100644 index 0000000..938d7f1 --- /dev/null +++ b/bartik/public/_redirects @@ -0,0 +1 @@ +https://rebuilding-bartik.netlify.com/* https://rebuilding-bartik.oliverdavies.uk/:splat 301! diff --git a/bartik/public/favicon.ico b/bartik/public/favicon.ico new file mode 100644 index 0000000..c7b9a43 Binary files /dev/null and b/bartik/public/favicon.ico differ diff --git a/bartik/public/index.html b/bartik/public/index.html new file mode 100644 index 0000000..1d0ee4a --- /dev/null +++ b/bartik/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + Rebuilding Bartik with Vue.js and Tailwind CSS + + + +
+ + + diff --git a/bartik/screenshot.png b/bartik/screenshot.png new file mode 100644 index 0000000..0451804 Binary files /dev/null and b/bartik/screenshot.png differ diff --git a/bartik/src/App.vue b/bartik/src/App.vue new file mode 100644 index 0000000..6588866 --- /dev/null +++ b/bartik/src/App.vue @@ -0,0 +1,111 @@ + + + + +