redox/src/web/style.css
2026-05-16 14:58:51 +07:00

405 lines
7.0 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #eee;
color: #222;
line-height: 1.6;
}
p {
margin: 0.5em 0;
}
.container {
max-width: 1280px;
margin: 0 auto;
padding: 0 20px;
}
.category-section {
margin-bottom: 50px;
}
.category-title {
font-size: 1.5rem;
color: #222;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
margin-bottom: 20px;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.package-grid {
display: block;
display: flex;
flex-wrap: wrap;
margin: -10px;
}
.package-card {
background-color: #fff;
border: 1px solid #eee;
border-radius: 6px;
padding: 15px;
margin: 10px;
display: inline-block;
width: 30%;
vertical-align: top;
display: flex;
flex: 0 1 280px;
flex-direction: column;
justify-content: space-between;
}
.package-card .pkg-name {
margin-bottom: 15px;
font-size: 1.25rem;
}
.package-card .pkg-name a {
border: none;
}
.package-card .pkg-name a:hover {
text-decoration: underline;
}
.package-card .pkg-stats {
display: block;
display: flex;
justify-content: space-between;
align-items: center;
color: #6a737d;
font-size: 0.9rem;
border-top: 1px solid #eee;
padding-top: 10px;
}
.package-card .pkg-version {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
background-color: #fff;
padding: 3px 6px;
border-radius: 4px;
color: #222;
}
.package-card .pkg-size {
font-weight: 500;
}
a {
color: #222;
text-decoration: none;
border-bottom: 1px solid #eee;
}
a:hover {
color: #000000;
border-bottom: 1px solid #222;
}
h1, h2, h3 {
font-weight: 600;
margin: 1rem 0;
}
code {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
background-color: #fff;
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 0.9em;
font-weight: normal;
}
.card {
background-color: #ffffff;
border: 1px solid #eee;
border-radius: 6px;
padding: 20px;
margin-bottom: 20px;
}
.pkg-header, .index-header {
background-color: #ffffff;
border-bottom: 1px solid #ddd;
padding: 40px 0;
margin-bottom: 40px;
text-align: center;
}
.pkg-header h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.pkg-header .version {
color: #6a737d;
font-size: 1.5rem;
font-weight: 400;
}
.pkg-header .description {
font-size: 1.2rem;
color: #586069;
max-width: 600px;
margin: 0 auto 1.5rem auto;
}
.back-link {
display: inline-block;
margin-bottom: 20px;
color: #6a737d;
border: none;
font-size: 0.9rem;
}
.back-link:hover {
color: #222;
border: none;
}
.install-action {
display: inline-block;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 6px;
padding: 12px 20px;
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 1.1rem;
color: #222;
}
.install-action .prompt {
color: #6a737d;
margin-right: 12px;
}
.install-action code {
background-color: transparent;
padding: 0;
font-size: 1.1rem;
user-select: all;
}
.pkg-content {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.pkg-main, .pkg-meta {
width: 100%;
}
@media (min-width: 768px) {
.pkg-main {
width: 60%;
}
.pkg-meta {
width: 35%;
}
}
.meta-box {
overflow-x: auto;
display: block;
max-width: 150px;
user-select: all;
padding: 8px;
white-space: nowrap;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 10px 0;
text-align: left;
border-bottom: 1px solid #eee;
}
th {
color: #6a737d;
font-weight: 500;
}
.pkg-meta table th {
width: 40%;
padding-right: 10px;
}
.pkg-deps ul, .pkg-dependents ul {
list-style-type: none;
display: flex;
flex-wrap: wrap;
}
.pkg-deps li, .pkg-dependents li {
padding: 8px 0;
border-bottom: 1px solid #eee;
width: 50%;
}
.search-box {
width: 100%;
padding: 12px 15px;
font-size: 1.1rem;
border: 1px solid #ddd;
border-radius: 6px;
margin-bottom: 20px;
box-sizing: border-box;
font-family: inherit;
}
.browser-panels {
display: flex;
gap: 20px;
height: 80vh;
min-height: 400px;
}
.panel {
flex: 1;
border: 1px solid #eee;
border-radius: 6px;
display: flex;
flex-direction: column;
background-color: #fff;
overflow: hidden;
}
.panel-header {
font-weight: 600;
padding: 10px 15px;
border-bottom: 1px solid #eee;
background-color: #f9f9f9;
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 0.9rem;
}
.panel-body {
flex: 1;
overflow-y: auto;
padding: 10px 0;
}
.list-item {
padding: 8px 15px;
cursor: pointer;
display: flex;
flex-wrap: wrap;
align-items: center;
user-select: none;
}
.list-item:hover {
background-color: #f1f8ff;
}
.list-item.selected {
background-color: #0366d6;
color: #fff;
}
.list-item.selected .pkg-badge {
color: #fff;
background-color: rgba(255, 255, 255, 0.2);
}
.pkg-badge {
font-size: 0.75rem;
color: #6a737d;
background-color: #eee;
padding: 2px 6px;
border-radius: 12px;
}
.up-icon::before {
content: "↵ ";
margin-right: 0.2em;
}
.nowrap {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
color: #ccc;
}
.package-card, .card, .panel, .pkg-header, .index-header {
background-color: #111;
border-color: #333;
}
.category-title {
color: #f0f6fc;
border-bottom-color: #333;
}
.package-card .pkg-stats {
color: #8b949e;
border-top-color: #333;
}
.package-card .pkg-version, code, .install-action {
background-color: #222;
color: #cdd;
border-color: #333;
}
a, .pkg-header h1, .back-link:hover {
color: #5af;
border-bottom-color: #333;
}
a:hover {
color: #7cf;
border-bottom-color: #7cf;
}
.pkg-header .version, .pkg-header .description, .back-link, .install-action .prompt, th {
color: #999;
}
th, td, .pkg-deps li, .pkg-dependents li {
border-bottom-color: #333;
}
.search-box {
background-color: #000;
color: #ccc;
border-color: #333;
}
.panel-header {
background-color: #1a1a1a;
border-bottom-color: #333;
color: #8b949e;
}
.list-item:hover {
background-color: #222;
}
.list-item.selected {
background-color: #1f6feb;
color: #fff;
}
.pkg-badge {
background-color: #333;
color: #8b949e;
}
}