Libraries: Master: Components Overview: Unterschied zwischen den Versionen

Aus CodeCoupler Wiki
Zur Navigation springen Zur Suche springen
Tm (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Tm (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Zeile 9: Zeile 9:
=== Normalized CSS ===
=== Normalized CSS ===


The libraries "YAML", "Normalize.css", "HTML5 Boilerplate" have each own normalizing parts. Each of this normalize some style, that other do not. For this reason all of this libraries was used. The normalizers will be used in the following order:
The libraries "YAML", "Normalize.css", "HTML5 Boilerplate" provide each own parts for:
 
* Normalized CSS that makes browsers render all elements more consistently.
* Fixing IE-Bugs for a robust and error-free presentation of layouts in old Internet Explorer.
* Typography definitions for a uniform design of standard content elements.
* HTML5-Definitions to render HTML5 elements correctly and uniform, even in older browsers.
* Special styling for printing HTML-Pages.
 
Each of this libraries normalize, fix or define some styles, that other do not. For this reason all of this libraries was used. The libraries will be used in the following order:


# normalize.css
# normalize.css
# main.css from HTML5 Boilerplate
# main.css from HTML5 Boilerplate
# base.css from YAML
# base.css from YAML
# gray-theme.css from YAML (for styling forms)
# typography.css from YAML
# print.css from YAML
# iehacks.css from YAML


=== Normalized Typographie CSS ===
=== CSS Helper Classes ===
 
By default CodeCoupler the following components are enabled:


Including the YAML-Framework you can use a wide range of classes to build truly flexible, accessible and responsive websites. Here is a short overview of all base classes:


=== Components Configuration ===
=== Components Configuration ===

Version vom 24. Januar 2013, 17:07 Uhr

Components are sets of content for the <head> and/or <body> section, that can be enabled or disabled by config or by code. Components can depend on each other. Enabling one component will enable all depending components, too. Disabling a component, will disable all other depending components, if not used otherwise.

Components will always be included before other components depends on it. Also a component can be configured to be included always after another component.

Default Configuration

The goal of the default configuration of components was to have a html5-ready, cross-browser (and lagacy-browser) compatible quick-start boilerplate. To this purpose, several libraries are enabled by default.

Normalized CSS

The libraries "YAML", "Normalize.css", "HTML5 Boilerplate" provide each own parts for:

  • Normalized CSS that makes browsers render all elements more consistently.
  • Fixing IE-Bugs for a robust and error-free presentation of layouts in old Internet Explorer.
  • Typography definitions for a uniform design of standard content elements.
  • HTML5-Definitions to render HTML5 elements correctly and uniform, even in older browsers.
  • Special styling for printing HTML-Pages.

Each of this libraries normalize, fix or define some styles, that other do not. For this reason all of this libraries was used. The libraries will be used in the following order:

  1. normalize.css
  2. main.css from HTML5 Boilerplate
  3. base.css from YAML
  4. gray-theme.css from YAML (for styling forms)
  5. typography.css from YAML
  6. print.css from YAML
  7. iehacks.css from YAML

CSS Helper Classes

Including the YAML-Framework you can use a wide range of classes to build truly flexible, accessible and responsive websites. Here is a short overview of all base classes:

Components Configuration

Components can be configured in application/config/master.php. Every component will be described in one array with three keys:

  • enabled: If TRUE the component will be enabled by default.
  • config: This value ist component specific. Please read the chapter Components: Overview.
  • depends: Thia array tells the framework on what components this one depends. Normally you do not have to modify this.

Enable/Disable Components Dynamicaly

Everywhere in your code you can enable or disable components. You do not have to worry about enabling depending components or the order of the components. Use the following function to handle components:

  • $this->master->enable_component($key): Enable component. Use the key of the component.
  • $this->master->disable_component($key): Enable component. Use the key of the component.
  • $this->master->is_component_enabled($key): Returns TRUE if the component is enabled, otherwise FALSE. Use the key of the component.

You can find an overview of all components, their keys and how to add you own components here: Components: Overview

Development

  • Use always <?= base_url ?>. The url-helper is autoloaded.