Download the PHP package benmanu/silverstripe-styleguide without Composer

On this page you can find all versions of the php package benmanu/silverstripe-styleguide. 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 silverstripe-styleguide

silverstripe-styleguide

Build Status Generates a styleguide for a SilverStripe theme using CSS documentation.

Requirements

SilverStripe 4 or higher

Installation

$ composer require benmanu/silverstripe-styleguide

Basic Usage

Define the base css/scss folder through the site config.

BenManu\StyleGuide\StyleGuideController:
  paths: 'styleguide/scss'              // the base folder used to render kss.
  css_files:
    - 'themes/default/css/screen.css'   // any css theme files to include in the styleguide.
  js_files:
    - 'themes/default/js/script.js'     // any js theme files to include in the styleguide.

Opens up a controller route /sg.

Comments tagged with Styleguide 1.0, Styleguide 2.0 etc are used to create the main /sg/style-guide navigation. Sub-navigation sections are generated with tags of Styleguide 1.1, Styleguide 1.2 etc. Sub-navigation children are made up of section modifiers like .btn-default, .btn-primary.

Example

You can use the styleguide module scss/css as an example using the below config in your site _config/config.yml file.

BenManu\StyleGuide\StyleGuideController:
  paths: 'styleguide/scss'
  css_files:
    - 'styleguide/dist/css/screen.css'

Kitchen Sink CSS Example

/*
#Components

All the components!

Styleguide 1.0
*/

/*
#Buttons

Use the button classes on an <a>, <button>, or <input> element.

Markup:
<a class="btn $modifierClass">Button</a>

Template: Includes/Button

SectionTemplate: BenManu/StyleGuide/Includes/SGColorPalette

Deprecated:
If there was a deprecation notice it would go here.

Experimental:
If there was any experimental notes they would go here.

.btn-default - Standard button.
.btn-default:hover - Subtle hover highlight.
.btn-primary - Provides extra visual weight and identifies the primary action in a set of buttons.
.btn-success - Indicates a successful or positive action.
.btn-danger - Indicates a dangerous or potentially negative action.

$success - The success hex code variable.
$danger - The danger hex code variable.

Compatible in IE6+, Firefox 2+, Safari 4+.

Styleguide 1.1
*/

See the KSS documentation for further details, with a couple of exceptions being the Template:, and SectionTemplate: parameters. The Template: parameter will render a SilverStripe template file as the example (see Fixtures below), and the SectionTemplate: will render a SilverStripe template file as the Section display.

All comment descriptions are treated as markdown and parsed through parsedown.

Section And SectionTemplate

Fixtures

A yml fixture file can be created in the (project)/styleguide/ directory called fixture.yml, used to populate template variables.

All template files should be placed under the key Template, example:

Template:
  Includes/Footer:
    FooterContent: '<p>Here is some footer content</p>'

Alternatively you can reference other non-template values to populate relationships (has_one, has_many, many_many) and field values, example:

SiteConfig:
  main:
    Title: MySite Title
Site:
  link1:
    Link: #link1
    Text: Link 1
  link2:
    Link: #link2
    Text: Link 2
  link3:
    Link: #link3
    Text: Link 3
StyleGuide:
  main:
    Content: '<p>Here is some footer content</p>'

Template:
  Includes/Footer:
    SiteConfig: =>SiteConfig.main
    FooterLinks: =>Site.link1, =>Site.link2, =>Site.link3
    FooterContent: =>StyleGuide.main.Content

Pages

A yml fixture file can be created in the (project)/styleguide/ directory called pages.yml, used to create additional main and children pages. The Template parameter should be the same name as a SilverStripe template file in your theme.

All template files should be placed under the key Page, example:

Page:
  documentation:
    Title: Documentation
    Template: SGDocumentation
  performanceMonitoring:
    Title: Performance Monitoring
    Template: SGPerformanceMonitoring

Alternatively you can populate a Children parameter referencing a list of child pages to include in the sub-navigation:

Documentation:
  general:
    Title: General
    Template: SG_General
  css:
    Title: Css
    Template: SG_Css
  js:
    Title: Js
    Template: SG_Js
  git:
    Title: Git
    Template: SG_Git
  images:
    Title: Images and icons
    Template: SG_ImagesAndIcons

Children:
  child1:
    Title: Child 1
    Template: SGChild
  child2:
    Title: Child 2
    Template: SGChild

Page:
  documentation:
    Title: Documentation
    Children: =>Documentation.general, =>Documentation.css, =>Documentation.js, =>Documentation.git, =>Documentation.images
  performanceMonitoring:
    Title: Performance Monitoring
    Template: SGPerformanceMonitoring
    Children: =>Children.child1, =>Children.child2

Project Links


All versions of silverstripe-styleguide with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4
symfony/finder Version ~2.8
erusev/parsedown Version 1.6.0
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 benmanu/silverstripe-styleguide contains the following files

Loading the files please wait ....