From bb18daede24519407eb07fcf2106e6b4be09a21c Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Fri, 20 Nov 2020 16:57:06 +0100 Subject: [PATCH] import tailwindcss v2 --- config/ColorMode.ts | 2 +- config/Tailwind.ts | 8 +- nuxt.config.js | 7 +- package.json | 4 +- src/assets/css/style.scss | 4 - src/assets/css/tailwind.css | 10 +- src/components/Experience.vue | 49 ++ src/components/Formation.vue | 45 ++ src/components/Header.vue | 6 + src/components/HomePost.vue | 2 +- src/components/Post.vue | 4 +- src/components/Skill.vue | 36 ++ tailwind.config.js => src/tailwind.config.js | 14 +- src/templates/layouts/default.vue | 6 +- src/templates/pages/about.vue | 93 ++- src/templates/pages/blog/_id.vue | 66 +++ .../pages/{blog.vue => blog/index.vue} | 14 +- src/templates/pages/blog/tags/_id.vue | 50 ++ src/templates/pages/index.vue | 4 +- yarn.lock | 540 ++++++++++-------- 20 files changed, 671 insertions(+), 293 deletions(-) create mode 100644 src/components/Experience.vue create mode 100644 src/components/Formation.vue create mode 100644 src/components/Skill.vue rename tailwind.config.js => src/tailwind.config.js (98%) create mode 100644 src/templates/pages/blog/_id.vue rename src/templates/pages/{blog.vue => blog/index.vue} (66%) create mode 100644 src/templates/pages/blog/tags/_id.vue diff --git a/config/ColorMode.ts b/config/ColorMode.ts index ab9524d..fd31b72 100644 --- a/config/ColorMode.ts +++ b/config/ColorMode.ts @@ -2,5 +2,5 @@ export default { preference: 'system', fallback: 'dark', classPrefix: '', - classSuffix: '-mode', + classSuffix: '', } diff --git a/config/Tailwind.ts b/config/Tailwind.ts index 958398b..1f5d218 100644 --- a/config/Tailwind.ts +++ b/config/Tailwind.ts @@ -1,7 +1,5 @@ export default { - config: { - plugins: [ - require('tailwindcss-dark-mode') - ] - } + cssPath: './assets/css/tailwind.css', + configPath: 'tailwind.config.js', + exposeConfig: true } diff --git a/nuxt.config.js b/nuxt.config.js index 7a46d91..812b35d 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -14,10 +14,6 @@ export default { plugins: [ ], - purgeCSS: { - whitelist: ["dark-mode"] - }, - components: true, buildModules: [ @@ -41,7 +37,8 @@ export default { store: 'store', }, - build: {}, + build: { + }, pageTransition: { name: 'page', diff --git a/package.json b/package.json index ecb5630..02b3b37 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@nuxt/types": "^2.14.6", "@nuxt/typescript-build": "^2.0.3", "@nuxtjs/color-mode": "^2.0.0", - "tailwindcss-dark-mode": "^1.1.7", - "@nuxtjs/tailwindcss": "^3.2.0" + "@nuxtjs/tailwindcss": "^3.2.0", + "tailwindcss": "^2.0.1-compat" } } diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index a00d6da..16b6cf1 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -2,7 +2,3 @@ img, svg, path, g { z-index: 0; } -.dark-mode { - @apply bg-gray-800; - @apply text-white; -} diff --git a/src/assets/css/tailwind.css b/src/assets/css/tailwind.css index 736ffb2..954f084 100644 --- a/src/assets/css/tailwind.css +++ b/src/assets/css/tailwind.css @@ -1,7 +1,7 @@ @import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap'); - -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; - @import "./style.scss"; + +@tailwind base; +@tailwind components; +@tailwind utilities; + diff --git a/src/components/Experience.vue b/src/components/Experience.vue new file mode 100644 index 0000000..9fde95a --- /dev/null +++ b/src/components/Experience.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/Formation.vue b/src/components/Formation.vue new file mode 100644 index 0000000..42b1cfe --- /dev/null +++ b/src/components/Formation.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/components/Header.vue b/src/components/Header.vue index 37d528c..6377caa 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -100,6 +100,12 @@ export default { .header-container { + .nuxt-link-active { + &.green { + @apply text-green-400; + } + } + .nuxt-link-exact-active { &.red { @apply text-red-400; diff --git a/src/components/HomePost.vue b/src/components/HomePost.vue index 71b37cf..bc36b40 100644 --- a/src/components/HomePost.vue +++ b/src/components/HomePost.vue @@ -1,5 +1,5 @@