From 134b368e212f239fceeb5da503327da3b791cd92 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Thu, 17 Oct 2024 16:49:12 +1100 Subject: [PATCH] Update style --- links/templates/links/search.html | 136 +++++++++++++++++---------- locale/zh_Hans/LC_MESSAGES/django.mo | Bin 3919 -> 3709 bytes locale/zh_Hans/LC_MESSAGES/django.po | 10 +- new_theme/static/css/dist/styles.css | 88 +++++++++++++++++ 4 files changed, 179 insertions(+), 55 deletions(-) diff --git a/links/templates/links/search.html b/links/templates/links/search.html index 2ad813c..7cc4a1b 100644 --- a/links/templates/links/search.html +++ b/links/templates/links/search.html @@ -2,60 +2,94 @@ {% load i18n %} {% block content %} -

{% trans "Advanced Search" %}

+
+

{% trans "Advanced Search" %}

-
-
- - -
-
- -{% if query %} -

{% trans "Search results for" %}: {{ query }}

- - {% if links %} - - - {% if is_paginated %} -
- - {% if page_obj.has_previous %} - « first - previous - {% endif %} - - - Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}. - - - {% if page_obj.has_next %} - next - last » - {% endif %} - +
+
+
+ +
+
- {% endif %} +
+ {% if query %} +

{% trans "Search results for" %}: {{ query }}

+ + {% if links %} +
+ +
+ + {% if is_paginated %} + + {% endif %} + + {% else %} +

{% trans "No results found." %}

+ {% endif %} {% else %} -

{% trans "No results found." %}

+

{% trans "Enter a search query to find links." %}

{% endif %} -{% else %} -

{% trans "Enter a search query to find links." %}

-{% endif %} +
{% endblock %} diff --git a/locale/zh_Hans/LC_MESSAGES/django.mo b/locale/zh_Hans/LC_MESSAGES/django.mo index 8fb704ac2bcd922f259479dfdeb9458c4cfaca81..83d6bcdc49c99aa839d830d727ba408b54c8b2c1 100644 GIT binary patch delta 1063 zcmYk*Pe_wt9Ki8sxIfuuxvgo=KfSeT%yQLXiiPc@ND-duA{|yul4R0cg%Hd{4?@P` z-Eme}J9KHqf)3TXbr8an1>G{86Cw!eAQANaZI96dKR&8(GBatr zQYvUuYBz?_fv3@m16Yq|_4s)V(7%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h%l~WBRmqd*r$&a{s}E-ShgjE{6TfJG%P+OR&aF)x T$XlJ^-P_uno;J~!|2yL!GF#iN diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index 9bed1be..e6e5a24 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -1568,8 +1568,10 @@ msgstr "" #: links/models.py:10 links/templates/links/link_detail.html:13 #: links/templates/links/link_form.html:22 +#, fuzzy +#| msgid "GoLinks" msgid "Link" -msgstr "URL链接" +msgstr "GoLinks" #: links/models.py:11 links/templates/links/link_detail.html:17 #: links/templates/links/link_form.html:25 @@ -1700,7 +1702,7 @@ msgstr "链接类型用于重定向到外部URL。当您想为长URL创建一个 msgid "" "Custom type allows you to create a link with custom HTML content. Use this " "when you want to display a message or custom content instead of redirecting." -msgstr "自定义类型允许您创建带有自定义 HTML 内容的链接。当您想要显示消息或自定义内容而不是重定向时,请使用此选项。" +msgstr "" #: links/templates/links/link_form.html:77 #, fuzzy @@ -1761,7 +1763,7 @@ msgstr "高级搜索" #: links/templates/links/search.html:9 msgid "Enter search query" -msgstr "" +msgstr "请输入关键词" #: links/templates/links/search.html:11 msgid "Search" @@ -1779,7 +1781,7 @@ msgstr "未找到结果。" #: links/templates/links/search.html:59 msgid "Enter a search query to find links." -msgstr "" +msgstr "请输入搜索查询以查找链接。" #: links/templates/links/tools.html:8 templates/base.html:72 msgid "Tools" diff --git a/new_theme/static/css/dist/styles.css b/new_theme/static/css/dist/styles.css index 0cef1d7..dcb48e8 100644 --- a/new_theme/static/css/dist/styles.css +++ b/new_theme/static/css/dist/styles.css @@ -738,6 +738,14 @@ video { margin-top: 2rem; } +.ml-3 { + margin-left: 0.75rem; +} + +.mr-1\.5 { + margin-right: 0.375rem; +} + .block { display: block; } @@ -774,6 +782,10 @@ video { height: 100vh; } +.h-5 { + height: 1.25rem; +} + .w-4 { width: 1rem; } @@ -786,6 +798,10 @@ video { width: 100%; } +.w-5 { + width: 1.25rem; +} + .min-w-full { min-width: 100%; } @@ -814,6 +830,18 @@ video { max-width: 20rem; } +.max-w-7xl { + max-width: 80rem; +} + +.flex-1 { + flex: 1 1 0%; +} + +.flex-shrink-0 { + flex-shrink: 0; +} + .flex-grow { flex-grow: 1; } @@ -1171,6 +1199,11 @@ video { padding-bottom: 1.25rem; } +.py-8 { + padding-top: 2rem; + padding-bottom: 2rem; +} + .pr-3 { padding-right: 0.75rem; } @@ -1217,6 +1250,11 @@ video { line-height: 1rem; } +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + .font-bold { font-weight: 700; } @@ -1451,6 +1489,11 @@ video { background-color: rgb(185 28 28 / var(--tw-bg-opacity)); } +.hover\:bg-gray-50:hover { + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + .hover\:text-blue-700:hover { --tw-text-opacity: 1; color: rgb(29 78 216 / var(--tw-text-opacity)); @@ -1486,6 +1529,16 @@ video { color: rgb(127 29 29 / var(--tw-text-opacity)); } +.hover\:text-blue-800:hover { + --tw-text-opacity: 1; + color: rgb(30 64 175 / var(--tw-text-opacity)); +} + +.hover\:text-indigo-800:hover { + --tw-text-opacity: 1; + color: rgb(55 48 163 / var(--tw-text-opacity)); +} + .hover\:underline:hover { text-decoration-line: underline; } @@ -1504,6 +1557,11 @@ video { border-color: transparent; } +.focus\:border-blue-500:focus { + --tw-border-opacity: 1; + border-color: rgb(59 130 246 / var(--tw-border-opacity)); +} + .focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; @@ -1563,10 +1621,22 @@ video { grid-column: span 2 / span 2; } + .sm\:mt-0 { + margin-top: 0px; + } + + .sm\:block { + display: block; + } + .sm\:inline { display: inline; } + .sm\:flex { + display: flex; + } + .sm\:table-cell { display: table-cell; } @@ -1591,6 +1661,14 @@ video { align-items: center; } + .sm\:justify-end { + justify-content: flex-end; + } + + .sm\:justify-between { + justify-content: space-between; + } + .sm\:space-x-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.5rem * var(--tw-space-x-reverse)); @@ -1603,6 +1681,16 @@ video { margin-bottom: calc(0px * var(--tw-space-y-reverse)); } + .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + + .sm\:rounded-md { + border-radius: 0.375rem; + } + .sm\:p-6 { padding: 1.5rem; }