mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-10-14 06:21:09 +00:00
fix: resolve CLS issues in page layout (#209)
Signed-off-by: Ryan Wang <i@ryanc.cc>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = '归档 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')}"
|
||||
th:replace="~{modules/layout :: html(title = '归档 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = '')}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4 dark:bg-slate-800">
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = '链接 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')}"
|
||||
th:replace="~{modules/layout :: html(title = '链接 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = '')}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4 dark:bg-slate-800">
|
||||
|
@@ -23,8 +23,11 @@
|
||||
<th:block th:unless="${hero != null}">
|
||||
<th:block th:replace="~{modules/hero :: hero(isHome = true, cover = null, title = null)}" />
|
||||
</th:block>
|
||||
<section class="mx-auto mt-6 flex max-w-7xl gap-6 px-4 lg:px-6" th:classappend="${contentClass}">
|
||||
<div class="z-0 min-w-0 flex-1 shrink">
|
||||
<section
|
||||
class="mx-auto mt-6 grid max-w-7xl grid-cols-1 gap-6 px-4 md:grid-cols-[1fr_18rem] lg:px-6"
|
||||
th:classappend="${contentClass}"
|
||||
>
|
||||
<div class="z-0 min-w-0">
|
||||
<th:block th:replace="${content}" />
|
||||
</div>
|
||||
<th:block th:if="${sidebar != null}">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<aside th:fragment="sidebar (prepend)" class="z-0 hidden w-72 flex-none flex-col gap-6 md:flex">
|
||||
<aside th:fragment="sidebar (prepend)" class="z-0 hidden w-72 flex-col gap-6 md:flex">
|
||||
<th:block th:with="widgets = ${theme.config.sidebar.widgets} ">
|
||||
<th:block th:if="${prepend != null}">
|
||||
<th:block th:replace="${prepend}" />
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = '瞬间 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')}"
|
||||
th:replace="~{modules/layout :: html(title = '瞬间 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = '')}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4 dark:bg-slate-800">
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html
|
||||
xmlns:th="https://www.thymeleaf.org"
|
||||
th:replace="~{modules/layout :: html(title = '图库 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = ~{::sidebar}, contentClass = '')}"
|
||||
th:replace="~{modules/layout :: html(title = '图库 - ' + ${site.title}, hero = null, content = ~{::content}, head = null, footer = null, sidebar = null, contentClass = '')}"
|
||||
>
|
||||
<th:block th:fragment="content">
|
||||
<div class="rounded-xl bg-white p-4 dark:bg-slate-800">
|
||||
|
Reference in New Issue
Block a user