@salla.sa/twilight-tailwind-theme 1.5.13 → 1.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +98 -20
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,40 +1,118 @@
1
+
2
+ <div id="top"></div>
3
+ <br />
4
+ <div align="center">
5
+ <a href="https://salla.dev">
6
+ <img src="https://salla.dev/wp-content/themes/salla-portal/dist/img/salla-logo.png" alt="Logo" width="80" height="80">
7
+ </a>
8
+ <h1 align="center">Twilight Tailwind-Theme</h1>
9
+ <p align="center">
10
+ The Tailwind-Theme Plugin registers the <a ref="https://github.com/SallaApp/twilight-components">Twilight Web Component</a> styles and injects them using JavaScript instead of CSS. It's a good starting point for Tailwind-based themes.
11
+ <br />
12
+ <a href="https://salla.dev/"><strong>Explore our blogs »</strong></a>
13
+ <br />
14
+ <a href="https://github.com/SallaApp/twilight-components/edit/master/packages/tailwind-theme/issues/new">Report Bug</a> ·
15
+ <a href="https://github.com/SallaApp/twilight-components/edit/master/packages/tailwind-theme/discussions/new">Request Feature</a> . <a href="https://t.me/salladev">&lt;/Salla Developers&gt;</a> . <a href="https://docs.salla.dev/docs/twilight-themes-documentation">Official Documentation</a>
16
+ </p>
17
+ </div>
18
+
19
+ <!-- TABLE OF CONTENTS -->
20
+ <details open>
21
+ <summary>Table of Contents</summary>
22
+ <ol>
23
+ <li><a href="#overview">Overview</a></li>
24
+ <li><a href="#usage">Usage</a>
25
+ <ul>
26
+ <li><a href="#jit-enabled">JIT Enabled</a></li>
27
+ </ul>
28
+ </li>
29
+ <li><a href="#add-a-new-component">Add a New Component</a></li>
30
+ <li><a href="#publish">Publish</a></li>
31
+ <li><a href="#support">Support</a></li>
32
+ <li><a href="#contributing">Contributing</a></li>
33
+ <li><a href="#credits">Credits</a></li>
34
+ <li><a href="#license">License</a></li>
35
+ </ol>
36
+ </details>
37
+
38
+ <br>
39
+
40
+ ## Overview
41
+ The Tailwind-Theme Plugin registers the styles needed by the [Twilight Web Components](https://github.com/SallaApp/twilight-components) and then injects them into the theme stylesheet using JavaScript instead of CSS. It can also be used as a starter theme for any theme based on [Tailwind](https://tailwindcss.com/).
42
+
1
43
  ## Usage
44
+ By default, any [Tailwind-based](https://tailwindcss.com/) theme will look for the `tailwind.config.js` file at the root of the project to retrieve any pre-settings and customizations. Accordingly, the plugin Tailwind-Theme should be added to the `tailwind.config.js` file as follows:
2
45
 
3
- 1. add the plugin to tailwaind plugins in `tailwind.config.js` file
4
46
  ```js
5
- plugins: [
6
- ...
7
- require('@salla.sa/twilight-tailwind-theme'),
8
- ....
9
- ]
47
+ plugins: [
48
+ ...
49
+ require('@salla.sa/twilight-tailwind-theme'),
50
+ ....
51
+ ]
10
52
  ```
11
53
 
12
54
  ### JIT Enabled
13
55
 
14
- **Tailwind** added a [just-in-time compiler](https://v2.tailwindcss.com/docs/just-in-time-mode), which generates styles as the developer writes the theme rather than generating everything in advance at initial build time.
15
-
16
- Since JIT mode generates your CSS on-demand by scanning your template files, it’s crucial that you configure the `content` option in your `tailwind.config.js` file with all of your template paths, otherwise your CSS will be empty
56
+ **Tailwind** added a [just-in-time compiler](https://v2.tailwindcss.com/docs/just-in-time-mode), which generates styles as the developer writes the theme rather than generating everything in advance at initial build time. Since JIT mode generates your CSS on-demand by scanning your template files, it’s crucial that the developer configure the `content` option in the `tailwind.config.js` file with all of the theme paths, otherwise the CSS classes will be empty.
17
57
 
18
58
 
19
59
  ```js title="tailwind.config.js"
20
60
  ...
21
- content: [
22
- // theme views
23
- "views/**/*.twig",
24
- // list of classes which required by twilight web components
25
- "node_modules/@salla.sa/twilight-tailwind-theme/safe-list-css.txt"
26
- ],
61
+ content: [
62
+ // theme views
63
+ "views/**/*.twig",
64
+ // list of classes which required by twilight web components
65
+ "node_modules/@salla.sa/twilight-tailwind-theme/safe-list-css.txt"
66
+ ],
27
67
  ...
28
68
  ```
29
69
 
30
- ## Add A new compnoent
31
-
32
- 1. create a new folder with the name of compnenet
33
- 2. create a `utilities.json` file with list of class as json
70
+ ## Add a New Component
34
71
 
72
+ With Tailwind, developer style elements by applying pre-existing classes directly into the HTML. This is done using utility classes to build custom designs without writing CSS. Based on that, the developer may develop a new component by simple doing the following steps:
35
73
 
74
+ 1. Create a new folder with the name of the new compnenet.
75
+ 2. Create a `utilities.json` file with list of new compnenet's classes as json.
76
+
36
77
  ## Publish
37
-
78
+ Last, the developer may publish the project using the following command:
38
79
  ```
39
80
  npm run publish
40
81
  ```
82
+
83
+
84
+ <p align="right">(<a href="#top">back to top</a>)</p>
85
+
86
+
87
+
88
+
89
+ ## Support
90
+
91
+ The team is always here to help you. Happen to face an issue? Want to report a bug? You can submit one here on Github using the [Issue Tracker](https://github.com/SallaApp/theme-raed/issues/new). If you still have any questions, please contact us via the [Telegram Bot](https://t.me/SallaSupportBot) or join in the Global Developer Community on [Telegram](https://t.me/salladev).
92
+
93
+ <p align="right">(<a href="#top">back to top</a>)</p>
94
+
95
+ ## Contributing
96
+
97
+ Contributions are what make the open-source community such an amazing place to learn, inspire, and create.
98
+ Any contributions you make are **greatly appreciated**.
99
+
100
+ If you have a suggestion that would make this better, please fork the repo and create a pull request.
101
+ You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
102
+
103
+ 1. Fork the Project
104
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
105
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
106
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
107
+ 5. Open a Pull Request
108
+
109
+ <p align="right">(<a href="#top">back to top</a>)</p>
110
+
111
+ ## Credits
112
+ - [Salla](https://github.com/sallaApp)
113
+ - [All Contributors](../../contributors)
114
+ <p align="right">(<a href="#top">back to top</a>)</p>
115
+
116
+ ## License
117
+ The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
118
+ <p align="right">(<a href="#top">back to top</a>)</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-tailwind-theme",
3
- "version": "1.5.13",
3
+ "version": "1.5.14",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "twilight",
@@ -28,5 +28,5 @@
28
28
  "run-when-changed": "^2.1.0",
29
29
  "tailwindcss": "^3.1.8"
30
30
  },
31
- "gitHead": "907f32ac272e51c1205f4e98041597a369ca4be4"
31
+ "gitHead": "3d4e89e560f303d9bb3e6808c0b9a82de24b4edf"
32
32
  }