mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
597 lines
12 KiB
CSS
597 lines
12 KiB
CSS
/**
|
|
* Copyright 2025 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/* Prevent layout shift from scrollbar appearing/disappearing */
|
|
html {
|
|
scrollbar-gutter: stable;
|
|
}
|
|
|
|
/* Index page styling */
|
|
|
|
.md-grid {
|
|
max-width: 80%;
|
|
}
|
|
|
|
.footer {
|
|
padding-bottom: 30vh;
|
|
}
|
|
|
|
.centered-logo-text-group {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 1.5em;
|
|
margin-bottom: 0.5em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.centered-logo-text-group img {
|
|
height: auto;
|
|
}
|
|
|
|
.centered-logo-text-group h1 {
|
|
margin: 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.install-command-container {
|
|
max-width: 600px;
|
|
margin: 2.5em auto;
|
|
padding: 1.5em 2em;
|
|
background-color: var(--md-code-bg-color, #f5f5f5);
|
|
border-radius: 8px;
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
|
|
border-left: 5px solid var(--md-primary-fg-color, #526cfe);
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.install-command-container p {
|
|
font-size: 1.1em;
|
|
color: var(--md-default-fg-color);
|
|
margin-bottom: -10px;
|
|
margin-top: -10px;
|
|
}
|
|
|
|
.install-command-container p code {
|
|
font-size: 1.1em;
|
|
font-weight: 600;
|
|
padding: 0.3em 0.6em;
|
|
background-color: var(--md-code-fg-color--light);
|
|
text-align: center;
|
|
border-radius: 4px;
|
|
display: inline-block;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Centered install tabs */
|
|
|
|
#centered-install-tabs .tabbed-labels {
|
|
display: flex;
|
|
justify-content: center;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Copy page button */
|
|
|
|
button.md-content__button {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button.md-content__button:hover svg {
|
|
color: var(--md-accent-fg-color);
|
|
}
|
|
|
|
/* YouTube video grid */
|
|
|
|
.video-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 20px;
|
|
margin-top: 1.5em;
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
.video-item {
|
|
flex: 0 1 calc(33.333% - 13.333px);
|
|
box-sizing: border-box;
|
|
min-width: 250px;
|
|
}
|
|
|
|
.video-container {
|
|
position: relative;
|
|
padding-bottom: 56.25%;
|
|
height: 0;
|
|
overflow: hidden;
|
|
max-width: 100%;
|
|
background: #f0f0f0;
|
|
border-radius: 4px;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.video-container iframe {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: 0;
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.video-item {
|
|
flex: 0 1 calc(50% - 10px);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.video-item {
|
|
flex: 0 1 100%;
|
|
}
|
|
}
|
|
|
|
/* YouTube icon */
|
|
|
|
.youtube-red-icon svg {
|
|
fill: #FF0000 !important;
|
|
}
|
|
|
|
/* Header styles */
|
|
|
|
@media screen and (max-width: 76.1875em) {
|
|
.md-header__topic .md-ellipsis {
|
|
display: none;
|
|
}
|
|
|
|
.md-header__topic::before {
|
|
content: "ADK";
|
|
display: block;
|
|
padding-left: 0.6rem;
|
|
}
|
|
}
|
|
|
|
.md-header__title {
|
|
flex-shrink: 1 !important;
|
|
min-width: 120px !important;
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
/* Constrain header right edge and search bar width on desktop */
|
|
@media screen and (min-width: 60em) {
|
|
.md-header__inner {
|
|
padding-right: 5rem;
|
|
}
|
|
.md-search__form {
|
|
max-width: 12rem;
|
|
}
|
|
}
|
|
|
|
/* Language SDK icons in header */
|
|
.lang-header-repos {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: nowrap;
|
|
margin-right: 1rem;
|
|
}
|
|
|
|
/* Language SDK icon links */
|
|
.lang-repos {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.lang-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
text-decoration: none;
|
|
color: var(--md-default-fg-color);
|
|
padding: 6px 6px;
|
|
border-radius: 4px;
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.lang-item:hover {
|
|
background-color: rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.lang-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
filter: grayscale(1);
|
|
transition: filter 0.15s ease;
|
|
}
|
|
|
|
.lang-item:hover .lang-icon {
|
|
filter: grayscale(0);
|
|
}
|
|
|
|
.lang-label {
|
|
font-size: 0.55rem;
|
|
font-weight: 500;
|
|
color: var(--md-default-fg-color--light);
|
|
white-space: nowrap;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Responsive: hide labels on medium screens */
|
|
@media (max-width: 1100px) {
|
|
.lang-label {
|
|
display: none;
|
|
}
|
|
.lang-item {
|
|
padding: 4px;
|
|
}
|
|
}
|
|
|
|
/* Responsive: hide icons entirely on small screens */
|
|
@media (max-width: 700px) {
|
|
.lang-repos {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* Navigation section titles */
|
|
|
|
nav.md-nav--primary .md-nav__item--section>.md-nav__link {
|
|
color: #1565C0;
|
|
font-weight: bold;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
/* Community Resources cards */
|
|
|
|
.resource-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 1.5rem;
|
|
margin: 2rem 0;
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.resource-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.resource-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.resource-card {
|
|
background: #ffffff;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 12px;
|
|
text-decoration: none !important;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
|
|
}
|
|
|
|
.resource-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
|
border-color: #4285F4;
|
|
}
|
|
|
|
.card-image-wrapper {
|
|
width: 100%;
|
|
aspect-ratio: 16/9;
|
|
background-color: #f0f4f8;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.card-image-wrapper img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.card-content {
|
|
padding: 1.0rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.card-content .type {
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
color: #4285F4;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.card-content h3 {
|
|
font-size: 0.9rem;
|
|
color: #1a202c;
|
|
margin: 0;
|
|
}
|
|
|
|
.card-content p {
|
|
font-size: 0.8rem;
|
|
color: #4a5568;
|
|
line-height: 1.6;
|
|
margin-top: 0.75rem;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.translation-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
display: grid;
|
|
gap: 1rem;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
}
|
|
|
|
.translation-list a {
|
|
display: block;
|
|
padding: 1rem 1.5rem;
|
|
border-radius: 8px;
|
|
background: #f7fafc;
|
|
border: 1px solid #e2e8f0;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
font-size: 0.8rem;
|
|
color: #2d3748;
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
|
|
.translation-list a:hover {
|
|
background: white;
|
|
border-color: #4285F4;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* Tool cards */
|
|
|
|
.tool-card-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.tool-card {
|
|
width: 280px;
|
|
padding-left: 10px;
|
|
padding-right: 5px;
|
|
background: #ffffff;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 12px;
|
|
text-decoration: none !important;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
overflow: hidden;
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
|
|
}
|
|
|
|
.tool-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
|
border-color: #4285F4;
|
|
}
|
|
|
|
.tool-card-image-wrapper {
|
|
width: 64px;
|
|
height: 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: transparent;
|
|
padding: 0.5rem;
|
|
box-sizing: border-box;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tool-card-image-wrapper img {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
width: auto;
|
|
height: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.tool-card-content {
|
|
padding: 0.8rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.tool-card-content h3 {
|
|
font-size: 0.8rem;
|
|
font-weight: bold;
|
|
color: #1a202c;
|
|
margin: 0;
|
|
}
|
|
|
|
.tool-card-content p {
|
|
font-size: 0.75rem;
|
|
color: #4a5568;
|
|
line-height: 1.5;
|
|
margin-top: 0.2rem;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
/* Dark mode styles */
|
|
|
|
[data-md-color-scheme="slate"] nav.md-nav--primary,
|
|
[data-md-color-scheme="slate"] .md-sidebar--primary,
|
|
[data-md-color-scheme="slate"] .md-sidebar--primary .md-sidebar__scrollwrap,
|
|
[data-md-color-scheme="slate"] .md-sidebar--primary .md-sidebar__inner {
|
|
background-color: var(--md-default-bg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-header,
|
|
[data-md-color-scheme="slate"] .md-header__inner {
|
|
background-color: var(--md-default-bg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-header,
|
|
[data-md-color-scheme="slate"] .md-header * {
|
|
color: var(--md-default-fg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-header svg,
|
|
[data-md-color-scheme="slate"] .md-header path {
|
|
fill: var(--md-default-fg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-search__input {
|
|
color: var(--md-default-fg-color);
|
|
background-color: var(--md-default-bg-color);
|
|
border-color: var(--md-default-fg-color--light);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-search__input::placeholder {
|
|
color: var(--md-default-fg-color--light);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-search__icon svg,
|
|
[data-md-color-scheme="slate"] .md-search__icon path {
|
|
fill: var(--md-default-fg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .resource-card,
|
|
[data-md-color-scheme="slate"] .tool-card {
|
|
background: var(--md-default-bg-color);
|
|
border-color: var(--md-default-fg-color--lightest);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .card-content h3,
|
|
[data-md-color-scheme="slate"] .tool-card-content h3,
|
|
[data-md-color-scheme="slate"] .translation-list a {
|
|
color: var(--md-default-fg-color);
|
|
background: var(--md-default-bg-color);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .card-content p,
|
|
[data-md-color-scheme="slate"] .tool-card-content p {
|
|
color: var(--md-default-fg-color--light);
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] nav.md-nav--primary .md-nav__item--section>.md-nav__link {
|
|
color: var(--md-primary-fg-color);
|
|
}
|
|
|
|
/* Catalog filter buttons */
|
|
.catalog-filter-bar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 24px;
|
|
align-items: center;
|
|
}
|
|
.catalog-filter-label {
|
|
font-family: "Google Sans", sans-serif;
|
|
font-size: 0.84rem;
|
|
font-weight: 700;
|
|
color: #5f6368;
|
|
padding-right: 4px;
|
|
}
|
|
[data-md-color-scheme="slate"] .catalog-filter-label {
|
|
color: var(--md-default-fg-color--light);
|
|
}
|
|
.catalog-filter-btn {
|
|
padding: 8px 20px;
|
|
border: none;
|
|
border-radius: 20px;
|
|
background: #e8eef6;
|
|
color: #3c4043;
|
|
cursor: pointer;
|
|
font-family: "Google Sans", sans-serif;
|
|
font-size: 0.84rem;
|
|
font-weight: 500;
|
|
transition: background 0.15s ease, color 0.15s ease;
|
|
}
|
|
.catalog-filter-btn:hover {
|
|
background: #dae2ee;
|
|
}
|
|
.catalog-filter-btn.active {
|
|
background: #1a73e8;
|
|
color: #ffffff;
|
|
}
|
|
.catalog-filter-btn.active:hover {
|
|
background: #1765cc;
|
|
}
|
|
[data-md-color-scheme="slate"] .catalog-filter-btn {
|
|
background: #2d3748;
|
|
color: #c9d1d9;
|
|
}
|
|
[data-md-color-scheme="slate"] .catalog-filter-btn:hover {
|
|
background: #374151;
|
|
}
|
|
[data-md-color-scheme="slate"] .catalog-filter-btn.active {
|
|
background: #4285F4;
|
|
color: #ffffff;
|
|
}
|
|
[data-md-color-scheme="slate"] .catalog-filter-btn.active:hover {
|
|
background: #3b78de;
|
|
}
|
|
|
|
/* ========================
|
|
ANNOUNCEMENT BANNER
|
|
Adapts to light/dark via [data-md-color-scheme].
|
|
======================== */
|
|
[data-md-color-scheme="default"] .md-banner {
|
|
background: #1e293b;
|
|
color: #e2e8f0;
|
|
}
|
|
|
|
[data-md-color-scheme="default"] .md-banner a {
|
|
color: #93c5fd;
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-banner {
|
|
background: #1e1b4b;
|
|
color: #c7d2fe;
|
|
}
|
|
|
|
[data-md-color-scheme="slate"] .md-banner a {
|
|
color: #a5b4fc;
|
|
}
|
|
|
|
.md-banner {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.md-banner .announce-item {
|
|
display: flex; align-items: center; justify-content: center;
|
|
gap: 8px; flex-wrap: wrap;
|
|
}
|
|
.md-banner .announce-item a {
|
|
text-decoration: none; font-weight: 500; white-space: nowrap;
|
|
}
|
|
.md-banner .announce-item a:hover { text-decoration: underline; }
|
|
|
|
@media (max-width: 768px) {
|
|
.md-banner {
|
|
text-align: center;
|
|
}
|
|
.md-banner .announce-item {
|
|
display: inline;
|
|
}
|
|
}
|