mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-24 17:26:51 +01:00
200 lines
3.9 KiB
CSS
200 lines
3.9 KiB
CSS
.repo-grid-filelist-sidebar {
|
|
display: grid;
|
|
grid-template-columns: auto 280px;
|
|
grid-template-rows: auto auto 1fr;
|
|
gap: var(--page-spacing);
|
|
}
|
|
|
|
.repo-home-filelist {
|
|
min-width: 0;
|
|
grid-column: 1;
|
|
grid-row: 1 / 4;
|
|
}
|
|
|
|
.repo-home-sidebar-top {
|
|
grid-column: 2;
|
|
grid-row: 1;
|
|
}
|
|
|
|
.repo-home-sidebar-bottom {
|
|
grid-column: 2;
|
|
grid-row: 2;
|
|
}
|
|
|
|
.repo-home-sidebar-bottom .flex-list > :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-home-filelist {
|
|
grid-column: 1;
|
|
grid-row: 2;
|
|
}
|
|
.repo-home-sidebar-top {
|
|
grid-column: 1;
|
|
grid-row: 1;
|
|
padding-left: 0;
|
|
}
|
|
.repo-home-sidebar-bottom {
|
|
grid-column: 1;
|
|
grid-row: 3;
|
|
padding-left: 0;
|
|
}
|
|
.repo-home-sidebar-bottom .flex-list > :first-child {
|
|
border-top: 0;
|
|
}
|
|
}
|
|
|
|
.repo-view-container {
|
|
display: flex;
|
|
gap: var(--page-spacing);
|
|
}
|
|
|
|
.repo-view-file-tree-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 0 0 15%;
|
|
min-width: 0;
|
|
max-height: 100vh;
|
|
position: sticky;
|
|
top: 0;
|
|
bottom: 0;
|
|
height: 100%;
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
@media (max-width: 767.98px) {
|
|
.repo-view-file-tree-container {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.repo-view-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
transition: margin-right 0.2s ease;
|
|
}
|
|
|
|
/* When sidebar is visible, reserve space on the right (only for file view, not home page) */
|
|
.repo-view-content.sidebar-visible {
|
|
margin-right: 270px;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
/* File view sidebar panel (e.g., TOC for markdown files) */
|
|
.file-view-sidebar {
|
|
position: fixed;
|
|
top: 120px; /* Will be adjusted by JS to align with file content */
|
|
right: 0.5rem;
|
|
width: 260px;
|
|
max-height: calc(100vh - 140px);
|
|
overflow-y: auto;
|
|
padding: 0.75rem;
|
|
background: var(--color-box-body);
|
|
border: 1px solid var(--color-secondary);
|
|
border-radius: var(--border-radius);
|
|
z-index: 50;
|
|
opacity: 0; /* Hidden until JS positions it */
|
|
transition: opacity 0.15s ease;
|
|
}
|
|
|
|
/* Show sidebar after JS has positioned it */
|
|
.file-view-sidebar.sidebar-positioned {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Hidden state - using custom class to avoid Tailwind conflicts */
|
|
.file-view-sidebar.sidebar-panel-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.file-view-sidebar details {
|
|
font-size: 13px;
|
|
}
|
|
|
|
.file-view-sidebar summary {
|
|
font-weight: var(--font-weight-semibold);
|
|
cursor: pointer;
|
|
padding: 8px 0;
|
|
color: var(--color-text);
|
|
border-bottom: 1px solid var(--color-secondary);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.file-view-sidebar ul {
|
|
margin: 0;
|
|
list-style: none;
|
|
padding: 5px 0 5px 1em;
|
|
}
|
|
|
|
.file-view-sidebar ul ul {
|
|
border-left: 1px dashed var(--color-secondary);
|
|
}
|
|
|
|
.file-view-sidebar a {
|
|
display: block;
|
|
padding: 6px 10px;
|
|
color: var(--color-text);
|
|
text-decoration: none;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
border-radius: var(--border-radius);
|
|
}
|
|
|
|
.file-view-sidebar a:hover {
|
|
color: var(--color-primary);
|
|
background: var(--color-hover);
|
|
}
|
|
|
|
/* Sidebar toggle button active state - when sidebar is visible */
|
|
#toggle-sidebar-btn.active {
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
/* Hide sidebar on small screens (phones) */
|
|
@media (max-width: 768px) {
|
|
.file-view-sidebar {
|
|
display: none !important;
|
|
}
|
|
|
|
#toggle-sidebar-btn {
|
|
display: none;
|
|
}
|
|
|
|
/* Don't reserve space for sidebar on small screens */
|
|
.repo-view-content.sidebar-visible {
|
|
margin-right: 0;
|
|
}
|
|
}
|