From 05c18ed8b38b07a32bbebf6207bb77cc927378e3 Mon Sep 17 00:00:00 2001 From: praveenjuge Date: Wed, 22 Dec 2021 09:52:56 +0530 Subject: [PATCH] Updates for TailwindCSS 3 Signed-off-by: praveenjuge --- .gitignore | 1 + README.md | 2 +- docs/content/components/dark-sidebar.html | 115 ++++++++++--------- docs/content/components/light-sidebar.html | 115 ++++++++++--------- docs/content/docs/_index.md | 2 +- docs/content/docs/typography.md | 14 +-- docs/layouts/articles/single.html | 20 ++-- docs/layouts/partials/header.html | 127 +++++---------------- docs/layouts/shortcodes/code.html | 23 ++-- docs/tailwind.config.js | 9 +- index.js | 8 +- package.json | 4 +- src/spinner.js | 5 + 13 files changed, 200 insertions(+), 245 deletions(-) diff --git a/.gitignore b/.gitignore index 873033e..0f335d5 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ resources/* # Project Specific Files docs/static/build.css docs/static/kutty.js +docs/.hugo_build.lock diff --git a/README.md b/README.md index 1dd65b3..9bdf8ab 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Kutty is a tailwind plugin for building web applications. It has a set of access npm install kutty --save ``` -This plugin requires Tailwind CSS 2 or later. Tailwind CSS is not included in this package. Learn how to [install tailwind here](https://tailwindcss.com/docs/installation/). +This plugin requires Tailwind CSS 3 or later. Tailwind CSS is not included in this package. Learn how to [install tailwind here](https://tailwindcss.com/docs/installation/). ## Usage diff --git a/docs/content/components/dark-sidebar.html b/docs/content/components/dark-sidebar.html index c40889f..d5a12a0 100644 --- a/docs/content/components/dark-sidebar.html +++ b/docs/content/components/dark-sidebar.html @@ -6,85 +6,97 @@
+
+ \ No newline at end of file diff --git a/docs/content/components/light-sidebar.html b/docs/content/components/light-sidebar.html index 028b2d9..372a41e 100644 --- a/docs/content/components/light-sidebar.html +++ b/docs/content/components/light-sidebar.html @@ -6,85 +6,97 @@
+
+ \ No newline at end of file diff --git a/docs/content/docs/_index.md b/docs/content/docs/_index.md index 1922132..aa63425 100644 --- a/docs/content/docs/_index.md +++ b/docs/content/docs/_index.md @@ -11,7 +11,7 @@ Kutty is a tailwind plugin for building web applications. It has a set of access npm install kutty --save ``` -This plugin requires Tailwind CSS 2 or later. Tailwind CSS is not included in this package. Learn how to [install tailwind here](https://tailwindcss.com/docs/installation/). +This plugin requires Tailwind CSS 3 or later. Tailwind CSS is not included in this package. Learn how to [install tailwind here](https://tailwindcss.com/docs/installation/). ## Usage diff --git a/docs/content/docs/typography.md b/docs/content/docs/typography.md index 7146979..c464c0d 100644 --- a/docs/content/docs/typography.md +++ b/docs/content/docs/typography.md @@ -2,7 +2,7 @@ title: Typography --- -Kutty uses [Tailwind's Typography Plugin](https://github.com/tailwindlabs/tailwindcss-typography), check out their [documentation](https://github.com/tailwindlabs/tailwindcss-typography) for more information. +Kutty uses [Tailwind's Typography Plugin](https://github.com/tailwindlabs/tailwindcss-typography), check out their [documentation](https://tailwindcss.com/docs/typography-plugin) for more information. ## Installation @@ -30,15 +30,3 @@ module.exports = { ], }; ``` - -## Basic - -{{< code html >}} - -
-

A Christmas Carol

-

By Charles Dickens

-

Marley was dead: to begin with. There is no doubt whatever about that. The register of his burial was signed by the clergyman, the clerk, the undertaker, and the chief mourner. Scrooge signed it: and Scrooge’s name was good upon ’Change, for anything he chose to put his hand to. Old Marley was as dead as a door-nail.

-

Mind! I don’t mean to say that I know, of my own knowledge, what there is particularly dead about a door-nail. I might have been inclined, myself, to regard a coffin-nail as the deadest piece of ironmongery in the trade. But the wisdom of our ancestors is in the simile; and my unhallowed hands shall not disturb it, or the Country’s done for. You will therefore permit me to repeat, emphatically, that Marley was as dead as a door-nail.

-
-{{< /code >}} diff --git a/docs/layouts/articles/single.html b/docs/layouts/articles/single.html index be4a33e..011c744 100644 --- a/docs/layouts/articles/single.html +++ b/docs/layouts/articles/single.html @@ -1,12 +1,15 @@ {{ define "main" }} -
+
-{{end}} +{{end}} \ No newline at end of file diff --git a/docs/layouts/partials/header.html b/docs/layouts/partials/header.html index 1c85b15..12748f3 100644 --- a/docs/layouts/partials/header.html +++ b/docs/layouts/partials/header.html @@ -1,133 +1,60 @@
-
+ \ No newline at end of file diff --git a/docs/layouts/shortcodes/code.html b/docs/layouts/shortcodes/code.html index 793ce8d..5800ea2 100644 --- a/docs/layouts/shortcodes/code.html +++ b/docs/layouts/shortcodes/code.html @@ -1,18 +1,19 @@ -
{{ .Inner }}
+
+ {{ .Inner }}
-
- {{ if len .Params | eq 2 }} {{ highlight (trim .Inner "\n\r") (.Get 0) (.Get 1) }} {{ else }} {{ highlight (trim .Inner "\n\r") (.Get 0) "" }} {{ end }} +
+ {{ if len .Params | eq 2 }} {{ highlight (trim .Inner "\n\r") (.Get 0) (.Get 1) }} {{ else }} {{ highlight (trim + .Inner "\n\r") (.Get 0) "" }} {{ end }}
- - +
-
+
\ No newline at end of file diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 4d9cc17..6ee403b 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -1,6 +1,9 @@ module.exports = { - purge: { - content: ["./docs/layouts/**/*.html", "./docs/content/**/*.md", "./docs/content/**/*.html", "./src/js/**/*.js"], - }, + content: [ + "./docs/layouts/**/*.html", + "./docs/content/**/*.md", + "./docs/content/**/*.html", + "./src/js/**/*.js", + ], plugins: [require("../index.js"), require("@tailwindcss/typography")], }; diff --git a/index.js b/index.js index 5cc66fc..31471e6 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,3 @@ -const colors = require('tailwindcss/colors') - module.exports = require("tailwindcss/plugin")( function ({ addComponents }) { addComponents([ @@ -27,9 +25,9 @@ module.exports = require("tailwindcss/plugin")( extend: { colors: { primary: { - light: colors.violet[100], - DEFAULT: colors.violet[700], - dark: colors.violet[900], + light: require("tailwindcss/colors").violet[100], + DEFAULT: require("tailwindcss/colors").violet[700], + dark: require("tailwindcss/colors").violet[900], }, }, }, diff --git a/package.json b/package.json index f379a80..c894dbe 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ }, "devDependencies": { "@tailwindcss/typography": "^0.5.0", - "concurrently": "^6.4.0", + "concurrently": "^6.5.1", "cross-env": "^7.0.3", "rollup": "^2.61.1", "rollup-plugin-terser": "^7.0.2" }, "peerDependencies": { - "tailwindcss": "^3.0.2" + "tailwindcss": "^3.0.7" } } diff --git a/src/spinner.js b/src/spinner.js index b98acdd..6c23aab 100644 --- a/src/spinner.js +++ b/src/spinner.js @@ -11,4 +11,9 @@ module.exports = Spinner = () => ({ animation: "spin 1s linear infinite", borderRightColor: "transparent !important", }, + "@keyframes spin": { + to: { + transform: "rotate(360deg)", + }, + }, });