Skip to content

Commit

Permalink
Merge pull request #7 from Andre601/patch-4
Browse files Browse the repository at this point in the history
Improve CSS
  • Loading branch information
Andre601 authored Dec 24, 2023
2 parents fc70b21 + 9b53bc6 commit c5aeec1
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 72 deletions.
6 changes: 6 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
template: redirect.html
location: get-started
---

<!-- Comment required to build this page -->
60 changes: 0 additions & 60 deletions docs/assets/stylesheets/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
--md-typeset-a-color: #6791e0;
--md-typeset-subtitle-color: #70737a;
--md-typeset-subtitle-color--lighter: #878b92;

--md-cards-template-columns: 2;
}

.md-typeset a {
Expand Down Expand Up @@ -43,61 +41,3 @@
white-space: nowrap;
display: block;
}

/*
* Cards
*/
@media only screen and (max-width: 500px) {
:root {
--md-cards-template-columns: 2;
}
}

@media only screen and (max-width: 750px) {
:root {
--md-cards-template-columns: 1;
}
}

.index-cards {
display: grid;
grid-template-columns: repeat(var(--md-cards-template-columns), 1fr);
gap: .5rem;
max-width: 100vw;
overflow-x: auto;
padding: .5rem;
}

.card {
margin: .1rem;
border: 1px solid var(--md-typeset-subtitle-color);
border-radius: .15rem;
-webkit-transition: color 125ms ease-in-out,
border-color 125ms ease-in-out,
background-color 125ms ease-in-out;
transition: color 125ms ease-in-out,
border-color 125ms ease-in-out,
background-color 125ms ease-in-out;
}

.card:hover {
color: var(--md-typeset-a-color);
border-color: var(--md-typeset-subtitle-color--lighter);
background-color: var(--md-typeset-table-color--light);
}

a.card {
color: var(--md-typeset-color);
padding: .2rem .5rem;
}

a.card:hover {
color: var(--md-typeset-a-color);
}

.card-content {
font-size: 1rem;
font-weight: bold;
margin: .5rem 0;
line-height: 22px;
}
2 changes: 1 addition & 1 deletion docs/general/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ icon: material/folder-open
template: index_list.html
---

<!-- comment required for page build -->
<!-- Comment required to build this page -->
6 changes: 6 additions & 0 deletions docs/general/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
template: redirect.html
location: setup
---

<!-- Comment required to build this page -->
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ With a user-friendly command interface, you can easily create and customize holo

- Our holograms are created entirely using packets, which eliminates the need for physical entities in your world, providing a wide range of possibilities for individual player behaviour.
- Our holograms support multiple pages, allowing you to display more information in one place.
- Our holograms are interactive, featuring a variety of clock actions for added functionality.
- Our holograms are interactive, featuring a variety of click actions for added functionality.
- Our holograms feature a system for text animations, adding dynamic visual elements to each line.
- Our holograms support line offset, allowing you to position individual lines away from the center of the parent hologram.
- Our holograms feature a permission system, allowing you to restrict access to specific holograms or lines for certain players.
Expand Down
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ theme:
- 'navigation.footer'
- 'navigation.indexes'
- 'content.code.copy'
- 'content.tooltips'

watch:
- theme
Expand All @@ -60,6 +61,7 @@ markdown_extensions:
- toc:
permalink: true
toc_depth: 3
- md_in_html
# PyMDownX extensions
- pymdownx.blocks.admonition:
types:
Expand All @@ -85,6 +87,10 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.magiclink

not_in_nav: |
general/index.md
api/index.md
nav:
- index.md
- General:
Expand Down
24 changes: 14 additions & 10 deletions theme/index_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
{% block content %}
{{ super() }}

<div class="index-cards">
{% for subpage in nav.pages %}
{% if subpage.url.startswith(page.url) and subpage.url != page.url %}
<a href="{{ subpage.url | url }}" class="card">
<div class="card-content">
{{ subpage.title }}
</div>
</a>
{% endif %}
{% endfor %}
<div class="grid cards">
<ul>
{% for subpage in nav.pages %}
{% if subpage.url.startswith(page.url) and subpage.url != page.url %}
<li>
<h2><a href="{{ subpage.url | url }}"><strong>{{ subpage.title }}</strong></a></h2>
{% if subpage.meta and subpage.meta.description %}
<hr>
<p>{{ subpage.meta.description }}</p>
{% endif %}
</li>
{% endif %}
{%- endfor %}
</ul>
</div>
{% endblock %}

0 comments on commit c5aeec1

Please sign in to comment.