| @font-face { |
| font-family: 'HarmonyOS Sans'; |
| src: url(./fonts/HarmonyOS_Sans_Regular.ttf) format('truetype'); |
| font-weight: normal; |
| font-style: normal; |
| } |
| |
| @font-face { |
| font-family: 'HarmonyOS Sans'; |
| src: url(./fonts/HarmonyOS_Sans_Bold.ttf) format('truetype'); |
| font-weight: bold; |
| font-style: normal; |
| } |
| |
| :root { |
| --transition: color 200ms ease-in-out, border-color 200ms ease-in-out; |
| |
| /* H3 to h6 and text color */ |
| --text-color: #111; |
| |
| /* H1 and H2 */ |
| --heading-color: #669982; |
| |
| --background-color: #fff; |
| --hero-bg-color: #e4f6ee; |
| --hero-text-color: #669982; |
| |
| /* Buttons */ |
| --button-color: #fff; |
| --button-bg: #109c5c; |
| --button-bg-hover: #0e854e; |
| --button-bg-active: #0b6e41; |
| |
| /* Links */ |
| --link-color: #07a55d; |
| |
| --control-bg: #e4f6ee; |
| --control-color: #669982; |
| --control-hover: #f2fbf7; |
| --control-active: #bee9d6; |
| --control-text-active: #669982; |
| |
| --shadow: 0 2px 6px rgb(0 0 0 / 25%); |
| |
| --alert-bg: #fff2ae; |
| --alert-color: #ad6c00; |
| --error-bg: #fdcdcd; |
| --error-color: #d83e3e; |
| --success-bg: #b4f1af; |
| --success-color: #33722d; |
| } |
| |
| @media (prefers-color-scheme: dark) { |
| :root { |
| /* H3 to h6 and text color */ |
| --text-color: #ddd; |
| |
| /* H1 and H2 */ |
| --heading-color: #6c9381; |
| |
| --background-color: #141f1a; |
| --hero-bg-color: #1b2822; |
| --hero-text-color: #6c9381; |
| |
| /* Buttons */ |
| --button-color: #141f1a; |
| --button-bg: #109c5c; |
| --button-bg-hover: #0e854e; |
| --button-bg-active: #0b6e41; |
| |
| /* Links */ |
| --link-color: #07a55d; |
| |
| --control-color: #6c9381; |
| --control-bg: #1b2822; |
| --control-hover: #17231e; |
| --control-active: #060908; |
| --control-text-active: #6c9381; |
| |
| --shadow: 0 2px 6px rgb(0 0 0 / 50%); |
| } |
| } |
| |
| ::-webkit-scrollbar { |
| width: 8px; |
| height: 8px; |
| } |
| |
| ::-webkit-scrollbar-track { |
| border: 1px solid var(--button-bg-active); |
| } |
| |
| ::-webkit-scrollbar-thumb { |
| background: var(--button-bg); |
| } |
| |
| ::-webkit-scrollbar-thumb:hover { |
| background: var(--button-bg-hover); |
| } |
| |
| html { |
| box-sizing: border-box; |
| font-family: 'HarmonyOS Sans', sans-serif; |
| } |
| |
| body { |
| background-color: var(--background-color); |
| color: var(--text-color); |
| } |
| |
| h1, |
| h2 { |
| font-weight: 600; |
| margin: 0; |
| color: var(--heading-color); |
| } |
| |
| h3, |
| h4, |
| h5, |
| h6 { |
| font-weight: 600; |
| margin: 0; |
| color: var(--text-color); |
| } |
| |
| a { |
| text-decoration: none; |
| color: var(--link-color); |
| border-bottom: 1px solid var(--control-bg); |
| transition: var(--transition); |
| } |
| |
| a:hover { |
| border-color: var(--link-color); |
| } |
| |
| .layout { |
| display: flex; |
| flex-direction: column; |
| height: 100vh; |
| } |
| |
| .layout main { |
| flex-grow: 1; |
| display: flex; |
| flex-direction: row; |
| } |
| |
| main aside { |
| display: flex; |
| flex-direction: column; |
| box-shadow: var(--shadow); |
| background-color: var(--background-color); |
| z-index: 2; |
| } |
| |
| aside h2 { |
| font-size: 21px; |
| padding: 20px 16px; |
| } |
| |
| .accordion { |
| width: max-content; |
| margin: 0 auto; |
| } |
| |
| .accordion-item { |
| margin-bottom: 1rem; |
| } |
| |
| .accordion-label { |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| padding: 1em; |
| font-weight: bold; |
| cursor: pointer; |
| } |
| |
| .label-content { |
| display: flex; |
| align-items: center; |
| } |
| |
| .accordion-label::after { |
| content: '\276E'; |
| font-size: 1em; |
| width: 1em; |
| height: 1em; |
| text-align: center; |
| transition: all 0.35s; |
| transform: rotate(-90deg); |
| } |
| |
| .accordion-content { |
| max-height: 0; |
| overflow: hidden; |
| transition: max-height 0.35s; |
| } |
| |
| .icon { |
| margin-right: 0.5em; |
| } |
| |
| .device-box { |
| transition: background-color 200ms ease-in-out; |
| } |
| |
| .device-search { |
| border-radius: 20px; |
| padding: 10px; |
| margin: 0 15px 15px 15px; |
| border: none; |
| outline: none; |
| width: calc(100% - 30px); |
| box-sizing: border-box; |
| } |
| |
| .selected-device, |
| .selected-device:hover { |
| background-color: var(--button-bg-active) !important; |
| color: var(--button-color) !important; |
| } |
| |
| input[type='checkbox'] { |
| display: none; |
| } |
| |
| input[type='checkbox']:checked + .accordion-label::after { |
| transform: rotate(-270deg); |
| } |
| |
| input[type='checkbox']:checked ~ .accordion-content { |
| max-height: 1000px; |
| } |
| |
| aside ul { |
| list-style: none; |
| padding: 0; |
| margin: 0; |
| } |
| |
| aside a { |
| display: block; |
| border: 0; |
| color: var(--text-color); |
| border-radius: 10px; |
| padding: 1.3em; |
| margin: 1em; |
| } |
| |
| aside a:hover { |
| color: var(--link-color); |
| background-color: var(--control-hover); |
| } |
| |
| aside a.active { |
| background-color: var(--control-active); |
| color: var(--control-text-active); |
| } |
| |
| main article { |
| flex-grow: 1; |
| } |
| |
| hr { |
| border-style: solid; |
| border-color: var(--control-bg); |
| } |
| |
| footer { |
| background-color: var(--hero-bg-color); |
| padding: 20px 0; |
| z-index: 3; |
| } |
| |
| footer div { |
| padding-bottom: 20px; |
| } |
| |
| footer p { |
| margin: 0; |
| padding: 0; |
| color: var(--control-color); |
| } |
| |
| table.center thead th, |
| table.center tbody td { |
| text-align: center; |
| } |
| |
| #toggle-aside, |
| #toggle-navbar { |
| display: none; |
| } |
| |
| nav.navbar { |
| background-color: var(--background-color); |
| position: sticky; |
| top: 0; |
| z-index: 999; |
| box-shadow: var(--shadow); |
| display: flex; |
| justify-items: center; |
| height: 60px; |
| } |
| |
| .navbar div { |
| display: flex; |
| align-items: center; |
| } |
| |
| .navbar a.logo { |
| padding: 0 20px; |
| border: 0; |
| } |
| |
| .navbar ul { |
| list-style-type: none; |
| margin: 0; |
| padding: 0; |
| display: flex; |
| align-items: center; |
| } |
| |
| .navbar ul li a { |
| background-color: var(--background-color); |
| display: inline-block; |
| color: var(--control-color); |
| text-align: center; |
| padding: 21px 16px; |
| border: 0; |
| transition: var(--transition); |
| } |
| |
| .navbar ul li a:hover:not(.active) { |
| background-color: var(--control-hover); |
| color: var(--link-color); |
| } |
| |
| .navbar ul li a.active { |
| background-color: var(--control-active); |
| color: var(--control-text-active); |
| } |
| |
| .container { |
| margin-right: auto; |
| margin-left: auto; |
| padding: 30px 20px; |
| } |
| |
| .container h2 { |
| margin-bottom: 15px; |
| } |
| |
| .community h2 { |
| margin-top: 15px; |
| margin-bottom: 25px; |
| } |
| |
| .button { |
| padding: 10px 30px; |
| background-color: var(--button-bg); |
| color: var(--button-color); |
| font-weight: 600; |
| display: inline-block; |
| transition: var(--transition); |
| border-radius: 4px; |
| border: 0; |
| } |
| |
| .button:hover { |
| background-color: var(--button-bg-hover); |
| } |
| |
| .button:active { |
| background-color: var(--button-bg-active); |
| } |
| |
| .banner { |
| background-color: var(--hero-bg-color); |
| color: var(--hero-text-color); |
| } |
| |
| .features { |
| display: grid; |
| grid-template-columns: repeat(2, minmax(0, 1fr)); |
| column-gap: 30px; |
| row-gap: 25px; |
| } |
| |
| .screenshot-gallery { |
| display: flex; |
| flex-direction: row; |
| flex-wrap: wrap; |
| gap: 30px; |
| margin-left: auto; |
| margin-right: auto; |
| justify-content: center; |
| align-items: center; |
| padding: 10vw; |
| padding: 30px 0; |
| } |
| |
| .screenshot-gallery img { |
| border-radius: 10px; |
| flex-basis: 20%; |
| width: 200px; |
| } |
| |
| .wiki { |
| display: grid; |
| grid-template-columns: repeat(2, minmax(0, 1fr)); |
| column-gap: 30px; |
| } |
| |
| .wiki .for-developers { |
| column-span: 2; |
| } |
| |
| .device-info { |
| display: flex; |
| gap: 8px; |
| } |
| |
| .instructions { |
| flex: 2; |
| } |
| |
| .latest-builds { |
| display: grid; |
| gap: 10px; |
| } |
| |
| .build-card { |
| border: 1px solid var(--control-bg); |
| border-radius: 4px; |
| } |
| |
| .build-card .title { |
| background-color: var(--control-bg); |
| padding: 8px; |
| } |
| |
| .specs { |
| flex: 1; |
| display: flex; |
| flex-direction: column; |
| } |
| |
| .specs .heading h2, |
| .specs .heading p { |
| text-align: center; |
| margin: 0; |
| } |
| |
| .specs .heading p { |
| font-size: small; |
| } |
| |
| .specs img { |
| max-width: 200px; |
| object-fit: contain; |
| align-self: center; |
| padding: 1rem 0; |
| } |
| |
| .device-info table { |
| border-collapse: collapse; |
| width: 100%; |
| } |
| |
| .device-info th, |
| td { |
| padding: 12px; |
| } |
| |
| .device-info tr:not(:last-of-type) { |
| border-bottom: 1px solid var(--control-bg); |
| } |
| |
| .device-info tbody { |
| font-size: small; |
| } |
| |
| .device-info tbody p { |
| padding: 0; |
| margin: 0; |
| } |
| |
| .device-info tbody ul { |
| list-style: none; |
| margin: 0; |
| padding: 0; |
| } |
| |
| .device-info tbody td:nth-child(1) { |
| font-weight: bold; |
| } |
| |
| .device-info tbody td:nth-child(2) { |
| text-align: right; |
| } |
| |
| .contribute { |
| column-gap: 30px; |
| display: grid; |
| row-gap: 25px; |
| } |
| |
| .error { |
| display: flex; |
| justify-content: center; |
| flex-grow: 1; |
| align-items: center; |
| flex-direction: column; |
| gap: 10px; |
| } |
| |
| .error h2 { |
| text-align: center; |
| padding: 10px 0; |
| } |
| |
| .error .buttons { |
| display: flex; |
| gap: 10px; |
| padding: 20px 0; |
| } |
| |
| /* Media queries */ |
| @media (min-width: 576px) { |
| .contribute { |
| grid-template-columns: repeat(1, minmax(0, 1fr)); |
| } |
| |
| .latest-builds { |
| grid-template-columns: repeat(1, minmax(0, 1fr)); |
| } |
| |
| .container { |
| max-width: 540px; |
| } |
| } |
| |
| @media (min-width: 768px) { |
| .contribute { |
| grid-template-columns: repeat(2, minmax(0, 1fr)); |
| } |
| |
| .container { |
| max-width: 720px; |
| } |
| } |
| |
| @media (min-width: 992px) { |
| .latest-builds { |
| grid-template-columns: repeat(2, minmax(0, 1fr)); |
| } |
| |
| .container { |
| max-width: 960px; |
| } |
| } |
| |
| @media (min-width: 1200px) { |
| .latest-builds { |
| grid-template-columns: repeat(3, minmax(0, 1fr)); |
| } |
| |
| .container { |
| max-width: 1140px; |
| } |
| } |
| |
| @media (min-width: 1400px) { |
| .container { |
| max-width: 1320px; |
| } |
| } |
| |
| /* Mobile overrides */ |
| @media (max-width: 600px) { |
| main aside { |
| display: none; |
| position: absolute; |
| width: 100vw; |
| height: 100vh; |
| overflow-y: auto; |
| } |
| |
| .navbar { |
| justify-content: space-between; |
| } |
| |
| .navbar ul { |
| flex-direction: column; |
| display: none; |
| position: absolute; |
| margin-top: 60px; |
| } |
| |
| .navbar ul li { |
| width: 100vw; |
| } |
| |
| .navbar ul li a { |
| background-color: var(--control-bg); |
| display: block; |
| } |
| |
| .navbar .label-aside, |
| .navbar .label-navbar { |
| display: block; |
| cursor: pointer; |
| } |
| |
| .navbar .label-aside .icon-bar { |
| display: block; |
| height: 6px; |
| background-color: var(--control-color); |
| margin: 10px; |
| transition: all 0.2s; |
| } |
| |
| .navbar .label-aside .top-bar { |
| width: 24px; |
| transform: translateY(9px) rotate(45deg); |
| } |
| |
| .navbar .label-aside .middle-bar { |
| opacity: 0; |
| } |
| |
| .navbar .label-aside .bottom-bar { |
| width: 24px; |
| transform: translateY(-9px) rotate(-45deg); |
| } |
| |
| #toggle-aside:checked ~ .navbar .label-aside .top-bar { |
| transform: translateY(9px) rotate(-45deg); |
| } |
| |
| #toggle-aside:checked ~ .navbar .label-aside .middle-bar { |
| opacity: 0; |
| } |
| |
| #toggle-aside:checked ~ .navbar .label-aside .bottom-bar { |
| transform: translateY(-9px) rotate(45deg); |
| } |
| |
| #toggle-aside:checked ~ main aside { |
| display: block; |
| } |
| |
| #toggle-aside:checked ~ main { |
| overflow: hidden; |
| } |
| |
| #toggle-aside:checked ~ footer { |
| display: none; |
| } |
| |
| .navbar .label-navbar { |
| display: flex; |
| flex-direction: column; |
| align-items: flex-end; |
| justify-content: center; |
| padding-right: 25px; |
| } |
| |
| .navbar .label-navbar .icon-bar { |
| display: block; |
| width: 30px; |
| height: 2px; |
| background-color: var(--control-color); |
| margin-top: 2px; |
| margin-bottom: 2px; |
| transition: all 0.2s; |
| } |
| |
| .navbar .label-navbar .top-bar { |
| transform: rotate(0); |
| } |
| |
| .navbar .label-navbar .middle-bar { |
| opacity: 1; |
| } |
| |
| #toggle-navbar:checked ~ .label-navbar .top-bar { |
| transform: translateY(8px) rotate(45deg); |
| } |
| |
| #toggle-navbar:checked ~ .label-navbar .middle-bar { |
| opacity: 0; |
| } |
| |
| #toggle-navbar:checked ~ .label-navbar .bottom-bar { |
| transform: translateY(-4px) rotate(-45deg); |
| } |
| |
| #toggle-navbar:checked ~ ul { |
| display: flex; |
| } |
| |
| .wiki { |
| grid-template-columns: repeat(1, minmax(0, 1fr)); |
| } |
| |
| .features { |
| grid-template-columns: repeat(1, minmax(0, 1fr)); |
| } |
| |
| .device-info { |
| flex-direction: column-reverse; |
| } |
| } |