-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add compact page layout, add page_layout option
- Loading branch information
Showing
6 changed files
with
58 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{%- if languages %} | ||
{%- for item in languages %} | ||
{%- if item[2] and item[2] != language %} | ||
<link rel="alternate" hreflang="{{ item[2] }}" href="{{ i18n_link(item[1]) }}" /> | ||
{%- endif %} | ||
{%- endfor %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% extends "base.html" %} | ||
|
||
{%- block extrahead -%} | ||
{% include "partials/opengraph.html" %} | ||
{% include "components/alternate-links.html" %} | ||
{%- endblock -%} | ||
|
||
{%- if meta and meta.dark_code == "true" -%} | ||
{% set dark_code = True %} | ||
{%- elif theme_dark_code -%} | ||
{% set dark_code = True %} | ||
{%- else -%} | ||
{% set dark_code = False %} | ||
{%- endif -%} | ||
|
||
{% block body %} | ||
<div class="sy-page sy-container flex mx-auto"> | ||
<aside id="rside" class="sy-rside pb-3 w-64 shrink-0 order-last"> | ||
<button class="rside-close js-menu xl:hidden" aria-label="Close Table of Contents" type="button" aria-controls="rside" aria-expanded="false"> | ||
<i class="i-icon close"></i> | ||
</button> | ||
<div class="sy-scrollbar sy-rside-inner px-6 xl:top-16 xl:sticky xl:pl-0 pt-6 pb-4"> | ||
{%- if sidebars %} | ||
{%- for sidebartemplate in sidebars %} | ||
{%- include sidebartemplate %} | ||
{%- endfor %} | ||
{%- endif %} | ||
</div> | ||
</aside> | ||
<div class="rside-overlay js-menu" role="button" aria-label="Close Table of Contents" aria-controls="rside" aria-expanded="false"></div> | ||
<main class="w-full max-sm:max-w-full print:pt-6"> | ||
{% include "components/breadcrumbs.html" %} | ||
<div class="flex flex-col break-words justify-between"> | ||
<div class="min-w-0 max-w-6xl px-6 pb-6 pt-8 xl:px-12"> | ||
<article class="yue{% if dark_code %} dark-code{% endif %}" role="main"> | ||
{% block content %}{{ body }}{% endblock %} | ||
</article> | ||
{% include "partials/article-bottom.html" %} | ||
{% include "components/navigation.html" %} | ||
{% include "partials/page-bottom.html" %} | ||
</div> | ||
</div> | ||
</main> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{%- if meta and meta.layout == "landing" -%} | ||
{% extends 'layout/landing.html' %} | ||
{%- elif meta and meta.layout == "simple" -%} | ||
{% extends 'layout/simple.html' %} | ||
{%- if meta and meta.layout -%} | ||
{% extends 'layout/' + meta.layout + '.html' %} | ||
{% else %} | ||
{% extends 'layout/default.html' %} | ||
{% extends 'layout/' + theme_page_layout + '.html' %} | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ light_logo = | |
dark_logo = | ||
|
||
# design | ||
page_layout = default | ||
accent_color = violet | ||
dark_code = | ||
|
||
|