Download the PHP package unocha/ocha_basic without Composer

On this page you can find all versions of the php package unocha/ocha_basic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ocha_basic

DEPRECATED: OCHA Basic Drupal 7 starter theme.

This is no longer up-to-date. We no longer implement Drupal 7 sites.

\

Refer to common_design base theme for Drupal 8, and for generic Common Design styles and markup.

\

A minimal starter theme for OCHA sites built with Drupal 7. The markup and styles can also be used for non-Drupal sites.

See OCHA basic demo

For developers

See OCHA basic dev site for documentation and examples. View via web inspector to see Drupal template suggestions. This will help understand where the markup is coming from (some comes from Drupal, some is custom). This is especially relevant for implementations not using Drupal as the markup might be copied instead of used directly from the repo.

Releases

Refer to Github releases for latest updates. We use npm-version and sematantic versioning

This theme contains

Optional components:

Integrations with other Drupal modules

Getting started

  1. Copy this theme into your sites/all/themes/custom folder
  2. If you want to renamne the theme, change the folder name, the filename of the .info file and find and replace for ocha_basic in the theme folder.
  3. In the Drupal Admin, go to Appearance, find 'OCHA Basic Starter Theme' (or whatever you've renamed it to), and select Enable and set default

To contribute to ocha_basic development:

  1. Run nvm use for correct node version as per .nvmrc file
  2. Install the dependencies: npm install
  3. Copy localConfig.example.json to localConfig.json and specify the URL of your local Drupal environment.
  4. Run the simple gulp task to build the CSS and watch for new changes: gulp dev
  5. When you make commits, it will automatically run a "production" Sass build that excludes Sourcemaps

CSS

This project uses Sass. To make changes edit the .scss files in the sass/ folder, do NOT edit the files in css/ directly.

Run gulp dev in the theme folder to have gulp watch for changes and automatically rebuild the CSS.

Run gulp sass to compile the CSS only.

Preferably use Jenkins to run the Gulp task on build to generate the CSS. If this is possible on your project, add the css/ folder to the .gitignore file and delete generated CSS from the repo.

JS

Javascript files should be added to js/ and to the scripts section of ocha_basic.info

Gulp

This project uses Gulp 4

If you'd like to see a task listing, run the following command:

gulp --tasks

Icons

The available icons can be found in img/icons

There are two techniques used, depending on context.

  1. SVG as a background-image value, usually on a pseudo element. The SVG fill colour is added as an attribute in the SVG file. We use this technique when using technique 2 isn't possible. The icons are black by default. If you need another color, it's best to copy the icon and manually adjust the fill/stroke to suit your needs. Rename the copy to include the color in the filename eg. arrow-down--white.svg.

  2. SVG symbol sprite using the <use> element. The SVG sprite is loaded as a single asset in the html.tpl.php before the closing body tag. Each icon within the sprite can be referenced by its ID eg.

Each icon should have the class icon and a BEM selector if needed eg. icon--arrow-down. We can create associated CSS rules to control dimension and fill. We're using https://github.com/jkphl/gulp-svg-sprite. See https://una.im/svg-icons for more details.

Generating the icons sprite

As defined in the gulp task, all new icons should be placed in the img/icons directory. Run gulp sprites to generate a new sprite. This generates the sprite SVG and places it in img/icons/icons-sprite.svg and it creates an html page with all SVGs for reference img/icons/sprite.symbol.html.

Renaming icons

When importing a new version of the Common Icons, there is a bulk-renaming command in package.json that can be invoked by running the following:

This assumes that you have a tool compatible with http://brewformulas.org/Rename — you can install it on OSX using Homebrew:

Browser support

See https://un-ocha.github.io/styleguide/common-design/

Favicons

OCHA default favicons are provided. Update these with your logo.

http://realfavicongenerator.net/ is a good tool for generating favicons.

Modernizr

We support the Modernizr Drupal module and the ocha_basic.info file contains the Modernizr tests we require.

Find the modernizr-custom.js in the ocha-basic-site repo.

After enabling the theme, go to admin/configuration/development/modernizr to rebuild Modernizr including the theme's feature detects: svg, cssgrid, cssgridlegacy and mediaqueries.

Add to Homescreen / manifest.json

We support the PWA Drupal module instead of providing our own manifest.json file. The hook_pwa_manifest_alter() hook is implemented in template.php with our default colors/icons, which can be overridden using the normal PWA admin UI.

Using with panels

Use with the Omega base theme to enable panels:


All versions of ocha_basic with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package unocha/ocha_basic contains the following files

Loading the files please wait ....