chore: refactor layout (#1888)

Refactor layouts for unified version handling
This commit is contained in:
shubham oulkar
2025-04-27 22:41:14 +05:30
committed by GitHub
parent 100dc75ebf
commit 20a6669eb7
72 changed files with 155 additions and 201 deletions

View File

@@ -0,0 +1,9 @@
<a role="button" class="edit-github-btn"
href="{% if page.layout == 'api' %}
{{ site.github.repository_url }}/tree/gh-pages/_includes/api/en/{{page.version}}
{% else %}
{{ site.github.repository_url }}/edit/gh-pages/{{ page.path }}
{% endif %}">
{% include icons/github.svg %}
Edit this page
</a>

View File

@@ -0,0 +1,10 @@
<svg
viewBox="0 0 256 250"
width="20"
height="20"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid"
>
<path
d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46 6.397 1.185 8.746-2.777 8.746-6.158 0-3.052-.12-13.135-.174-23.83-35.61 7.742-43.124-15.103-43.124-15.103-5.823-14.795-14.213-18.73-14.213-18.73-11.613-7.944.876-7.78.876-7.78 12.853.902 19.621 13.19 19.621 13.19 11.417 19.568 29.945 13.911 37.249 10.64 1.149-8.272 4.466-13.92 8.127-17.116-28.431-3.236-58.318-14.212-58.318-63.258 0-13.975 5-25.394 13.188-34.358-1.329-3.224-5.71-16.242 1.24-33.874 0 0 10.749-3.44 35.21 13.121 10.21-2.836 21.16-4.258 32.038-4.307 10.878.049 21.837 1.47 32.066 4.307 24.431-16.56 35.165-13.12 35.165-13.12 6.967 17.63 2.584 30.65 1.255 33.873 8.207 8.964 13.173 20.383 13.173 34.358 0 49.163-29.944 59.988-58.447 63.157 4.591 3.972 8.682 11.762 8.682 23.704 0 17.126-.148 30.91-.148 35.126 0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002 256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39-.929-.417-1.45-1.284-1.15-1.922.276-.655 1.279-.838 2.205-.399.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591-.837-.892-.994-2.086-.375-2.66.63-.566 1.787-.301 2.626.591.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104-.784-1.138-.784-2.503.017-3.05.795-.547 2.058-.055 2.861 1.075.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49-1.119-1.032-1.43-2.496-.726-3.27.71-.776 2.213-.558 3.315.49 1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033-1.448-.439-2.395-1.613-2.103-2.626.301-1.01 1.747-1.484 3.207-1.028 1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95-1.53.034-2.769-.82-2.786-1.86 0-1.065 1.202-1.932 2.733-1.958 1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37-1.485.271-2.861-.365-3.05-1.386-.184-1.056.893-2.114 2.376-2.387 1.514-.263 2.868.356 3.061 1.403Z" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="{{ page.lang }}">
{% include head.html %}
<body>
{% include header.html %}
<div id="overlay"></div>
<div class="content">
<nav aria-labelledby="sidebar-heading">
<div class="toc-container">
<h3 id="sidebar-heading" class="toc-heading"><em>On this page</em></h3>
{% include api/en/4x/menu.md %}
</div>
</nav>
<main>
{{ content }}
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/4x" aria-label="GitHub button">
<span class="hidden-dark">
{% include icons/github-light.svg %}
</span>
<span class="hidden-light">
{% include icons/github-dark.svg %}
</span>
Edit this page</a>
</main>
</div>
{% include footer.html %}
</body>
</html>

View File

@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="{{ page.lang }}">
{% include head.html %}
<body>
{% include header.html %}
<div id="overlay"></div>
<div class="content">
<nav aria-labelledby="sidebar-heading">
<div class="toc-container">
<h3 id="sidebar-heading" class="toc-heading"><em>On this page</em></h3>
{% include api/en/5x/menu.md %}
</div>
</nav>
<main>
{{ content }}
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/5x" aria-label="GitHub button">
<span class="hidden-dark">
{% include icons/github-light.svg %}
</span>
<span class="hidden-light">
{% include icons/github-dark.svg %}
</span>
Edit this page</a>
</main>
</div>
{% include footer.html %}
</body>
</html>

View File

@@ -11,19 +11,12 @@
<nav aria-labelledby="sidebar-heading">
<div class="toc-container">
<h3 id="sidebar-heading" class="toc-heading"><em>On this page</em></h3>
{% include api/en/3x/menu.md %}
{% include api/en/{{page.version}}/menu.md %}
</div>
</nav>
<main>
{{ content }}
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/tree/gh-pages/_includes/{{page.menu}}/en/3x" aria-label="GitHub button">
<span class="hidden-dark">
{% include icons/github-light.svg %}
</span>
<span class="hidden-light">
{% include icons/github-dark.svg %}
</span>
Edit this page</a>
{% include github-edit-btn.html %}
</main>
</div>

View File

@@ -28,14 +28,7 @@
<div class="content">
<main>
{{ content }}
<a role="button" class="edit-github-btn" href="{{ site.github.repository_url }}/edit/gh-pages/{{ page.path }}" aria-label="GitHub button">
<span class="hidden-dark">
{% include icons/github-light.svg %}
</span>
<span class="hidden-light">
{% include icons/github-dark.svg %}
</span>
Edit this page</a>
{% include github-edit-btn.html %}
</main>
</div>
{% endif %}

View File

@@ -27,6 +27,7 @@
<div class="blog-date">{{page.date| date: "%d %b %Y" }}</div>
</div>
{{ content }}
{% include github-edit-btn.html %}
</main>
</div>

View File

@@ -681,15 +681,15 @@ a.edit-github-btn{
padding: 0.5rem;
border-radius: 0.3rem;
span {
height: 20px;
}
&:is(:hover, :active, :focus) {
color: var(--fg);
background-color: var(--hover-bg);
outline: 1px solid var(--card-fg);
}
> svg {
fill : var(--card-fg)
}
}
#mobile-menu {

View File

@@ -1,8 +1,8 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API Reference
description: Access the API reference for Express.js version 3.x, noting that this version is end-of-life and no longer maintained - includes details on modules and methods.
menu: api
lang: en
redirect_from: "/3x/api.html"
---

View File

@@ -1,8 +1,8 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Reference
description: Access the API reference for Express.js 4.x, detailing all modules, methods, and properties for building web applications with this version.
menu: api
lang: en
redirect_from: "/4x/api.html"
---

View File

@@ -1,8 +1,8 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API Reference
description: Access the API reference for Express.js 5.x, detailing all modules, methods, and properties for building web applications with this latest version.
menu: api
lang: en
redirect_from: "/5x/api.html"
---

View File

@@ -1,5 +1,6 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API Reference
description: Access the API reference for Express.js detailing all modules, methods, and properties for building web applications with this version.
lang: en

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Referencia de API
menu: api
lang: es
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referencia de API
menu: api
lang: es
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Referencia de API
menu: api
lang: es
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referencia de API
lang: es
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Référence de l'API
menu: api
lang: fr
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Référence de l'API
menu: api
lang: fr
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Référence de l'API
menu: api
lang: fr
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Référence de l'API
lang: fr
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Referensi API
menu: api
lang: id
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referensi API
menu: api
lang: id
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Referensi API
menu: api
lang: id
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referensi API
lang: id
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Riferimento API
menu: api
lang: it
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Riferimento API
menu: api
lang: it
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Riferimento API
menu: api
lang: it
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 5x
title: Express 4.x - Riferimento API
lang: it
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API リファレンス
menu: api
lang: ja
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 5x
title: Express 4.x - API リファレンス
menu: api
lang: ja
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API リファレンス
menu: api
lang: ja
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API リファレンス
lang: ja
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API 참조
menu: api
lang: ko
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 참조
menu: api
lang: ko
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API 참조
menu: api
lang: ko
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 참조
lang: ko
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API Reference
menu: api
lang: pt-br
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referência da API
menu: api
lang: pt-br
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Referência da API
menu: api
lang: pt-br
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Referência de API
lang: pt-br
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Справочник по API
menu: api
lang: ru
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Справочник по API
menu: api
lang: ru
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Справочник по API
menu: api
lang: ru
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 5x
title: Express 4.x - Справочник API
lang: ru
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API
menu: api
lang: sk
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API
menu: api
lang: sk
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API
menu: api
lang: sk
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API
lang: sk
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API Reference
menu: api
lang: th
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Reference
menu: api
lang: th
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API Reference
menu: api
lang: th
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - การอ้างอิง API
lang: th
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API Kaynak
menu: api
lang: tr
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Kaynak
menu: api
lang: tr
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API Kaynak
menu: api
lang: tr
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Reference
lang: tr
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - Довідник API
menu: api
lang: uk
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - Довідник API
menu: api
lang: uk
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - Довідник API
menu: api
lang: uk
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Reference
lang: uk
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API Reference
menu: api
lang: uz
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Reference
menu: api
lang: uz
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API Reference
menu: api
lang: uz
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API Qo'llanma
lang: uz
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API 参考
menu: api
lang: zh-cn
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 参考
menu: api
lang: zh-cn
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API 参考
menu: api
lang: zh-cn
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 参考
lang: zh-cn
description: Access the API reference for Express.js detailing all modules, methods,

View File

@@ -1,7 +1,7 @@
---
layout: 3x-api
layout: api
version: 3x
title: Express 3.x - API 參照
menu: api
lang: zh-tw
description: Access the API reference for Express.js version 3.x, noting that this
version is end-of-life and no longer maintained - includes details on modules and

View File

@@ -1,7 +1,7 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 參照
menu: api
lang: zh-tw
description: Access the API reference for Express.js 4.x, detailing all modules, methods,
and properties for building web applications with this version.

View File

@@ -1,7 +1,7 @@
---
layout: 5x-api
layout: api
version: 5x
title: Express 5.x - API 參照
menu: api
lang: zh-tw
description: Access the API reference for Express.js 5.x, detailing all modules, methods,
and properties for building web applications with this latest version.

View File

@@ -1,5 +1,6 @@
---
layout: 4x-api
layout: api
version: 4x
title: Express 4.x - API 參照
lang: zh-tw
description: Access the API reference for Express.js detailing all modules, methods,