You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1202 lines
22 KiB

/* Repository Page Styles */
.container {
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.repo-metadata-section {
padding: 0.75rem 1rem;
background: var(--card-bg, #ffffff);
border-bottom: 1px solid var(--border-color, #e0e0e0);
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: center;
font-size: 0.875rem;
width: 100%;
max-width: 100%;
overflow: hidden;
box-sizing: border-box;
}
@media (min-width: 768px) {
.repo-metadata-section {
padding: 1rem 1.5rem;
}
}
.repo-banner {
width: 100%;
height: 200px;
overflow: hidden;
background: var(--bg-secondary);
margin-bottom: 0;
position: relative;
display: none;
}
.desktop-only {
display: none;
}
@media (min-width: 768px) {
.desktop-only {
display: block;
}
.repo-banner {
display: block;
}
}
.repo-banner img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.repo-view {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.repo-layout {
flex: 1;
display: flex;
overflow: hidden;
}
.file-tree {
width: 300px;
min-width: 300px;
max-width: 300px;
border-right: 1px solid var(--border-color);
background: var(--bg-secondary);
display: flex;
flex-direction: column;
overflow: hidden;
flex: 0 0 300px;
min-height: 0;
}
.file-tree-header {
padding: 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: flex-start;
align-items: center;
gap: 0.75rem;
flex-wrap: nowrap;
flex-shrink: 0;
position: relative;
overflow: visible;
z-index: 1;
}
.file-tree-header h2 {
margin: 0;
display: flex;
align-items: center;
gap: 0.5rem;
white-space: nowrap;
flex-shrink: 0;
}
.file-list {
list-style: none;
padding: 0.5rem 0;
margin: 0;
overflow-y: auto;
overflow-x: hidden;
flex: 1;
min-height: 0;
width: 100%;
}
.file-item {
margin: 0;
}
.file-button {
width: 100%;
padding: 0.5rem 1rem;
text-align: left;
background: none;
border: none;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
color: var(--text-primary);
font-weight: 500;
transition: background 0.2s ease;
box-sizing: border-box;
}
.file-button:hover {
background: var(--bg-tertiary);
}
.file-item.selected .file-button {
background: var(--accent);
color: var(--accent-text, #ffffff);
font-weight: 600;
}
.file-size {
color: var(--text-secondary);
font-size: 0.75rem;
margin-left: auto;
opacity: 0.9;
}
.editor-area {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--card-bg);
}
.editor-header {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.file-path {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.875rem;
color: var(--text-primary);
}
.editor-actions {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.save-button {
padding: 0.5rem 1rem;
background: var(--button-primary);
color: var(--accent-text, #ffffff);
border: none;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s ease;
}
.save-button:hover:not(:disabled) {
background: var(--button-primary-hover);
}
.save-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.editor-container {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
min-height: 0;
}
.read-only-editor {
flex: 1;
overflow-y: auto;
overflow-x: auto;
padding: 1.5rem;
min-height: 0;
background: var(--card-bg);
font-family: 'IBM Plex Mono', monospace;
font-size: 0.875rem;
line-height: 1.5;
color: var(--text-primary);
position: relative;
contain: layout style;
}
/* Word wrap toggle - override all overflow and white-space properties */
.read-only-editor.word-wrap {
overflow-x: hidden !important;
}
/* Target all pre elements inside word-wrap container */
.read-only-editor.word-wrap :global(pre) {
white-space: pre-wrap !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !important;
max-width: 100% !important;
}
/* Target all code elements inside pre */
.read-only-editor.word-wrap :global(pre code) {
white-space: pre-wrap !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !important;
display: block !important;
max-width: 100% !important;
}
/* Specifically target .hljs class with higher specificity */
.read-only-editor.word-wrap :global(pre code.hljs),
.read-only-editor.word-wrap :global(code.hljs),
.read-only-editor.word-wrap :global(.hljs) {
white-space: pre-wrap !important;
word-wrap: break-word !important;
overflow-wrap: break-word !important;
overflow-x: hidden !important;
overflow-y: visible !important;
display: block !important;
max-width: 100% !important;
}
/* Target all nested elements inside hljs code blocks */
.read-only-editor.word-wrap :global(pre code.hljs *),
.read-only-editor.word-wrap :global(pre code.hljs span),
.read-only-editor.word-wrap :global(pre code.hljs > *),
.read-only-editor.word-wrap :global(code.hljs *),
.read-only-editor.word-wrap :global(.hljs *) {
white-space: pre-wrap !important;
}
.read-only-editor > * {
position: relative;
z-index: 0;
}
/* Ensure the HTML content wrapper doesn't cause overlap */
.read-only-editor :global(> pre:first-child) {
margin-top: 0 !important;
}
.read-only-editor :global(> pre:last-child) {
margin-bottom: 0 !important;
}
/* File viewer code blocks - unified styling, let .hljs handle everything */
.read-only-editor :global(pre) {
margin: 0;
padding: 0;
background: transparent;
border: none;
overflow: visible;
}
.read-only-editor :global(pre + pre) {
margin-top: 1rem;
}
/* Code blocks use unified .hljs styling from app.css - no overrides needed */
.loading {
padding: 2rem;
text-align: center;
color: var(--text-muted);
flex: 1;
overflow-y: auto;
}
.error {
background: var(--error-bg);
color: var(--error-text);
padding: 1rem;
margin: 1rem;
border-radius: 0.5rem;
border: 1px solid var(--error-text);
}
.readme-section {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.readme-header {
padding: 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.readme-header h3 {
margin: 0;
font-size: 1.25rem;
color: var(--text-primary);
}
.readme-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 1.5rem;
min-height: 0;
}
/* Markdown README styling - proper line-height for readability */
/* Only apply to .readme-content.markdown, not to .read-only-editor */
.readme-content.markdown {
line-height: 1.6;
font-size: 1rem;
color: var(--text-primary);
font-family: inherit;
}
.readme-content.markdown :global(p) {
margin: 0 0 1rem 0;
line-height: 1.6;
}
.readme-content.markdown :global(h1),
.readme-content.markdown :global(h2),
.readme-content.markdown :global(h3),
.readme-content.markdown :global(h4),
.readme-content.markdown :global(h5),
.readme-content.markdown :global(h6) {
margin-top: 1.5rem;
margin-bottom: 0.75rem;
color: var(--text-primary);
line-height: 1.4;
font-weight: 600;
}
.readme-content.markdown :global(h1:first-child),
.readme-content.markdown :global(h2:first-child),
.readme-content.markdown :global(h3:first-child) {
margin-top: 0;
}
.readme-content.markdown :global(h1) {
font-size: 2rem;
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.readme-content.markdown :global(h2) {
font-size: 1.5rem;
}
.readme-content.markdown :global(h3) {
font-size: 1.25rem;
}
.readme-content.markdown :global(ul),
.readme-content.markdown :global(ol) {
margin: 1rem 0;
padding-left: 2rem;
line-height: 1.6;
}
.readme-content.markdown :global(li) {
margin: 0.5rem 0;
line-height: 1.6;
}
/* Inline code in markdown README - uses app.css code:not(pre code) styling */
/* Code blocks in markdown README - unified styling, let .hljs handle everything */
.readme-content.markdown :global(pre) {
margin: 0 0 1rem 0;
padding: 0;
background: transparent;
border: none;
overflow: visible;
}
.readme-content.markdown :global(pre:last-child) {
margin-bottom: 0;
}
/* Code blocks use unified .hljs styling from app.css */
.readme-content.markdown :global(blockquote) {
border-left: 4px solid var(--border-color);
padding-left: 1rem;
margin: 1rem 0;
color: var(--text-secondary);
font-style: italic;
}
.readme-content.markdown :global(a) {
color: var(--accent);
text-decoration: none;
}
.readme-content.markdown :global(a:hover) {
text-decoration: underline;
}
.readme-content.markdown :global(img) {
max-width: 100%;
height: auto;
border-radius: 4px;
margin: 1rem 0;
}
/* Tables in markdown README only */
.readme-content.markdown :global(table) {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.readme-content.markdown :global(table th),
.readme-content.markdown :global(table td) {
border: 1px solid var(--border-color);
padding: 0.5rem;
text-align: left;
}
.readme-content.markdown :global(table th) {
background: var(--bg-secondary);
font-weight: 600;
}
.readme-content.markdown :global(hr) {
border: none;
border-top: 1px solid var(--border-color);
margin: 2rem 0;
}
/* Mobile responsive */
@media (max-width: 768px) {
.repo-layout {
flex-direction: column;
position: relative;
width: 100%;
height: 100%;
min-height: 0;
}
.file-tree,
.issues-sidebar,
.prs-sidebar,
.patches-sidebar,
.discussions-sidebar,
.docs-sidebar,
.history-sidebar,
.tags-sidebar {
width: 100% !important;
max-width: 100% !important;
height: 100%;
flex: 1 1 100%;
min-height: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
box-sizing: border-box;
}
.issues-header,
.prs-header,
.patches-header,
.discussions-header,
.docs-header,
.history-header,
.tags-header,
.file-tree-header {
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.editor-area {
width: 100%;
height: 100%;
flex: 1 1 100%;
min-height: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.file-tree.hide-on-mobile {
display: none !important;
}
.editor-area.hide-on-mobile {
display: none !important;
}
.issues-sidebar.hide-on-mobile,
.prs-sidebar.hide-on-mobile,
.patches-sidebar.hide-on-mobile,
.discussions-sidebar.hide-on-mobile,
.docs-sidebar.hide-on-mobile,
.history-sidebar.hide-on-mobile,
.tags-sidebar.hide-on-mobile {
display: none !important;
}
.issues-content.hide-on-mobile,
.prs-content.hide-on-mobile,
.patches-content.hide-on-mobile,
.discussions-content.hide-on-mobile,
.docs-content.hide-on-mobile {
display: none !important;
}
.mobile-toggle-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 4px;
cursor: pointer;
width: 2rem;
height: 2rem;
flex-shrink: 0;
}
.mobile-toggle-button:hover {
background: var(--bg-hover);
}
.mobile-toggle-button .icon-inline {
width: 18px;
height: 18px;
}
.mobile-toggle-left {
transform: rotate(180deg);
}
.content-header-mobile {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
display: flex !important;
align-items: center;
background: var(--bg-secondary);
position: sticky;
top: 0;
z-index: 10;
width: 100%;
box-sizing: border-box;
}
.editor-header {
flex-wrap: wrap;
gap: 0.5rem;
}
.file-path {
flex: 1;
min-width: 0;
word-break: break-all;
}
.editor-actions {
width: 100%;
justify-content: flex-start;
}
.non-maintainer-notice {
width: 100%;
order: 1;
margin-top: 0.25rem;
}
}
@media (min-width: 769px) {
.content-header-mobile {
display: none;
}
}
@media (min-width: 769px) {
.file-tree.hide-on-mobile {
display: flex;
}
.editor-area.hide-on-mobile {
display: flex;
}
.mobile-toggle-button {
display: none;
}
}
/* Additional utility classes */
.fork-badge {
padding: 0.25rem 0.5rem;
background: var(--accent);
color: var(--accent-text, #ffffff);
border-radius: 4px;
font-size: 0.85rem;
margin-left: 0.5rem;
font-weight: 600;
}
.repo-language {
display: inline-flex;
align-items: center;
gap: 0.25rem;
font-size: 0.875rem;
color: var(--text-secondary);
}
.repo-header .repo-topics {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
.repo-header .topic-tag {
padding: 0.25rem 0.5rem;
background: var(--accent);
color: var(--accent-text, #ffffff);
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 600;
}
.repo-clone-urls {
margin-top: 0.5rem;
font-size: 0.75rem;
}
.clone-label-button {
display: flex;
align-items: center;
gap: 0.5rem;
background: transparent;
border: none;
padding: 0;
cursor: pointer;
width: 100%;
text-align: left;
margin-bottom: 0.5rem;
}
.clone-label-button:hover {
opacity: 0.8;
}
.clone-label {
font-weight: 500;
color: var(--text-primary);
}
.clone-toggle-icon {
width: 16px;
height: 16px;
transition: transform 0.2s;
flex-shrink: 0;
}
.clone-toggle-icon.expanded {
transform: rotate(180deg);
}
.clone-url-list {
display: flex;
flex-direction: column;
gap: 0.375rem;
transition: max-height 0.3s ease, opacity 0.3s ease;
overflow: hidden;
}
.clone-url-list.collapsed {
max-height: 0;
opacity: 0;
margin: 0;
padding: 0;
}
@media (min-width: 768px) {
.clone-label-button {
pointer-events: none;
}
.clone-toggle-icon {
display: none;
}
.clone-url-list.collapsed {
max-height: none;
opacity: 1;
margin: 0;
padding: 0;
}
}
.clone-url-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
}
.clone-url {
padding: 0.125rem 0.375rem;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 0.25rem;
font-family: 'IBM Plex Mono', monospace;
font-size: 0.75rem;
word-break: break-all;
flex: 1;
}
.clone-more {
color: var(--text-muted);
font-size: 0.75rem;
margin-top: 0.25rem;
}
.icon-inline {
width: 1em;
height: 1em;
vertical-align: middle;
display: inline-block;
}
.icon-small {
width: 16px;
height: 16px;
vertical-align: middle;
}
.back-button {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 0.25rem;
cursor: pointer;
color: var(--text-primary);
transition: background 0.2s ease, border-color 0.2s ease;
}
.back-button:hover {
background: var(--bg-secondary);
border-color: var(--accent);
}
.create-file-button,
.create-tag-button {
padding: 0.375rem;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
background: var(--button-primary);
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
transition: background 0.2s ease;
}
.create-file-button:hover,
.create-tag-button:hover {
background: var(--button-primary-hover);
}
.create-file-button .icon,
.create-tag-button .icon {
width: 18px;
height: 18px;
}
.delete-file-button {
padding: 0.25rem;
background: none;
border: none;
cursor: pointer;
opacity: 0.6;
}
.delete-file-button:hover {
opacity: 1;
}
.file-tree-actions {
display: flex;
gap: 0.5rem;
margin-left: auto;
flex-shrink: 0;
}
.word-wrap-button {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 0.25rem;
cursor: pointer;
color: var(--text-primary);
transition: background 0.2s ease;
flex-shrink: 0;
white-space: nowrap;
}
.word-wrap-button:hover {
background: var(--bg-secondary);
}
/* History, tags, issues, PRs sidebars */
.history-sidebar,
.tags-sidebar,
.issues-sidebar,
.prs-sidebar,
.patches-sidebar,
.discussions-sidebar,
.docs-sidebar {
width: 300px;
border-right: 1px solid var(--border-color);
background: var(--bg-secondary);
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
}
.patches-sidebar .patches-header,
.discussions-sidebar .discussions-header,
.docs-sidebar .docs-header {
overflow: visible;
}
.history-header,
.tags-header,
.issues-header,
.prs-header,
.docs-header,
.patches-header,
.discussions-header {
padding: 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: flex-start;
align-items: center;
gap: 0.75rem;
flex-wrap: nowrap;
flex-shrink: 0;
position: relative;
overflow: visible;
z-index: 1;
}
.create-patch-button,
.create-discussion-button,
.create-issue-button,
.create-pr-button {
margin-left: auto;
}
.patches-header h2,
.discussions-header h2,
.docs-header h2,
.prs-header h2,
.issues-header h2,
.history-header h2,
.tags-header h2 {
margin: 0;
white-space: nowrap;
flex-shrink: 0;
}
.patches-content,
.discussions-content {
padding: 1rem;
flex: 1;
overflow-y: auto;
}
.patch-subject,
.discussion-title {
font-weight: 600;
color: var(--text-primary);
}
.patch-meta,
.discussion-meta {
display: flex;
gap: 0.75rem;
align-items: center;
font-size: 0.875rem;
color: var(--text-secondary);
margin-top: 0.5rem;
}
.patch-detail,
.discussion-detail {
padding: 1rem;
}
.patch-header-detail,
.discussion-header-detail {
margin-bottom: 1rem;
}
.patch-header-detail h3,
.discussion-header-detail h3 {
margin: 0 0 0.5rem 0;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
}
.patch-meta-detail,
.discussion-meta-detail {
display: flex;
gap: 1rem;
align-items: center;
font-size: 0.875rem;
color: var(--text-secondary);
}
.patch-body {
margin-top: 1rem;
}
.patch-content {
margin: 0;
padding: 0.75rem;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 0.25rem;
font-family: 'IBM Plex Mono', monospace;
font-size: 0.875rem;
line-height: 1.5;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
color: var(--text-primary);
}
.commit-list,
.tag-list,
.issue-list,
.pr-list,
.patch-list,
.discussion-list {
list-style: none;
padding: 0;
margin: 0;
overflow-y: auto;
flex: 1;
}
.commit-item,
.tag-item,
.issue-item,
.pr-item,
.patch-item,
.discussion-item {
border-bottom: 1px solid var(--border-color);
}
.patch-item-button,
.discussion-item-button {
width: 100%;
padding: 0.75rem 1rem;
text-align: left;
background: transparent;
border: none;
cursor: pointer;
color: inherit;
transition: background 0.2s ease;
}
.patch-item:not(.selected) .patch-item-button:hover,
.discussion-item:not(.selected) .discussion-item-button:hover {
background: var(--bg-tertiary);
}
.patch-item.selected .patch-item-button,
.discussion-item.selected .discussion-item-button {
background: var(--accent);
color: var(--text-on-accent);
}
.issue-item.selected,
.pr-item.selected,
.patch-item.selected,
.discussion-item.selected {
background: var(--accent);
color: var(--text-on-accent);
}
.commit-button {
width: 100%;
padding: 0;
text-align: left;
background: none;
border: none;
cursor: pointer;
transition: background 0.2s ease;
border-radius: 0.25rem;
}
.commit-button:hover {
background: var(--bg-tertiary);
}
.commit-hash {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.75rem;
color: var(--text-muted);
}
.commit-message {
font-weight: 500;
color: var(--text-primary);
}
.commit-meta {
font-size: 0.75rem;
color: var(--text-muted);
}
.issue-status,
.pr-status {
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 500;
}
.issue-status.open,
.pr-status.open {
background: var(--accent);
color: var(--accent-text, #ffffff);
}
.create-issue-button,
.create-pr-button,
.create-patch-button,
.create-discussion-button,
.create-reply-button {
padding: 0.375rem;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
background: var(--button-primary);
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
transition: background 0.2s ease;
}
.create-issue-button:hover,
.create-pr-button:hover,
.create-patch-button:hover,
.create-discussion-button:hover,
.create-reply-button:hover {
background: var(--button-primary-hover);
}
.create-issue-button .icon,
.create-pr-button .icon,
.create-patch-button .icon,
.create-discussion-button .icon,
.create-reply-button .icon {
width: 18px;
height: 18px;
}
.refresh-button {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 0.25rem;
cursor: pointer;
color: var(--text-primary);
transition: background 0.2s ease, border-color 0.2s ease;
}
.refresh-button:hover {
background: var(--bg-secondary);
border-color: var(--accent);
}
.verification-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.25rem;
border-radius: 0.25rem;
font-size: 0.75rem;
}
.verification-badge.verified {
color: var(--success-text);
}
.verification-badge.unverified {
color: var(--error-text);
}
.empty {
padding: 2rem;
text-align: center;
color: var(--text-muted);
flex: 1;
overflow-y: auto;
}
.empty-state {
padding: 2rem 2rem 2rem 1rem;
text-align: left;
color: var(--text-muted);
}
.empty-state p {
margin: 0;
padding-left: 0.5rem;
}
.unsaved-indicator {
color: var(--warning-text);
font-size: 0.875rem;
}
.non-maintainer-notice {
font-size: 0.75rem;
color: var(--text-muted);
}
.repo-website a {
color: var(--link-color);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.25rem;
}
.repo-website a:hover {
text-decoration: underline;
}