Skip to content

Commit

Permalink
Create a patch branch to pull changes into the stable 1.3.0 version …
Browse files Browse the repository at this point in the history
…(1.4.0 contained a breaking change)
  • Loading branch information
[ Cassondra ] committed Apr 28, 2020
1 parent 11c1618 commit 35e98db
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 213 deletions.
1 change: 1 addition & 0 deletions .pk-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ categories:
- Layout
- Component
- Atom
body_attr:
assets:
css:
js:
Expand Down
22 changes: 18 additions & 4 deletions CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
## 1.2 Minor style tweaks and functionality additions (2017-03-09)
## 1.3.1 Additional config features (2020-04-28)

Tag: [1.2](https://github.com/PatternBuilder/pattern-kit/releases/tag/V1.2)
Tag: [1.3.1](https://github.com/PatternBuilder/pattern-kit/releases/tag/1.3.1)

- Add support for body attributes in the config
- Update documentation
- Update styles for squishy-window indicators for usability

## 1.3.0 Documentation style updates (2017-03-14)

Tag: [1.3.0](https://github.com/PatternBuilder/pattern-kit/releases/tag/1.3.0)

- Add font family, colors, spacing, etc. to styleguide. Cleaned up some extra scrollbars, set a max width on the content area of the docs area.

## 1.2.0 Minor style tweaks and functionality additions (2017-03-09)

Tag: [1.2.0](https://github.com/PatternBuilder/pattern-kit/releases/tag/1.2.0)

- Change rendering of the styleguide documentation to lean on bootstrap column grid
- Add logic to render only the tabs that work for a particular atom based on what data is present
Expand All @@ -12,9 +26,9 @@ Tag: [1.2](https://github.com/PatternBuilder/pattern-kit/releases/tag/V1.2)
- Update jQuery package to reference CDN for consistency


## 1.0 support-at-data-and-yaml (2016-08-01)
## 1.1 support-at-data-and-yaml (2016-08-01)

Tag: [1.0](https://github.com/PatternBuilder/pattern-kit/tree/V1.1)
Tag: [1.1](https://github.com/PatternBuilder/pattern-kit/tree/V1.1)

Now supporting YAML files for docs using the same basename as JSON. Also supporting @data to reference other component's doc data file. So @component would import component.docs.json or component.docs.yaml into your data file.

Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Pattern Kit

Pattern Kit is an application that lets you preview your library of templates and manipulate their content by interacting with a form built from the schemas. It is both a development tool and a public facing pattern library.
Pattern Kit is an application that lets you preview your library of templates and manipulate their content by interacting with a form built from the schemas. It is both a development tool and a public-facing pattern library.

For a demo check out [Pattern Kit Demo](http://patternkit.info/sg/).
For a demo check out [Pattern Kit Demo](https://webrh-patternkit.int.open.paas.redhat.com/).

# Installation

Expand Down Expand Up @@ -38,6 +38,7 @@ $app['http_cache']->run();
- Create arrays of paths to your data, schema, template, docs and styleguide files (relative to config)
- Set the file extensions for each file type
- List categories in order you'd like them to appear in navigation
- Add any attributes you want printed on the body tag using `body_attr`
- Create arrays of assets for css, js and footer js (including live reload if necessary)

```
Expand All @@ -62,11 +63,17 @@ extensions:
docs: .docs.md
sg: .sg.md
categories:
- Pattern
- Sub Pattern
- Layout
- Component
- Atom
- Pattern
- Sub-pattern
- Layout
- Component
- Atom
body_attr:
- unresolved
- id: main
- class:
- foo
- bar
assets:
css:
- path/to/css
Expand Down
21 changes: 20 additions & 1 deletion resources/templates/basic.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
{% set body_props %}
{%- if app_config.body_attr -%}
{% for attr in app_config.body_attr -%}
{% if attr is iterable -%}
{% for key in attr|keys %}
{% if attr[key] is iterable -%}
{% set items %}
{% for item in attr[key] %} {{ item }}{% endfor %}
{% endset %}
{% elseif attr[key] is same as(false) or attr[key] is same as(true) %}
{% set items = attr[key] ? "true" : "false" %}
{% else %}{% set items = attr[key]|trim %}{% endif %}
{{ key }}="{{ items|trim }}"
{% endfor %}
{% else %} {{ attr }}{% endif %}
{%- endfor %}
{% endif -%}
{% endset -%}

<!DOCTYPE html>
<html>
<head>
Expand All @@ -12,7 +31,7 @@
<script type="text/javascript" src="{{js}}"></script>
{% endfor %}
</head>
<body>
<body{{ body_props }}>
<div id="snippet" data-default-overflow="scroll">
{% if (name) or (template) %}
{% include template ?: name ~ '.twig' %}
Expand Down
Loading

0 comments on commit 35e98db

Please sign in to comment.