diff options
author | yp05327 <576951401@qq.com> | 2024-12-06 23:29:04 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 14:29:04 +0000 |
commit | faf5705d29bcfc08e6d7d75cd9694ee859ee7e58 (patch) | |
tree | ab8cb642bf8c77ad21eb9defc6757a711743f4cf /web_src/css/repo | |
parent | 3c4a06273f776df340459c3775d90eb8d20b71e5 (diff) | |
download | gitea-faf5705d29bcfc08e6d7d75cd9694ee859ee7e58.tar.gz gitea-faf5705d29bcfc08e6d7d75cd9694ee859ee7e58.zip |
GitHub like repo home page (#32213)
Move some components (description, license, release, language stats) to sidebar
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/css/repo')
-rw-r--r-- | web_src/css/repo/home.css | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/web_src/css/repo/home.css b/web_src/css/repo/home.css new file mode 100644 index 0000000000..fd8fac27e2 --- /dev/null +++ b/web_src/css/repo/home.css @@ -0,0 +1,77 @@ +.repo-grid-filelist-sidebar { + display: grid; + grid-template-columns: auto 300px; + grid-template-rows: auto auto 1fr; +} + +.repo-grid-filelist-sidebar .repo-home-filelist { + min-width: 0; + grid-column: 1; + grid-row: 1 / 4; +} + +.repo-grid-filelist-sidebar .repo-home-sidebar-top { + grid-column: 2; + grid-row: 1; + padding-left: 1em; +} +.repo-grid-filelist-sidebar .repo-home-sidebar-bottom { + grid-column: 2; + grid-row: 2; + padding-left: 1em; +} +.repo-home-sidebar-bottom > :first-child { + border-top: 1px solid var(--color-secondary); /* same to .flex-list > .flex-item + .flex-item */ +} + +@media (max-width: 767.98px) { + .repo-grid-filelist-sidebar { + grid-template-columns: 100%; + grid-template-rows: auto auto auto; + } + .repo-grid-filelist-sidebar .repo-home-filelist { + grid-column: 1; + grid-row: 2; + } + .repo-grid-filelist-sidebar .repo-home-sidebar-top { + grid-column: 1; + grid-row: 1; + padding-left: 0; + } + .repo-grid-filelist-sidebar .repo-home-sidebar-bottom { + grid-column: 1; + grid-row: 3; + padding-left: 0; + } + .repo-home-sidebar-bottom > :first-child { + border-top: 0; + } +} + +.language-stats { + display: flex; + gap: 2px; + padding: 0; + height: 10px; + white-space: nowrap; + border-radius: 5px; + overflow: hidden; + width: 100%; + margin-top: 1rem; + margin-bottom: 5px; +} + +.language-stats-details { + display: flex; + flex-wrap: wrap; +} + +.language-stats-details .item { + height: 30px; + display: flex; + align-items: center; + justify-content: center; + gap: 0.25em; + padding: 0 0.5em; /* make the UI look better for narrow (mobile) view */ + text-decoration: none; +} |