div.m-image.m-fullwidth img, div.m-image.m-fullwidth svg {
width: 100%;
}
+/* Image badge. Deliberately omitting <svg> since I don't see any use for those
+ as avatars yet. */
+img.m-image.m-badge, div.m-image.m-badge img {
+ border-radius: 50%;
+}
/* Figure. Ensure everything is done for both <img> and <svg>. */
figure.m-figure {
div.m-image.m-fullwidth img, div.m-image.m-fullwidth svg {
width: 100%;
}
+img.m-image.m-badge, div.m-image.m-badge img {
+ border-radius: 50%;
+}
figure.m-figure {
max-width: 100%;
margin-top: 0;
div.m-image.m-fullwidth img, div.m-image.m-fullwidth svg {
width: 100%;
}
+img.m-image.m-badge, div.m-image.m-badge img {
+ border-radius: 50%;
+}
figure.m-figure {
max-width: 100%;
margin-top: 0;
div.m-image.m-fullwidth img, div.m-image.m-fullwidth svg {
width: 100%;
}
+img.m-image.m-badge, div.m-image.m-badge img {
+ border-radius: 50%;
+}
figure.m-figure {
max-width: 100%;
margin-top: 0;
div.m-image.m-fullwidth img, div.m-image.m-fullwidth svg {
width: 100%;
}
+img.m-image.m-badge, div.m-image.m-badge img {
+ border-radius: 50%;
+}
figure.m-figure {
max-width: 100%;
margin-top: 0;
</a>
</div>
+Badge:
+
+.. raw:: html
+
+ <img src="{static}/static/mosra.jpg" class="m-image m-badge">
+
+Badge, with a link:
+
+.. raw:: html
+
+ <div class="m-image m-badge">
+ <a href="http://blog.mosra.cz/"><img src="{static}/static/mosra.jpg" /></a>
+ </div>
+
Figures
=======
Badges are blocks together with an avatar, containing for example info about
the author of given article. Simply add :css:`.m-badge` to your colored block
element and put an :html:`<img>` element with the avatar as the first child.
-Only :html:`<h3>` is supported for a badge.
+Only :html:`<h3>` is supported for a badge. For standalone rounded avatars, see
+`Images`_ below.
.. code-figure::
your :abbr:`reST <reStructuredText>` markup using the
`Pelican Images plugin <{filename}/plugins/images.rst>`_.
+For avatars, similarly to the `Badges`_ above, applying a :css:`.m-badge` class
+together with :css:`.m-image` will make the image round. Works for both plain
+:html:`<img>` and clickable images wrapped in :html:`<div class="m-image">`.
+
+.. code-figure::
+
+ .. code:: html
+
+ <img src="author.jpg" alt="The Author" class="m-image m-badge" />
+
+ .. raw:: html
+
+ <img src="{static}/static/mosra.jpg" alt="The Author" class="m-image m-badge" style="width: 125px" />
+
`Figures`_
==========