Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Provides ZURB Foundation sites libraries as module to be used as a dependency of ZURB Foundation modules & themes.

Use this module if

  • You're using a module with this dependency
  • You're maintaining or creating a ZURB Foundation based module or theme
  • Need ZURB Foundation sites in your project and would like to include ZURB Foundation libraries (see "Custom use")

Installation

Install this module like any other, see this documentation.

Composer

This is the recommended way of installation!
Ensure you are using the asset-packagist repository:

"repositories": [
[...]
    {
      "type": "composer",
      "url": "https://asset-packagist.org"
    }
[...]
]

See https://www.drupal.org/docs/develop/using-composer/manage-dependencies#t...

Then simply run composer with the following command:

composer require drupal/foundation_sites npm-asset/foundation-sites npm-asset/motion-ui

Hint: We suggest the npm-asset version and NOT zurb/foundation because the installer-path for the composer package can't be set to libraries easily, while nom-assets are typically installed to the "libraries" folder.

Also we currently can't add these two npm-asset libraries as real composer.json dependencies as npm-asset is a custom respository. This would cause a composer error in tests. That's why they are added only as suggestions.

Manual

Download and unpack ZURB Foundation Sites from Github:
https://github.com/zurb/foundation-sites (Download version 6.5.1 as zip here)
so that the final folder structure is: libraries/foundation-sites/dist/... (this is the only required folder).

Do the same for Foundation motion-ui, which is also required.

Important: The generated folder structure on https://foundation.zurb.com/sites/download.html/ is DIFFERENT and currently unsupported by the way we load plugins separately! We like to use the composer / npm / ... package folder structure instead, which is based on GitHub!

Custom use (attaching library)

If you want to use the defined libraries individually, you can simply load them like described here: https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets... this way:

In PHP:

$build['#attached']['library'][] = 'foundation_sites/core';
$build['#attached']['library'][] = 'foundation_sites/accordion';

In twig:

{{ attach_library('foundation_sites/core') }}{{ attach_library('foundation_sites/accordion') }}

You can load all plugins individually:

foundation_sites/responsiveAccordionTabs
foundation_sites/slider
...
  • For technical details, see foundation_sites.library.yml in the module.
  • foundation_sites/core is a dependency of all other plugins, so you don't have to load it manually when using a plugin.

Overriding / extending / removing library contents

This is possible using the amazing Drupal 8 libraries concept, see https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets... for examples.

Integrations

Used in these modules

Used in these themes

Development proudly sponsored by German Drupal Friends & Companies:

webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Aug 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.1 Stable Aug 20, 2024