Skip to content

Commit

Permalink
Style examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Bwc9876 committed Apr 23, 2022
1 parent 1f0fdca commit ae9b782
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion menagerie/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from menagerie.generate import generate
from menagerie.new_project import new_project

__version__ = '0.0.6'
__version__ = '0.0.7'
__help__ = """
Usage:
menagerie new-project [name] : Creates a new menagerie project with a given name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<br/>
<div class="badge badge-secondary">Example{% if examples|length > 1 %}s{% endif %}:</div>
<br/>
{% from "schema_templates/schema_macros.jinja2" import badge %}

<p>
{{ badge("secondary", "Examples:" if examples|length > 1 else "Example:", "") }}
</p>

{% for example in examples %}
{% set example_id = schema.html_id ~ "_ex" ~ loop.index %}
Expand All @@ -10,10 +12,6 @@
aria-controls="{{ example_id }}"></button>
{% endif %}
<div id="{{ example_id }}" class="{% if example_is_long %}collapse {% endif %}jumbotron examples">
{% if not examples_as_yaml %}
{{ example | highlight_json_example | safe }}
{% else %}
{{ example | highlight_yaml_example | safe }}
{% endif %}
<pre><code class="language-js hljs">{{ example | safe }}</code></pre>
</div>
{% endfor %}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = menagerie-docs
author = bwc9876
author_email = [email protected]
version = 0.0.6
version = 0.0.7
url = https://github.com/Bwc9876/menagerie
description = A static site generator made for MarkDown, HTML, JsonSchema, XMLSchema, and more
long_description = file: README.md
Expand Down

0 comments on commit ae9b782

Please sign in to comment.