diff options
| author | Mole Shang <135e2@135e2.dev> | 2023-03-26 23:30:21 +0800 | 
|---|---|---|
| committer | Mole Shang <135e2@135e2.dev> | 2023-04-16 21:51:12 +0800 | 
| commit | 9ac91dbeffeb73aa4161c0ffb9801007de763e34 (patch) | |
| tree | 22d317ddc122878f3a2b6fbf3bb46b963bb21688 /templates | |
| parent | a5b49171284c8a35ec5c6696ee9937662827ef57 (diff) | |
| download | Seje2-9ac91dbeffeb73aa4161c0ffb9801007de763e34.tar.gz Seje2-9ac91dbeffeb73aa4161c0ffb9801007de763e34.tar.bz2 Seje2-9ac91dbeffeb73aa4161c0ffb9801007de763e34.zip | |
templates/404: new
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/404.html | 12 | ||||
| -rw-r--r-- | templates/navbar.html | 4 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/templates/404.html b/templates/404.html index e69de29..4c485a9 100644 --- a/templates/404.html +++ b/templates/404.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +<article class="post"> +    <div class="post-title"> +        <h1 class="title">404 Page</h1> +    </div> +    <div class="post-content"> +        HTTP Error 404: 页面未找到。  +    </div> +</article> +{% endblock %} diff --git a/templates/navbar.html b/templates/navbar.html index 75c5bbf..07abdb9 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -5,12 +5,16 @@          <li class="menu-item">              {% set url_inner = item['url'] | replace(from="$BASE_URL", to="") %}              {% set url = url_inner ~ '/'%} +            {% if page.path or section.path %}              {% set path = page.path|default(value = section.path) %}              {% if url == path or url_inner == path %}              <a href="{{ item['url'] | replace(from="$BASE_URL", to=config.base_url) }}" class="current-menu-item-link">{{ trans(key=item['name']) }}</a>              {% else %}              <a href="{{ item['url'] | replace(from="$BASE_URL", to=config.base_url) }}" class="menu-item-link">{{ trans(key=item['name']) }}</a>              {% endif %} +            {% else %} +            <a href="{{ item['url'] | replace(from="$BASE_URL", to=config.base_url) }}" class="menu-item-link">{{ trans(key=item['name']) }}</a> +            {% endif %}          </li>          {% endfor %}      </ul> | 
