A Starter theme for Drupal built with Tailwind CSS.
As TWBase Theme use Tailwind Typography I recommends you to install TWBase Theme Utilities modules with this theme. It load the styles.css
provided by TWBase Theme and add the prose
(tw-prose
) extra class to the editor body
to reflects the frontend while editing node in admin section. Otherwise the content in your editor may look slightly poor and naked... π. The module also provide an admin interface to control the frontpage showcase content and last but not least: it allows you to define showcase and related options per content type π₯³.
A very basic demo is available with the TWBase Theme Utilities modules installed.
- Allow to change frontpage showcase image in theme settings. Thanks to Tdnshah
- Provide blocks placement on install ?
- Test multilingual site with language switcher
- Rename branch 9.1.x to 1.x
- Create a Pre Release 1.0.0-rc1
- tailwindcss ^3.0.0
- postcss
- Transforming styles with JS plugins
- postcss-cli
- CLI for postcss
- postcss-import
- PostCSS plugin to inline @import rules content
- autoprefixer
- Parse CSS and add vendor prefixes to rules by Can I Use
- chokidar / chokidar-cli
- Minimal and efficient cross-platform file watching library
- cssnano
- A modular minifier, built on top of the PostCSS ecosystem.
To install all dependencies run npm install
from theme root directory.
To watch changes while "playing" with css
and html class
, run npm run watch
from theme root directory.
By default, for development purpose the outputed css file is not minified. To minify it, uncomment cssnano
in the plugins section of postcss.config.js
:
// postcss.config.js
module.exports = {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
//Uncomment this to minify the outputed css file
// cssnano: {
// preset: "default",
// },
}
}
When you're happy with all this, build the final css file by running the command npm run build
from theme root directory.
It's me! drupix
- https://drupal-solutions.ch
- https://github.com/drupix
- All contributors of Tailwind CSS
- All contributors of PostCSS and PostCSS CLI
- All contributors of postcss-import
- All contributors of autoprefixer
- Paul Miller and all contributors of chokidar and Chokidar CLI
- All contributors of cssnano
- All the other guys I forgot to mention here
Special thanks to Bob den Otter π·π³π± and all contributors of Bolt default theme who introduced me with Tailwind.
The MIT License (MIT)
Copyright (c) 2021 Enzo Di Resta (aka drupix)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
TWBase incorporates Font Awesome. Font Awesome is distributed under the terms of the Font Awesome Free License.
TWBase incorporates photographs from Unsplash.