Skip to content

Commit

Permalink
Sync common files from central repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf2323 authored and github-actions[bot] committed Dec 3, 2024
1 parent e927909 commit b2ad03e
Show file tree
Hide file tree
Showing 18 changed files with 534 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/_custom_theme/.icons/brands/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/_custom_theme/.icons/brands/mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/_custom_theme/externalLinkIcon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "base.html" %}

<style class="externalLinkIcon">
body .md-content__inner a[href^="http"]:not([href^="SITE_DOMAIN"]):not(.md-content__button,.noExternalLinkIcon) {
background-image: url("{{ base_url }}/_media/content/linkExternalWhite.svg");
background-repeat: no-repeat;
background-position: top right;
padding-right: 0.7em;
background-size: 0.6em;
}

body[data-md-color-scheme="slate"] .md-content__inner a[href^="http"]:not([href^="SITE_DOMAIN"]):not(.md-content__button,.noExternalLinkIcon) {
background-image: url("{{ base_url }}/_media/content/linkExternalDark.svg");
}

body .md-content__inner a[href^="http"]:not([href^="SITE_DOMAIN"]):not(.md-content__button,.noExternalLinkIcon):hover {
background-image: url("{{ base_url }}/_media/content/linkExternalHover.svg");
}
</style>
<script>
const externalLinkIconElement = document.querySelector(".externalLinkIcon");
const currentHTML = externalLinkIconElement.innerHTML;
const updatedHTML = currentHTML.replaceAll("SITE_DOMAIN", window.location.origin);
externalLinkIconElement.innerHTML = updatedHTML;
</script>
148 changes: 148 additions & 0 deletions docs/_custom_theme/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{% extends "main.html" %}
{% block tabs %}

{{ super() }}

<!-- Remove some MkDocs content (sidebar, spacing...) -->
<style>
.md-main__inner {
margin-top: 0;
}

.md-content__inner {
padding-top: 0;
}

.md-content__inner:before {
display: none !important;
}
</style>

<!-- Customize background (responsive) -->
<style>
/* Variable image Default and Dark Mode */
body {
background-repeat: no-repeat, no-repeat;
background-color: var(--md-default-bg-color);
background-size: 100% 50%, 100% 100%;
background-position: 0 100%, 0 100%;

background-image: url("_media/content/Home/waveWhite.svg"),
linear-gradient(to bottom, var(--md-primary-fg-color), hsla(280, 67%, 55%, 1) 100%, var(--md-default-bg-color));
}

body[data-md-color-scheme="slate"] {
background-image: url("_media/content/Home/waveDark.svg"),
linear-gradient(to bottom, var(--md-primary-fg-color), hsla(280, 67%, 55%, 1) 100%, var(--md-default-bg-color));
}
</style>

<!-- Flex content for responsive design -->
<style>
/* smartphones */
.betonquest-content {
margin-left: 0.3em;
margin-right: 0.3em;
}

.betonquest-flex-container {
display: flex;
flex-direction: column-reverse;
max-width: 100%;
margin-bottom: 1em;
}

.betonquest-flex-item {
min-width: 100%;
flex: auto;
}

.betonquest-flex-logo {
max-width: 30em;
display: block;
margin-left: auto;
margin-right: auto;
}

/* tablets */
@media (min-width: 40em) {
.betonquest-content {
margin-left: 2em;
margin-right: 2em;
}
}

/* desktops low res */
@media (min-width: 60em) {
.betonquest-content {
margin-left: 5em;
margin-right: 5em;
}

.betonquest-flex-container {
flex-direction: row;
margin-bottom: 2em;
}

.betonquest-flex-item {
min-width: 50%;
}

.betonquest-flex-logo {
min-width: 25em;
max-width: 40em;
}
}

/* desktops high res */
@media (min-width: 80em) {
.betonquest-content {
margin-left: 10em;
margin-right: 10em;
}

.betonquest-flex-logo {
min-width: 30em;
max-width: 40em;
}
}
</style>

<!-- Header Customization -->
<style>
.betonquest-header {
margin-top: 1.1em !important;
margin-bottom: 1rem !important;
color: currentColor !important;
font-weight: 700 !important;
}

.betonquest-text {
padding-right: 4.5em;
}

.betonquest-list {
margin-bottom: .2em;
}

.betonquest-text-color {
color: white !important;
}

</style>

<!-- Button Customization -->
<style>

.betonquest-buttons {
color: #ffffff !important;
}

</style>

{% endblock %}
{% block content %}
<div class="betonquest-content">
{{ page.content }}
</div>
{% endblock %}
38 changes: 38 additions & 0 deletions docs/_custom_theme/partials/toc-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{# Copied and customized from: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/partials/toc-item.html #}
{# Table of contents item #}
<li class="md-nav__item">
<a class="md-nav__link" href="{{ toc_item.url }}">
<span class="md-ellipsis">

{# Typeset title #}
{% if toc_item.typeset %}
<span class="md-typeset">
{{ toc_item.typeset.title }}
</span>

{# Regular title #}
{% else %}
{{ toc_item.title }}
{% endif %}
</span>
</a>

{# Table of contents list #}
{% if toc_item.children %}
<nav aria-label="{{ toc_item.title }}" class="md-nav">
<ul class="md-nav__list">
{# Checks if the page metadata contains the toc_depth setting. If yes, it doesn't generate toc below the given
value #}
{% for toc_item in toc_item.children %}
{% if page.meta.toc_depth %}
{% if toc_item.level <= page.meta.toc_depth %}
{% include "partials/toc-item.html" %}
{% endif %}
{% else %}
{% include "partials/toc-item.html" %}
{% endif%}
{% endfor %}
</ul>
</nav>
{% endif %}
</li>
34 changes: 34 additions & 0 deletions docs/_custom_theme/partials/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{# Copied and customized from: https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/partials/toc.html #}
{% set title = lang.t("toc") %}
{% if config.mdx_configs.toc and config.mdx_configs.toc.title %}
{% set title = config.mdx_configs.toc.title %}
{% endif %}

<nav aria-label="{{ title }}" class="md-nav md-nav--secondary">
{% set toc = page.toc %}

{% set first = toc | first %}
{% if first and first.level == 1 %}
{% set toc = first.children %}
{% endif %}

{% if toc %}
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
{{ title }}
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
{# Checks if the page metadata contains the toc_depth setting. If yes, it doesn't generate toc below the given value
#}
{% for toc_item in toc %}
{% if page.meta.toc_depth %}
{% if toc_item.level <= page.meta.toc_depth %}
{% include "partials/toc-item.html" %}
{% endif %}
{% else %}
{% include "partials/toc-item.html" %}
{% endif%}
{% endfor %}
</ul>
{% endif %}
</nav>
15 changes: 15 additions & 0 deletions docs/_media/content/Home/waveDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/_media/content/Home/waveWhite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/_webCode/css/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.button-list {
width: 17em;
margin: 0.5em;
text-align: center;
}
7 changes: 7 additions & 0 deletions docs/_webCode/css/centered.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.centered {
display: flex;
align-items: center;
justify-content: center }
.centered p {
margin-right: 0;
margin-left: 0; }
3 changes: 3 additions & 0 deletions docs/_webCode/css/coloredIcons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.task {
color: #00AB6C;
}
3 changes: 3 additions & 0 deletions docs/_webCode/css/contentAreaFullWidth.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.md-grid {
max-width: clamp(400px,80%,2048px);
}
3 changes: 3 additions & 0 deletions docs/_webCode/css/mermaidCentered.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
div.mermaid {
text-align: center;
}
17 changes: 17 additions & 0 deletions docs/_webCode/js/copyLinkToClipboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//mkdocs-material provided observable that is called when the page is fully loaded. Respects both default and "instant loading" of pages.
document$.subscribe(function () {
//Adds an EventListener to all "chain link" elements next to headings.
let links = document.getElementsByClassName("headerlink");
for (let i = 0; i < links.length; i++) {
links[i].addEventListener("click", onClick);
}

//Copies the current URL into the users clipboard.
//This needs to be delayed by a bit since the browser needs to update the URL before it's copied.
function onClick() {
setTimeout(() => {
let url = window.location.href;
navigator.clipboard.writeText(url);
}, 10);
}
});
6 changes: 6 additions & 0 deletions docs/_webCode/js/copyrightYearUpdater.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//mkdocs-material provided observable that is called when the page is fully loaded. Respects both default and "instant loading" of pages.
document$.subscribe(function () {
const copyrightElement = document.getElementById("bqCopyright");
const currentYear = new Date().getFullYear().toString();
copyrightElement.textContent = copyrightElement.textContent.replace("{CurrentYear}", currentYear);
});
16 changes: 16 additions & 0 deletions docs/_webCode/js/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.typesetPromise()
})
Loading

0 comments on commit b2ad03e

Please sign in to comment.