Droopler is a Drupal 10 profile designed to kickstart a new webpage in a few minutes. It's based on the latest frontend technologies, including Bootstrap 5. The maintainer of Droopler is Droptica.
For the latest news, follow us on Facebook and Twitter.
It's a skeleton, a boilerplate for new projects based on Droopler. If you wish to use Droopler - fork (or download) this repository. It contains a minimal set of code to start your new site. Threat it the same way as drupal/recommended-project or drupal-composer/drupal-project.
This repository includes:
You can deploy and host your Droopler installation on Platform.sh.
Fork this repository and clone the newly created to your local machine.
This section provides instructions for running the Droopler
distribution locally.
composer create-project droptica/droopler-project:^4.0-alpha <path>
to install the project and its dependencies.$ cd web/profiles/contrib/droopler/themes/custom/droopler_theme
$ npm install
$ cd web/themes/custom/droopler_subtheme
$ npm install
$ npm run dev
ddev config
to configure the project.ddev start
to start the project.ddev composer install
to download the project dependencies.ddev auth ssh
to add the keys from your ~/.ssh
directory to the web container and run ddev composer install
command once again.ddev theme
to install the theme dependencies and compile assets. By default, production assets are compiled. You can run ddev theme dev
to compile assets for development. You can also run ddev theme watch
to watch for changes in SCSS and JS and process them on the fly.ddev build-profile
to build the Droopler profile from the CLI (you will get a fully featured version, with blog, products and demo content).lando start
to start the project.lando prepare
to build the project's code. Alternatively, you can run lando composer install
to download the project dependencies, and then lando theme-production
and lando subtheme-production
to compile assets.lando info
and finish installing the website. You can also build the Droopler profile from the CLI. Run lando build-full-profile
for the fully-featured version, or lando build-full-profile
for the minimal one.This is instructions for running the template locally, connected to a live database instance on an active Platform.sh environment.
In all cases for developing with Platform.sh, it's important to develop on an isolated environment - do not connect to data on your production environment when developing locally. Each of the options below assume that you have already deployed this template to Platform.sh, as well as the following starting commands:
platform get PROJECT_ID
cd project-name
platform environment:branch updates
DDEV provides an integration with Platform.sh that makes it simple to develop Drupal locally. Check the providers documentation for the most up-to-date information.
In general, the steps are as follows:
.ddev/providers/platform.yaml
, so you should not need to run ddev config
.web_environment:
- PLATFORMSH_CLI_TOKEN=abcdeyourtoken
ddev restart
.platform project:info
. If you have not already connected your local repo with the project (as is the case with a source integration, by default), you can run platform project:list
to locate the project ID, and platform project:set-remote PROJECT_ID
to configure Platform.sh locally..ddev/providers/platform.yaml
file for your current setup:
environment_variables:
project_id: PROJECT_ID
environment: CURRENT_ENVIRONMENT
application: drupal
ddev pull platform
.ddev stop
and ddev poweroff
.Note:
For many of the steps above, you may need to include the CLI flags
-p PROJECT_ID
and-e ENVIRONMENT_ID
if you are not in the project directory or if the environment is associated with an existing pull request.
There are several comands that help you to work with the subtheme. You can run them from the root directory of your project.
ddev theme watch
- watches for changes in SCSS and JS and processes them on the flyddev theme dev
- cleans derivative files and compiles all SCSS/JS in the subtheme for DEV environmentddev theme production
- cleans derivative files and compiles all SCSS/JS in the subtheme for PROD environmentThere are several comands that help you to work with the subtheme. You can run them from the root directory of your project.
lando theme-watch
or lando subtheme-watch
- watches for changes in SCSS and JS and processes them on the flylando theme-dev
or lando subtheme-dev
- cleans derivative files and compiles all SCSS/JS in the theme for DEV environmentlando theme-production
or lando subtheme-production
- cleans derivative files and compiles all SCSS/JS in the theme for PROD environmentFirst run npm run watch in your subtheme's directory. It will track all the changes in theme source files and compile assets in the fly.
$ cd web/themes/custom/droopler_subtheme
$ npm run watch
There are also other npm commands for theme developers, here's the full reference:
npm run watch
- watches for changes in SCSS and JS and processes them on the flynpm run dev
- cleans derivative files and compiles all SCSS/JS in the subtheme for DEV environmentnpm run production
- cleans derivative files and compiles all SCSS/JS in the subtheme for PROD environmentnpm run stylint
- run stylintnpm run stylint-fix
- run stylint and fix errors automaticallyYou can use any SCSS structure you like. We recommend dividing files into layout/ and components/ directories. Just remember to include your files in main.style.scss.
Droopler is designed to make your work easier. You don't have to override SCSS or CSS code to make your own adjustments. In most cases it is enough to modify the configuration.
Just look into variables definitions in the subtheme.
Use src/scss/bootstrap/_variables.scss file to overwrite base bootstrap variables.
// Colors.
// $red: #ac0000 !default;
// $orange: #ff9475 !default;
// $primary: $red !default;
Use src/scss/base/_themes.scss file to overwrite project specific colors in each theme.
// *[data-theme="theme-light"] {
// --section-background-color: #fff;
// --overlay-background-color: #fff;
// --divider-background-color: #{$red};
// ...
// }
Use src/scss/base/_variables.scss file to overwrite components/paragraphs variables.
// :root {
// // Base component: CTA.
// --cta-width: 100%;
// --cta-max-width: 18rem;
// --cta-margin-top-bottom: 0.25rem;
// ...
// }
When you save this config file, npm run dev will recompile all SCSS with your own config.
Extending and overwriting components
Instead of overwriting the particular component through the CSS variables in the
_variables.scss
file, you can extend or overwrite it in thesrc/components
directory.See: components/README.md
See the UPDATE.md file from the Droopler profile.
By default Droopler uses free Inter webfont. If you wish to install your own fonts from Google - put their definitions into droopler_subtheme.libraries.yml like this:
global-styling:
version: VERSION
css:
theme:
'//fonts.googleapis.com/css?family=Rajdhani:500,600,700|Roboto:400,700&subset=latin-ext': { type: external, minified: true }
css/style.css: {}
If you wish to install FontAwesome or Glyphicons from the CDN - just grab their URLs and follow the steps described in previous chapter about Google Fonts. You'll find a FontAwesome example in droopler_subtheme.libraries.yml and droopler_subtheme.info.yml.
In the .githooks
directory you can find the pre-commit hooks to run the quality tools and to make sure that the front-end has been compiled in the production
mode.
To set-up git hooks run:
git config --local core.hooksPath .githooks/
For the first time or when you get no permission error add +x
to those scripts.
chmod -R +x .githooks/