Skip to content

Commit

Permalink
Added an example for constructing <footer> tag; Added Footer() class …
Browse files Browse the repository at this point in the history
…in api reference documentation; Added <footer> tag to CHANGELOG
  • Loading branch information
bharadwajyarlagadda committed Sep 3, 2016
1 parent c155c68 commit 0ea6a68
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ v0.2.0-alpha
- <embed>
- <fieldset></fieldset>
- <figure></figure>
- <footer></footer>

Caveats:

Expand Down
4 changes: 4 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ API Reference

.. autoclass:: korona.html.construct.Figure
:members:


.. autoclass:: korona.html.construct.Footer
:members:

27 changes: 26 additions & 1 deletion docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ Korona can build <fieldset> tag.
<figure>
--------

Korona for now does not support any inner tags in <figure> tag.
Korona can build <figure> tag.

.. code-block:: python
Expand All @@ -623,3 +623,28 @@ Korona for now does not support any inner tags in <figure> tag.
assert figure_tag1 == '<figure>abc</figure>'
assert figure_tag1 == figure_tag2
.. note:: Korona for now does not support any inner tags in <figure> tag.

<footer>
--------

Korona can build <footer> tag.

.. code-block:: python
from korona.html.construct import Footer
attributes = {'text': 'abc'}
# You can pass in the attributes in the form of a dictionary.
footer1 = Footer(**attributes)
# You can also pass in the attributes as args.
footer2 = Footer(text='abc')
footer_tag1 = figure1.construct()
footer_tag2 = figure2.construct()
assert footer_tag1 == '<footer>abc</footer>'
assert footer_tag1 == footer_tag2
.. note:: Korona for now does not support any inner tags in <footer> tag.

0 comments on commit 0ea6a68

Please sign in to comment.