portal: display additional links configured in yaml

This commit is contained in:
Iain Learmonth 2022-08-17 11:48:06 +01:00
parent b9d662fbdf
commit 92ea4d527b
2 changed files with 23 additions and 0 deletions

View file

@ -168,6 +168,20 @@
</li>
</ul>
</div>
{% if config['ADDITIONAL_SIDEBAR_LINKS'] %}
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Extras</span>
</h6>
<ul class="nav flex-column">
{% for link in config['ADDITIONAL_SIDEBAR_LINKS'] %}
<li class="nav-item">
<a class="nav-link" href="{{ link['url'] }}">
{{ icon(link['icon']) }} {{ link['label'] }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">

View file

@ -44,6 +44,10 @@
viewBox="0 0 16 16">
<path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855.173-.324.33-.682.468-1.068H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5a6.959 6.959 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5h2.49zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4a7.966 7.966 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4h2.355z"/>
</svg>
{% elif i == "graph-up-arrow" %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-graph-up-arrow" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M0 0h1v15h15v1H0V0Zm10 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V4.9l-3.613 4.417a.5.5 0 0 1-.74.037L7.06 6.767l-3.656 5.027a.5.5 0 0 1-.808-.588l4-5.5a.5.5 0 0 1 .758-.06l2.609 2.61L13.445 4H10.5a.5.5 0 0 1-.5-.5Z"/>
</svg>
{% elif i == "hdd" %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-hdd"
viewBox="0 0 16 16">
@ -82,6 +86,11 @@
<title>Tor icon</title>
<path d="M17.578 12.201c-.76-.692-1.721-1.251-2.704-1.81-.446-.246-1.81-1.318-1.34-2.838l-.851-.358c1.342-2.078 3.085-4.134 5.229-6.056-1.721.581-3.24 1.476-4.379 3.062.67-1.407 1.765-2.793 2.972-4.201-1.654 1.185-3.084 2.525-3.979 4.313l.627-2.503c-.894 1.608-1.52 3.24-1.766 4.871l-1.317-.535-.223.178c1.162 2.078.559 3.174-.022 3.553-1.162.783-2.838 1.788-3.688 2.659-1.609 1.654-2.078 3.218-1.921 5.296.157 2.66 2.101 4.873 4.67 5.744 1.14.38 2.19.424 3.352.424 1.877 0 3.799-.491 5.207-1.676a6.551 6.551 0 0 0 2.369-5.027 6.875 6.875 0 0 0-2.236-5.096zm-3.553 8.872c-.09.402-.38.894-.737 1.341.134-.246.246-.492.313-.76.559-1.989.805-2.904.537-5.095-.045-.224-.135-.938-.471-1.721-.468-1.185-1.184-2.303-1.272-2.548-.157-.38-.38-1.989-.403-3.084.023.938.089 2.659.335 3.329.067.225.715 1.229 1.185 2.459.312.849.38 1.632.446 1.854.224 1.007-.045 2.705-.401 4.313-.111.581-.426 1.252-.828 1.766.225-.313.402-.715.537-1.185.269-.938.38-2.145.356-2.905-.021-.446-.222-1.407-.558-2.278-.201-.47-.492-.961-.692-1.297-.224-.335-.224-1.072-.313-1.921.021.916-.068 1.385.156 2.033.134.379.625.916.759 1.43.201.693.402 1.453.381 1.922 0 .536-.022 1.52-.269 2.593-.157.804-.515 1.497-1.095 1.943.246-.312.38-.625.447-.938.089-.469.111-.916.156-1.475a5.96 5.96 0 0 0-.111-1.721c-.179-.805-.469-1.608-.604-2.168.022.626.269 1.408.381 2.235.089.604.044 1.206.021 1.742-.021.627-.223 1.722-.492 2.258-.268-.112-.357-.269-.537-.491-.223-.291-.357-.604-.491-.962a5.043 5.043 0 0 1-.291-.915 3.071 3.071 0 0 1 .559-2.213c.469-.671.559-.716.715-1.497-.223.692-.379.759-.871 1.341-.559.647-.648 1.586-.648 2.346 0 .313.134.671.246 1.007.134.356.268.714.447.982.134.223.313.379.469.491-.581-.156-1.184-.379-1.564-.692-.938-.805-1.765-2.167-1.877-3.375-.089-.982.804-2.413 2.078-3.128 1.073-.626 1.318-1.319 1.542-2.459-.313.983-.626 1.833-1.654 2.348-1.475.804-2.235 2.1-2.167 3.352.112 1.586.737 2.682 2.011 3.554.291.2.693.401 1.118.559-1.587-.381-1.788-.604-2.324-1.229 0-.045-.134-.135-.134-.156-.715-.805-1.609-2.19-1.922-3.464-.112-.447-.224-.916-.089-1.363.581-2.101 1.854-2.905 3.128-3.775.313-.225.626-.426.916-.649.715-.559.894-2.012 1.05-2.838-.29 1.006-.603 2.258-1.162 2.659-.29.224-.648.402-.938.604-1.318.894-2.637 1.743-3.24 3.91-.134.56-.044.962.089 1.498.335 1.317 1.229 2.748 1.989 3.597l.134.135c.335.381.76.67 1.274.871a5.945 5.945 0 0 1-1.296-.469c-2.078-1.005-3.463-3.173-3.553-4.939-.179-3.597 1.542-4.647 3.151-5.966.894-.737 2.145-1.095 2.86-2.413.134-.291.224-.916.045-1.587-.067-.224-.402-1.028-.537-1.207l1.989.872c-.044.938-.067 1.698.112 2.391.2.76 1.184 1.854 1.586 3.129.783 2.41.583 5.561.023 8.019z"/>
</svg>
{% elif i == "question-circle" %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-question-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
</svg>
{% elif i == "server" %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-server"
viewBox="0 0 16 16">