diff --git a/docs/tomlplusplus.css b/docs/tomlplusplus.css index 32e7efa5..7fa50b0f 100644 --- a/docs/tomlplusplus.css +++ b/docs/tomlplusplus.css @@ -192,13 +192,37 @@ pre.m-code + pre.m-console span /* github badges (index.html) */ .gh-badges { - padding-bottom: 0.75rem; + padding-bottom: 0.25rem; margin-left: -0.9rem; margin-right: -0.9rem; + margin-top: -0.5rem; } -.gh-badges a + +@media screen and (min-width: 992px) +{ + .gh-badges + { + display: flex; + justify-content: space-between; + } + .gh-badges br + { + display: none; + } +} +@media screen and (max-width: 991px) { - margin-right: 0.3rem; + .gh-badges + { + text-align: center; + line-height: 1.75rem; + } + .gh-badges a + { + margin-left: 0.2rem; + margin-right: 0.2rem; + margin-bottom: 0.4rem; + } } /* page category subheading ("module" etc) */ @@ -215,5 +239,6 @@ main > article > .m-container.m-container-inflatable > .m-row > div.m-col-l-10.m border-width: 0.1rem; margin-left: -1rem; margin-right: -1rem; + margin-top: -1.75rem; max-width: calc(100% + 2rem); } diff --git a/python/generate_documentation.py b/python/generate_documentation.py index 528f667e..197d7ce6 100644 --- a/python/generate_documentation.py +++ b/python/generate_documentation.py @@ -477,6 +477,7 @@ class IndexPageFix(object): 'badge-TOML.svg', 'https://github.com/toml-lang/toml/blob/master/README.md' ), + (None, None, None), #
( 'MIT License', 'badge-license-MIT.svg', @@ -503,8 +504,11 @@ def __call__(self, file, doc): parent('h1')[0].replace_with(banner) parent = doc.new_tag('div', class_='gh-badges', after=banner) for (alt, src, href) in self.__badges: - anchor = doc.new_tag('a', parent=parent, href=href, target='_blank') - doc.new_tag('img', parent=anchor, src=src, alt=alt) + if alt is None and src is None and href is None: + doc.new_tag('br', parent=parent) + else: + anchor = doc.new_tag('a', parent=parent, href=href, target='_blank') + doc.new_tag('img', parent=anchor, src=src, alt=alt) return True