1
0
Fork 0
mirror of https://github.com/imjasonh/cnotes synced 2026-07-07 00:33:04 +00:00
cnotes/chrome-extension/styles.css
Jason Hall 32be89b76d
Add Chrome extension for viewing git notes on GitHub
- Popup-based extension that works on GitHub commit pages
- Shows badge with note count when commits have notes
- Displays all available git notes refs in tabbed interface
- Supports cnotes format with special formatting
- Works with any public GitHub repository (no auth required)
- Includes caching to minimize API calls (60 req/hour limit)
2025-07-21 22:22:32 -04:00

281 lines
No EOL
4.1 KiB
CSS

/* Styles for GitHub Git Notes Viewer Popup */
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.5;
color: #24292e;
background: #ffffff;
min-width: 400px;
max-width: 600px;
min-height: 200px;
max-height: 600px;
}
.popup-container {
display: flex;
flex-direction: column;
height: 100%;
}
/* Header */
.popup-header {
background: #f6f8fa;
border-bottom: 1px solid #e1e4e8;
padding: 12px 16px;
}
.popup-header h1 {
margin: 0;
font-size: 16px;
font-weight: 600;
}
.status {
margin-top: 4px;
font-size: 12px;
color: #586069;
}
.repo-info {
font-weight: 600;
color: #0366d6;
}
.commit-sha {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
background: #e1e4e8;
padding: 2px 4px;
border-radius: 3px;
margin-left: 4px;
}
/* Content */
.popup-content {
flex: 1;
overflow-y: auto;
padding: 16px;
}
/* Loading */
.loading {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 32px;
color: #586069;
}
.spinner {
width: 16px;
height: 16px;
border: 2px solid #e1e4e8;
border-top-color: #0366d6;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Messages */
.message {
padding: 16px;
border-radius: 6px;
margin: 16px 0;
}
.message p {
margin: 0;
}
.message-info {
background: #f1f8ff;
border: 1px solid #c8e1ff;
color: #0366d6;
}
.message-warning {
background: #fffbdd;
border: 1px solid #fffbdd;
color: #735c0f;
}
.message-error {
background: #ffeef0;
border: 1px solid #ffdce0;
color: #d73a49;
}
/* Tabs */
.tabs {
display: flex;
flex-direction: column;
height: 100%;
}
.tab-buttons {
display: flex;
gap: 8px;
margin-bottom: 16px;
border-bottom: 1px solid #e1e4e8;
padding-bottom: 8px;
}
.tab-button {
background: none;
border: none;
padding: 6px 12px;
font-size: 14px;
color: #586069;
cursor: pointer;
border-radius: 6px;
transition: all 0.2s;
}
.tab-button:hover {
background: #f6f8fa;
color: #24292e;
}
.tab-button.active {
background: #0366d6;
color: white;
}
.tab-content {
flex: 1;
overflow-y: auto;
}
.tab-panel {
display: none;
}
.tab-panel.active {
display: block;
}
/* Note content */
.note-ref h2 {
font-size: 14px;
margin: 0 0 12px 0;
color: #24292e;
}
.json-content,
.text-content {
background: #f6f8fa;
border: 1px solid #e1e4e8;
border-radius: 6px;
padding: 12px;
overflow-x: auto;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 12px;
line-height: 1.45;
margin: 0;
white-space: pre-wrap;
word-break: break-all;
}
/* cnotes specific */
.cnotes-content {
font-size: 13px;
}
.cnotes-meta {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.badge {
display: inline-block;
padding: 2px 8px;
font-size: 11px;
font-weight: 500;
line-height: 18px;
border-radius: 12px;
background: #e1e4e8;
color: #24292e;
}
.badge-primary {
background: #0366d6;
color: white;
}
.badge-secondary {
background: #6a737d;
color: white;
}
.timestamp {
font-size: 12px;
color: #586069;
}
.tools-section {
margin-bottom: 12px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px;
}
.tools-section strong {
margin-right: 4px;
}
.conversation-section {
margin-top: 12px;
}
.conversation-excerpt {
background: #f6f8fa;
border: 1px solid #e1e4e8;
border-radius: 6px;
padding: 12px;
margin-top: 8px;
font-size: 12px;
line-height: 1.6;
max-height: 300px;
overflow-y: auto;
}
.user {
color: #0366d6;
}
.assistant {
color: #6f42c1;
}
.tool {
color: #586069;
font-style: italic;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f3f4;
}
::-webkit-scrollbar-thumb {
background: #dadce0;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #bdc1c6;
}