diff --git a/material-overrides/assets/stylesheets/index-page.css b/material-overrides/assets/stylesheets/index-page.css index 6d40865c..de36d1b9 100644 --- a/material-overrides/assets/stylesheets/index-page.css +++ b/material-overrides/assets/stylesheets/index-page.css @@ -1,15 +1,31 @@ -.main-page .subsection-wrapper { - margin-top: -1em; +.subsection-wrapper { + display: flex; + gap: 1em; + flex-wrap: wrap; } -.subsection-wrapper a { +.subsection-wrapper .card { + border: 1px solid var(--mystic); + border-radius: 16px; text-decoration: none; + align-content: start; + flex: 1 0 48%; + max-width: 48%; +} + +.md-typeset .subsection-wrapper .card a { + text-decoration: none; + cursor: pointer; +} + +.md-typeset .subsection-wrapper .card a:hover .title { + color: var(--pink); } .subsection-wrapper .title { margin: 0; - font-size: 1.2em; - padding: 1.5em 1.5em 0 1.2em; + font-size: 1.15em; + padding: 1.5em 1.5em 0.5em 1.2em; } .subsection-wrapper .description { @@ -19,17 +35,14 @@ padding: 0 1.5em 1.8em 1.5em; } -.subsection-wrapper .card { - border: 1px solid var(--mystic); - border-radius: var(--md-border-radius); - margin: 1em 0; - text-decoration: none; +@media screen and (max-width: 36em) { + .subsection-wrapper .card { + flex: 1 0 100%; + max-width: 100%; + } } -.md-typeset .subsection-wrapper a:hover { - text-decoration: none; -} - -.subsection-wrapper .card:last-child { - margin-bottom: 4em; -} +/* Hide TOC on index pages */ +.md-nav.md-nav--secondary { + display: none; +} \ No newline at end of file diff --git a/material-overrides/subsection-index-page.html b/material-overrides/index-page.html similarity index 84% rename from material-overrides/subsection-index-page.html rename to material-overrides/index-page.html index 6c5eff18..e38779a3 100644 --- a/material-overrides/subsection-index-page.html +++ b/material-overrides/index-page.html @@ -16,7 +16,6 @@ {% else %} {% if nav_item.is_page %} -

{{ nav_item.parent.title }}

{% set description = "" %} {% for nav_item in element[1:] %} @@ -98,13 +97,25 @@

{{ nav_item.title }}

{% endif %} {% endmacro %} -
- {% if nav|length>1 %} - {% for nav_item in nav %} - {% if nav_item.is_section and nav_item.active %} - {{ find_active_page(nav_item.children, nav_item) }} +{% set insert_marker = ':::INSERT_IN_THIS_SECTION:::' %} +{% if insert_marker in page.content %} + {% set parts = page.content.split(insert_marker) %} + {% set dynamic_html %} +
+ {% if nav|length > 1 %} + {% for nav_item in nav %} + {% if nav_item.is_section and nav_item.active %} + {{ find_active_page(nav_item.children, nav_item) }} + {% endif %} + {% endfor %} {% endif %} - {% endfor %} - {% endif %} -
-{% endblock %} \ No newline at end of file +
+ {% endset %} + {% set modified_content = parts[0] | safe + (dynamic_html | safe) + parts[1] | safe %} + {{ modified_content | safe }} +{% else %} + {{ page.content | safe }} +{% endif %} + + +{% endblock %} diff --git a/material-overrides/main-index-page.html b/material-overrides/main-index-page.html deleted file mode 100644 index fff0138a..00000000 --- a/material-overrides/main-index-page.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "main.html" %} - -{% block styles %} - {{ super() }} - -{% endblock %} - -{% block content %} -
- {% if nav|length>1 %} - {% for nav_item in nav %} - {% if nav_item.is_section and nav_item.active %} -

{{ nav_item.title }}

-
- {% for nav_item in nav_item.children %} - {% if nav_item.is_section %} - {% set subsection_path = nav_item.children[0].url %} - {% set description = nav_item.children[0].meta.description %} - {% if subsection_path.startswith(page.url) %} - {% set href_path = subsection_path|replace(page.url, '') %} - - {% endif %} - {% endif %} - {% endfor %} -
- {% endif %} - {% endfor %} - {% endif %} -
All information made available, including claims, content, designs, algorithms, estimates, - roadmaps, specifications, and performance measurements described in this project are provided for informational - purposes only and Moonbeam does not endorse any project referenced here. It is up to the reader to check and - validate the accuracy and truthfulness. Furthermore, nothing in this project information constitutes a - solicitation for investment. No developer or entity involved in creating the Moonbeam Network or Moonriver - Network or authoring this information will be liable for any claims or damages whatsoever associated with your - use, inability to use, or your interaction with other users of, the Moonbeam Network or Moonriver Network or any - information made available on this website, including any direct, indirect, incidental, special, exemplary, - punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. All - information contained herein is subject to modification without notice. -
-
-{% endblock %} - -{% block site_nav %} - {% if nav %} - {% if page.meta and page.meta.hide %} - {% set hidden = "hidden" if "navigation" in page.meta.hide %} - {% endif %} - - {% endif %} - {% if "toc.integrate" not in features %} - {% if page.meta and page.meta.hide %} - {% set hidden = "hidden" if "toc" in page.meta.hide %} - {% endif %} - - {% endif %} -{% endblock %} \ No newline at end of file