diff options
| author | Sean Brant | 2013-03-13 22:23:50 -0500 |
|---|---|---|
| committer | Sean Brant | 2013-03-13 22:23:50 -0500 |
| commit | c7d7aad2913d666a9ad09d74976bb90eff03acd1 (patch) | |
| tree | 2085154feb77942ef8760f9c4eb4486cc24687f7 /examples | |
| parent | 083e4dd9ed498ba2ef5133943fadb1fab7e71276 (diff) | |
| download | pykss-c7d7aad2913d666a9ad09d74976bb90eff03acd1.tar.bz2 | |
Adds support for adding examples inside comments
Diffstat (limited to 'examples')
3 files changed, 32 insertions, 2 deletions
diff --git a/examples/djangoproject/djangoproject/static/css/forms.css b/examples/djangoproject/djangoproject/static/css/forms.css new file mode 100644 index 0000000..3830ebd --- /dev/null +++ b/examples/djangoproject/djangoproject/static/css/forms.css @@ -0,0 +1,12 @@ +/* +Form input. + +.error - When form error. + +Example: + <input type="text" class="text$modifier_class" /> + +Styleguide 2.1 +*/ +input.error { + border: 1px solid red; } diff --git a/examples/djangoproject/djangoproject/templates/base.html b/examples/djangoproject/djangoproject/templates/base.html index f52ed82..ef4a5c4 100644 --- a/examples/djangoproject/djangoproject/templates/base.html +++ b/examples/djangoproject/djangoproject/templates/base.html @@ -6,6 +6,7 @@ <title>Styleguide Example</title> <link rel="stylesheet" href="{% static "css/layout.css" %}" type="text/css" /> <link rel="stylesheet" href="{% static "css/buttons.css" %}" type="text/css" /> + <link rel="stylesheet" href="{% static "css/forms.css" %}" type="text/css" /> </head> <body> <header>Styleguide Example</header> diff --git a/examples/djangoproject/djangoproject/templates/styleguide.html b/examples/djangoproject/djangoproject/templates/styleguide.html index 1817a27..05eafb7 100644 --- a/examples/djangoproject/djangoproject/templates/styleguide.html +++ b/examples/djangoproject/djangoproject/templates/styleguide.html @@ -14,7 +14,7 @@ {% endcomment %} {% styleguideblock styleguide "1.1" %} - <button class="{{ modifier_class }}">Example Button</button> + <button class="$modifier_class">Example Button</button> {% endstyleguideblock %} {% verbatim %} @@ -22,9 +22,26 @@ <pre> <code> {% styleguideblock styleguide "1.1" %} - <button class="{{ modifier_class }}">Example Button</button> + <button class="$modifier_class">Example Button</button> {% endstyleguideblock %} </code> </pre> {% endverbatim %} + +{% comment %} + +{% renderstyleguide styleguide "2" %} +{% renderstyleguide styleguide "2" using "custom.html" %} + +{% endcomment %} +{% renderstyleguide styleguide "2" %} + +{% verbatim %} +<p>This block above was created with a simple template call:</p> +<pre> + <code> +{% renderstyleguide styleguide "2" %} + </code> +</pre> +{% endverbatim %} {% endblock %} |
