|
| 1 | +// Component cards for /operations/configuration/licenses/ |
| 2 | +// Inspired by Deckhouse OSS-info layout. |
| 3 | + |
| 4 | +.oss-cards-grid { |
| 5 | + display: grid; |
| 6 | + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); |
| 7 | + gap: 1rem; |
| 8 | + margin: 1.5rem 0 2rem; |
| 9 | + |
| 10 | + // Hugo wraps shortcode output in <p> when the parent is markdown. |
| 11 | + // Flatten that so cards sit directly in the grid. |
| 12 | + > p { |
| 13 | + display: contents; |
| 14 | + } |
| 15 | +} |
| 16 | + |
| 17 | +.oss-card { |
| 18 | + display: flex; |
| 19 | + flex-direction: column; |
| 20 | + gap: .5rem; |
| 21 | + padding: 1rem 1.1rem; |
| 22 | + border: 1px solid var(--bs-gray-300, #dee2e6); |
| 23 | + border-radius: .5rem; |
| 24 | + background: var(--bs-body-bg, #fff); |
| 25 | + transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; |
| 26 | + |
| 27 | + &:hover { |
| 28 | + border-color: var(--bs-primary, #0d6efd); |
| 29 | + box-shadow: 0 2px 8px rgba(0, 0, 0, .06); |
| 30 | + transform: translateY(-1px); |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +.oss-card-head { |
| 35 | + display: flex; |
| 36 | + align-items: center; |
| 37 | + gap: .65rem; |
| 38 | +} |
| 39 | + |
| 40 | +.oss-card-logo { |
| 41 | + width: 36px; |
| 42 | + height: 36px; |
| 43 | + flex-shrink: 0; |
| 44 | + object-fit: contain; |
| 45 | + border-radius: 6px; |
| 46 | +} |
| 47 | + |
| 48 | +.oss-card-logo-fallback { |
| 49 | + display: inline-flex; |
| 50 | + align-items: center; |
| 51 | + justify-content: center; |
| 52 | + font-family: var(--bs-font-monospace, ui-monospace, monospace); |
| 53 | + font-size: .8rem; |
| 54 | + font-weight: 600; |
| 55 | + letter-spacing: .02em; |
| 56 | + color: #fff; |
| 57 | + background: hsl(var(--oss-hue, 210), 55%, 45%); |
| 58 | + user-select: none; |
| 59 | +} |
| 60 | + |
| 61 | +.oss-card-titleblock { |
| 62 | + display: flex; |
| 63 | + flex-direction: column; |
| 64 | + min-width: 0; |
| 65 | +} |
| 66 | + |
| 67 | +.oss-card-title { |
| 68 | + font-weight: 600; |
| 69 | + font-size: 1rem; |
| 70 | + line-height: 1.25; |
| 71 | + color: inherit; |
| 72 | + text-decoration: none; |
| 73 | + word-break: break-word; |
| 74 | + |
| 75 | + &:hover { |
| 76 | + color: var(--bs-primary, #0d6efd); |
| 77 | + text-decoration: underline; |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +.oss-card-version { |
| 82 | + font-family: var(--bs-font-monospace, ui-monospace, monospace); |
| 83 | + font-size: .8rem; |
| 84 | + color: var(--bs-secondary, #6c757d); |
| 85 | + margin-top: 1px; |
| 86 | +} |
| 87 | + |
| 88 | +.oss-card-desc { |
| 89 | + margin: 0; |
| 90 | + font-size: .9rem; |
| 91 | + color: var(--bs-body-color, #212529); |
| 92 | + line-height: 1.4; |
| 93 | +} |
| 94 | + |
| 95 | +.oss-card-meta { |
| 96 | + display: flex; |
| 97 | + flex-wrap: wrap; |
| 98 | + align-items: center; |
| 99 | + gap: .35rem; |
| 100 | + font-size: .82rem; |
| 101 | + color: var(--bs-secondary, #6c757d); |
| 102 | + margin-top: auto; |
| 103 | + padding-top: .25rem; |
| 104 | +} |
| 105 | + |
| 106 | +.oss-card-license { |
| 107 | + font-family: var(--bs-font-monospace, ui-monospace, monospace); |
| 108 | + background: var(--bs-gray-100, #f8f9fa); |
| 109 | + border: 1px solid var(--bs-gray-200, #e9ecef); |
| 110 | + border-radius: 3px; |
| 111 | + padding: .05rem .4rem; |
| 112 | + color: var(--bs-body-color, #212529); |
| 113 | + font-size: .78rem; |
| 114 | +} |
| 115 | + |
| 116 | +.oss-card-usedin { |
| 117 | + color: inherit; |
| 118 | + text-decoration: none; |
| 119 | + border-bottom: 1px dashed currentColor; |
| 120 | + |
| 121 | + &:hover { |
| 122 | + color: var(--bs-primary, #0d6efd); |
| 123 | + border-bottom-style: solid; |
| 124 | + } |
| 125 | +} |
| 126 | + |
| 127 | +// Dark mode (Docsy supports it via data-bs-theme="dark") |
| 128 | +[data-bs-theme="dark"] { |
| 129 | + .oss-card { |
| 130 | + border-color: var(--bs-gray-700, #495057); |
| 131 | + background: var(--bs-gray-900, #212529); |
| 132 | + } |
| 133 | + |
| 134 | + .oss-card-license { |
| 135 | + background: var(--bs-gray-800, #343a40); |
| 136 | + border-color: var(--bs-gray-700, #495057); |
| 137 | + } |
| 138 | +} |
0 commit comments