Files
website/static/css/style_apiref.css
Qiming Teng 162e5edb39 Clean up shared assets for API reference
This PR promotes the CSS, JS and FONTS files used by API reference to
the `static/css`, `static/js` and `static/fonts` directories
respectively. The intent is that for future releases, when generating
API reference docs, only the `index.html` and `navData.js` files need to
be copied from the generator tools.

Details of changes:

- `jquery-3.2.1.min.js` file is replaced by `jquery-3.3.1.min.js` to
  align with the version used by Docsy. We can investigate in the future
  whether this can be shared. Converging to the same version at least
  can reduce the risks of compatibility.
- `jquery.scrollTo.min.js` moved to `static/js` file and renamed to
  `jquery.scrollTo-2.1.2.min.js` so we know the version from file name.
- `scroll.js` moved to `static/js` and renamed to `scroll-apiref.js` to
  siginify that it is used by API reference.
- A `README.md` file is added to `static/js` directory for describing
  the purposes of the these files.
- `bootstrap.min.css` moved to `static/css` and renamed to
  `bootstrap-4.3.1.min.css` so that it can be shared and its version can
  be easily discovered.
- `font-awesome.min.css` moved to `static/css` and renamed to
  `fontawesome-4.7.0.min.css` for the same reason.
- `stylesheet.css` moved to `static/css` and renamed to
  `style_apiref.css` to siginify its purpose.
- A `README.md` file is added to `static/css` directory for describing
  the purposes of the these files.
- FontAwesome fonts files moved to `static/fonts` so that they can be
  shared across API reference versions.
- Current API reference (1.18) is modified to reference the relocated
  files. Upstream generator change on the way
  (kubernetes-sigs/reference-tools/#161).

Related: #22016, #22023, #22041, #22024, #22064
2020-07-05 13:43:03 +08:00

230 lines
4.0 KiB
CSS

/*
Kubernetes colors
kubernetes blue - rgb(50, 109, 230)
dark blue - rgb(51, 113, 227)
dark grey - rgb(48, 48, 48)
light grey - rgb(161, 160, 158)
*/
/* User agent CSS overrides */
#sidebar-wrapper ul, #sidebar-wrapper li {
margin-left: 10px;
padding-left: 0;
}
.body-content hr {
margin: 2em 0;
border-top: 2px solid dimgrey;
border-bottom: 2px solid antiquewhite;
}
.body-content table {
margin-bottom: 1em;
overflow: auto;
}
.body-content table th, .body-content table td {
text-align: left;
vertical-align: top;
line-height: 1.5;
}
.body-content table th {
padding: 15px 20px;
border-bottom: 1px solid lightsteelblue;
vertical-align: bottom;
}
.body-content table td {
padding: 10px;
}
.body-content table tr:last-child {
border-bottom: 1px solid lightsteelblue;
}
.body-content table tr:nth-child(odd) > td {
background-color: WhiteSmoke;
}
.body-content table tr:nth-child(even) > td {
background-color: Gainsboro;
}
.body-content dt {
font-weight: bold;
}
.body-content dd {
margin-left: 15px;
}
.body-content p, .body-content li, .body-content dt, .body-content dd {
line-height: 1.6;
margin-top: 0;
}
/* Brodoc CSS */
body > #wrapper {
display: block;
padding-bottom: 500px;
}
#sidebar-wrapper {
display: block;
height: 100%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: whitesmoke;
border-right: 2px solid slategrey;
overflow-x: auto;
padding-top: 60px;
}
#sidebar-wrapper a {
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 5px;
}
#sidebar-wrapper ul {
list-style: none;
}
#sidebar-wrapper a.selected {
font-style: bold;
color: whitesmoke;
border: 1px solid rgb(161, 160, 158);
background-color: rgb(51, 113, 227);
border-radius: 5px;
}
#sidebar-wrapper .strong-nav {
font-family: monospace;
font-weight: bold;
}
#sidebar-wrapper .nav-level-1.strong-nav {
margin-top: 25px;
}
#sidebar-wrapper .copyright {
padding-left: 10px;
padding-top: 50px;
padding-bottom: 50px;
text-decoration: underline;
}
#page-content-wrapper {
padding-top: 60px;
}
#page-content-wrapper table tr td:first-child {
white-space: pre;
}
.body-content h1, .body-content h2 {
clear: both;
border-bottom: 3px solid lightslategrey;
padding-top: 20px;
}
.body-content > h3, .body-content > h4, .body-content > h5, .body-content > h6, .body-content > p, .body-content > aside, .body-content > ul > li, .body-content > ul > li {
padding-top: 20px;
}
.body-content table tr td:not(:first-child) {
overflow-wrap: break-word;
word-wrap: break-word;
}
.body-content table tr td a {
word-break: break-word;
}
.body-content p code {
text-overflow: ellipsis;
color: #802060;
display: inline-block;
font-size: smaller;
word-break: break-word;
}
.body-content blockquote {
border-left: 0;
border-radius: 5px;
}
.body-content pre.code-block {
margin-top: 5px;
margin-bottom: 5px;
}
.body-content blockquote p, .body-content pre {
color: black;
font-size: 13px;
}
.body-content blockquote.code-block {
background: Wheat;
}
.body-content pre.code-block code {
word-wrap: normal;
white-space: pre;
}
.body-content code {
color: Brown !important;
}
.code-block {
display: none;
width: 60%;
float: left;
clear: right;
}
.code-block.active {
display: initial;
}
#code-tabs-wrapper {
width: 55%;
height: 60px;
/* position: fixed; */
top: 0;
right: 0;
}
#code-tabs-wrapper .code-tab-list {
float: right;
margin-top: 0;
padding: 0 10px;
}
#code-tabs-wrapper .code-tab {
color: white;
/* display: inline-block; */
padding: 0 30px;
background: rgb(48, 48, 48);
border: 1px solid rgb(161, 160, 158);
border-radius: 5px;
}
#code-tabs-wrapper .tab-selected {
background: rgb(51, 113, 227);
font-style: bold;
border-radius: 5px;
}
.side-nav a {
color: black;
}