Skip to content
Snippets Groups Projects

Issue #3371988: Write a README.md with all relevant information

1 file
+ 163
0
Compare changes
  • Side-by-side
  • Inline
README.md 0 → 100644
+ 163
0
# ZURB Foundation Sites (Library)
## Contents of this file
- Introduction
- Usage
- Installation
- Configurations
- Integrations
- Development Sponsorship
- Supporting Organizations
- Maintainers
## Introduction
This repository provides ZURB Foundation Sites libraries as a module that
can be used as a dependency for ZURB Foundation modules and themes.
## Usage
You can use this module if:
- You're using a module with this dependency.
- You're maintaining or creating a ZURB Foundation-based module or theme.
- You need ZURB Foundation Sites in your project and would like to include
ZURB Foundation libraries (see "Custom use").
## Installation
Install as you would normally install a contributed Drupal module. Follow:
[Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
### Composer
Composer is the recommended way to install this module. Follow the steps:
```json
"repositories": [
...
{
"type": "composer",
"url": "https://asset-packagist.org"
}
...
]
```
For more information, refer to the [ Drupal documentation on managing dependencies with Composer](https://www.drupal.org/docs/develop/using-composer/manage-dependencies#t...)
1. Run the following composer command:
```shell
composer require drupal/foundation_sites npm-asset/foundation-sites npm-asset/motion-ui
```
**Note:** It is recommended to use the npm-asset version of ZURB
Foundation instead of `zurb/foundation` because the installer path for the
Composer package cannot be easily set to `libraries`. npm-assets are typically
installed in the "libraries" folder.
**Note:** The npm-asset libraries are currently added as suggestions and not
real dependencies in `composer.json` due to the custom repository nature of
npm-assets. Adding them as dependencies would cause a Composer error in
tests.
### Manual
If you prefer a manual installation, follow these steps:
1. Download ZURB Foundation Sites from GitHub: [ZURB Foundation Sites](https://github.com/foundation/foundation-sites),
download version 6.5.1 as a zip file.
2. Unpack the downloaded file, ensuring the final folder structure is:
`libraries/foundation-sites/dist/....` This is the only required folder.
3. Repeat the same process for Foundation Motion UI, as it is also required.
**Important:** The generated folder structure on [ZURB Foundation's download page](https://foundation.zurb.com/sites/download.html)
is different and currently unsupported. The recommended
folder structure is based on the composer/npm package folder structure from
GitHub.
## Configurations
If you want to use the defined libraries individually, you can load them using
the following methods:
- In PHP:
```php
$build['#attached']['library'][] = 'foundation_sites/core';
$build['#attached']['library'][] = 'foundation_sites/accordion';
```
- In Twig:
```twig
{{ attach_library('foundation_sites/core') }}
{{ attach_library('foundation_sites/accordion') }}
```
- You can load all plugins individually, for example:
```bash
foundation_sites/responsiveAccordionTabs
foundation_sites/slider
```
- For technical details, refer to`foundation_sites.library.yml`in the module.
**Note:** `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
You can override, extend, or remove library contents using the Drupal 8
libraries concept. For examples and more information, refer to the [Drupal documentation](https://www.drupal.org/docs/8/theming-drupal-8/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme)
on adding stylesheets and JavaScript.
## Integrations
This module is used in the following modules:
- Views Accordion Foundation
This module is used in the following themes:
- Not yet in ZURB Foundation Theme (see [#3025313](https://www.drupal.org/project/foundation_theme/issues/3025313):
Outsource foundation libraries into common module dependency?)
**Please note:** The provided information may be subject to change. It is always
recommended to refer to the official documentation and project resources for
the most up-to-date and accurate instructions.
## Development Sponsorship
This development is proudly sponsored by the following
**German Drupal Friends & Companies**:
- **webks: websolutions kept simple**
Website: [https://www.webks.de](https://www.webks.de)
- **DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany**
Website: [https://www.drowl.de](https://www.drowl.de)
## Supporting Organizations
This library integration module has been proudly developed by **DROWL.de** for the Drupal community.
Website: [https://www.drowl.de](https://www.drowl.de)
## Maintainers
This library integration module is maintained by the following individuals:
- [Anybody](https://www.drupal.org/u/anybody)
- [thomas.frobieter](https://www.drupal.org/u/thomasfrobieter)
- [Grevil](https://www.drupal.org/u/grevil)
- [HongPong](https://www.drupal.org/u/hongpong)
- [kevinquillen](https://www.drupal.org/u/kevinquillen)
Loading