Skip to content

A minimal Drupal theme using Twig, Tailwind CSS, TypeScript, and Single Directory Components (SDC).

Notifications You must be signed in to change notification settings

jpjuliao/drupal-minimal-theme

Repository files navigation

Drupal Minimal Theme

A minimal Drupal theme using Twig, Tailwind CSS, TypeScript, and Single Directory Components (SDC).

Storybook: https://jpjuliao.github.io/drupal-minimal-theme/

Drupal Version

Compatible with Drupal 8 and Drupal 9.

Overview

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.

Dependencies

  • 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.

Installation

To use the Drupal Minimal Theme in your Drupal project, follow these steps:

  1. Clone the repository.
  2. Navigate to the theme directory.
  3. Install dependencies with NPM: npm i
  4. Enable the theme in your Drupal project.

Usage

  • 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

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.

Contributing

Contributions are welcome! If you'd like to contribute to the Drupal Minimal Theme, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Push to the branch.
  5. Create a new Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A minimal Drupal theme using Twig, Tailwind CSS, TypeScript, and Single Directory Components (SDC).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published