2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-06-14 19:25:37 +00:00

Merge pull request #190 from inventree/404-fix-2

404 fix 2

(cherry picked from commit ee445a8ef6)
This commit is contained in:
Oliver
2021-10-11 20:50:09 +11:00
parent 1a35e2caf0
commit f26eb40910
7 changed files with 70 additions and 42 deletions

View File

@ -1,36 +1,30 @@
{% if 'readthedocs.org' in config.docs_dir %}
{% set assets = '/en/latest/assets' %}
{% else %}
{% set assets = '/assets' %}
{% endif %}
{% if 'http' in url %}
{% set doc_url = url %}
{% set img_url = url %}
{% else %}
{% set doc_url = assets + '/images/' + url %}
{% set img_url = config.assets_dir + '/images/' + url %}
{% endif %}
<figure class='image image-inventree'>
{% if id %}
<!-- The link that, when clicked, will display the image in full screen -->
<a href="#{{ id }}">
{% elif doc_url %}
<a href="{{ doc_url }}">
{% elif img_url %}
<a href="{{ img_url }}">
{% endif %}
<img class='img-inline' src='{{ doc_url }}' alt='{{ description }}' title='{{ description }}'
<img class='img-inline' src='{{ img_url }}' alt='{{ description }}' title='{{ description }}'
{% if maxwidth or maxheight %}style='
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
'{% endif %}
>
{% if id or doc_url %}
{% if id or img_url %}
</a>
{% endif %}
{% if id %}
<!-- The full screen image, hidden by default -->
<a href="#_" class="overlay" id="{{ id }}">
<img src="{{ doc_url }}" alt="{{ description }}" />
<img src="{{ img_url }}" alt="{{ description }}" />
</a>
{% endif %}
</figure>

View File

@ -1,7 +1,29 @@
{% extends "main.html" %}
{% extends "base.html" %}
{% block tabs %}
{{ super() }}
{% endblock %}
{% block site_nav %}
{% endblock %}
{% block content %}
<h1>
<span class="twemoji">{% include ".icons/fontawesome/regular/sad-tear.svg" %}</span>
Uh oh - Page not found...
</h1>
<style>
h1 {
font-family: Arial, Helvetica, sans-serif;
display: block;
}
</style>
<section class="mdx-container">
<div class="md-grid md-typeset">
<div class="mdx-hero"></div>
<h1>
<span class='fas fa-search'></span>
Page not found
</h1>
</div>
</section>
{% endblock %}

View File

@ -23,10 +23,10 @@
<!-- Hero content -->
<div class="mdx-hero__content">
<a href="features" title="InvenTree features" class="md-button md-button">
Features
<span class='fas fa-star'></span> Features
</a>
<a href="start/intro" title="Install InvenTree" class="md-button md-button">
Install
<span class='fas fa-server'></span> Install
</a>
<a href="https://github.com/inventree/inventree" title="Explore InvenTree source code" class="md-button md-button">
<span class='fab fa-github'></span> Source Code

View File

@ -1,13 +1,8 @@
{% if 'readthedocs.org' in config.docs_dir %}
{% set assets = '/en/latest/assets' %}
{% else %}
{% set assets = '/assets' %}
{% endif %}
{% if 'http' in src %}
{% set img_url = src %}
{% else %}
{% set img_url = assets + '/images/' + src %}
{% set img_url = config.assets_dir + '/images/' + src %}
{% endif %}
<li class='splide__slide'>