A minimal Drupal theme using Twig, Tailwind CSS, TypeScript, and Single Directory Components (SDC).
Storybook: https://jpjuliao.github.io/drupal-minimal-theme/
Compatible with Drupal 8 and Drupal 9.
The Drupal Minimal Theme is a lightweight theme designed to provide a clean starting point for Drupal projects. It leverages modern frontend technologies such as Tailwind CSS for styling, TypeScript for enhanced JavaScript functionality, and Single Directory Components (SDC) for component-based development.
- Twig: a flexible and powerful template engine for PHP.
- Tailwind CSS: A utility-first CSS framework for rapidly building custom designs.
- TypeScript: A typed superset of JavaScript that compiles to plain JavaScript.
- Drupal: A free and open-source content management system for building websites and applications.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- npm: The package manager for JavaScript and Node.js.
- Storybook: An open-source tool for developing UI components in isolation for React, Vue, Angular, and more.
To use the Drupal Minimal Theme in your Drupal project, follow these steps:
- Clone the repository.
- Navigate to the theme directory.
- Install dependencies with NPM:
npm i
- Enable the theme in your Drupal project.
- Use the Drupal Minimal Theme as a starting point for custom Drupal themes.
- Develop and maintain your frontend components using Single Directory Components (SDC) for better organization and reusability.
- Customize the theme's styling by editing the assets/css/styles.css file and component-specific CSS files.
- Enhance JavaScript functionality by writing TypeScript code in the assets/ts directory and compiling it to JavaScript.
Storybook allows you to develop UI components in isolation. To start Storybook, run the following command:
npm run storybook
This command will start a local server, and you can view your component stories in a web browser.
Contributions are welcome! If you'd like to contribute to the Drupal Minimal Theme, please follow these guidelines:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Push to the branch.
- Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.