From 40605820b5347b3df627b07824fe77c9bd404dc3 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Fri, 4 Oct 2024 02:03:13 +0800 Subject: [PATCH] refactor: RWD optimization --- assets/styles/app.scss | 14 +++++++++++--- templates/overview/index.html.twig | 16 ++++++++-------- templates/profile/index.html.twig | 6 +++--- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/assets/styles/app.scss b/assets/styles/app.scss index d180fb1..4a60c1f 100644 --- a/assets/styles/app.scss +++ b/assets/styles/app.scss @@ -328,9 +328,17 @@ ul.credit { display: grid; gap: 3rem; grid-template: - "hello-text hello-text hello-text hello-text" auto - "weekly-metrics weekly-metrics leaderboard leaderboard" 1fr - "historic-statistics historic-statistics leaderboard leaderboard" 1fr; + "hello-text" auto + "weekly-metrics" auto + "historic-statistics" auto + "leaderboard" auto; + + @media (min-width: 768px) { + grid-template: + "hello-text hello-text hello-text hello-text" auto + "weekly-metrics weekly-metrics leaderboard leaderboard" 1fr + "historic-statistics historic-statistics leaderboard leaderboard" 1fr; + } &__hello-text { grid-area: hello-text; diff --git a/templates/overview/index.html.twig b/templates/overview/index.html.twig index d0d7ce3..f67fc1f 100644 --- a/templates/overview/index.html.twig +++ b/templates/overview/index.html.twig @@ -13,15 +13,15 @@

每週學習概況

-
-
-
+
+
+
-
+
@@ -30,15 +30,15 @@

學習歷程

-
-
-
+
+
+
-
+
diff --git a/templates/profile/index.html.twig b/templates/profile/index.html.twig index ba73f51..4809fd2 100644 --- a/templates/profile/index.html.twig +++ b/templates/profile/index.html.twig @@ -4,8 +4,8 @@ {% block title %}個人資料{% endblock %} {% block app %} -
- +
+

{{ user.name }} @@ -47,7 +47,7 @@ -
+

更新帳號資訊