UNPKG

@curveball/browser

Version:

Automatic API browser generator. A middleware that turns your JSON responses into HTML if accessed by a browser.

366 lines (306 loc) 5.92 kB
/* Palette generated by Material Palette - materialpalette.com/light-blue/deep-orange */ :root { --dark-primary-color : #0288D1; --default-primary-color : #03A9F4; --light-primary-color : #B3E5FC; --text-primary-color : #FFFFFF; --accent-color : #FF5722; --dark-accent-color : #D84315; --primary-text-color : #212121; --secondary-text-color : #757575; --divider-color : #BDBDBD; --warning-color : #F44336; } body, pre, h1, h2, h3, h4, p, table, ul, ol { margin: 0; padding: 0; } h1 { font-weight: 300; font-size: 2em; } body { font-size: 16px; font-family: "Roboto", "Helvetica", "Ubuntu Sans", "Arial", sans-serif; background: #FAFAFA; font-weight: 300; box-sizing: border-box; color: #212121; } header { /* background: #03A9F4; */ height: 30px; color: var(--dark-primary-color); padding: 2rem; display: flex; box-shadow: 0 1px 0 0 #F5F5F5; position: sticky; top: 0; background: white; z-index: 1; } header h1 { flex: 1; color: inherit; } header h1 a { color: inherit; text-decoration: none; box-shadow: 0 1px 0 0 currentColor; transition: box-shadow .25s; } header h1 a:hover { box-shadow: 0 1px 0 0 transparent; } main { padding: 2rem; } /* main */ main a { color: var(--default-primary-color); transition: text-decoration .5s; } main a:hover { color: var(--dark-primary-color); text-decoration-color: transparent; } main a:visited { color:#673AB7} main a:visited:hover { color:#9C27B0} h2 { margin: 0; padding: 1ex .5rem; font-weight: 300; font-size: 200%; /* border-top: 1px solid #BDBDBD; */ } * + h2 { margin: 2em 0 0; border-top: 1px solid transparent; } code { font-family: Monaco, "Lucida Console", "Ubuntu Mono", monospace; padding: 3px; border: 1px dashed #ccc; } code.hljs { padding: 1rem; font-size: inherit; border: 0; background: #2d2d2d; border-radius: .5ex; color: #cccccc; display: block; overflow-x: auto; } table { border-collapse: collapse; margin: 1rem 0; display: flex; flex: 1; } th, td { font-size: 1em; text-align: left; vertical-align: top; padding: 0 1.5ex; line-height: 2.5em; transition: background .05s; /* border-left: 1px solid #eee; */ } tr:not(:last-child) { border-bottom: 1px solid #E0E0E0; } tr:hover td:not([rowspan]), tr:hover td[rowspan="1"] { background: #F5F5F5; } td a { display: block; } /* Navigation bar */ nav { padding: 1em 2rem; word-spacing: 5px; display: flex; box-shadow: 0 1px 1ex 0 #0000001f; position: sticky; top: 5.9rem; background: white; } nav h3 { word-spacing: 0; } nav ul { list-style: none; display: block; word-spacing: 1px; } nav ul:nth-of-type(2) { margin-left: auto; } nav li { display: inline; } nav a { display: inline-block; border-radius: 3px; background: var(--default-primary-color); padding: 6px; text-decoration: none; color: #fff; font-size: 15px; line-height: 20px; transition: background-color .25s; font-weight: 500; } nav a:hover { background: var(--dark-primary-color); } nav a img { width: 22px; filter: invert(100%); vertical-align: middle; margin-top: -2px; } .link-badge { --color: var(--text-primary-color); color: var(--color); background: transparent; border-radius: .5ex; border: 1px solid var(--color); padding: .5ex 1ex; font-weight: bold; margin-left: .5ex; margin-right: .5ex; } .link-badge.status-deprecated, .link-badge.status-gone { --color: var(--warning-color); } .link-badge.link-badge.status-deprecated::before { content: '\26A0'; margin-right: 1ex; } /* Alternate links */ nav .alternate { display: flex; align-items: center; padding-left: 30px; } nav .alternate h3 { font-weight: 300; padding-right: 10px; } nav .alternate a { font-size: 90%; font-weight: 700; background: #607D8B; } nav .alternate .type-csv { background: #4CAF50; } nav .alternate .type-feed { background: #FF9800; } /* search */ form.search { display: flex; border: 1px solid #0288D1; border-radius: 10px; padding: 2px 5px; } form.search input { background: none; border: none; width: 100px; transition: width 0.2s; } form.search input:focus { width: 200px; } /* Links table */ table.links td a { display: block; max-width: 700px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Body */ .body-markdown { padding: 25px; } .body-markdown > * { padding: 0; border: 0; margin: 10px 0 20px; font-size: 18px; } .body-markdown h1 { font-size: 40px; } .body-markdown h2 { font-size: 30px; } .body-markdown h3 { font-size: 25px; } .body-markdown h4 { font-size: 20px; } .body-markdown ul, .body-markdown ol { margin: 30px; } .body-markdown code { margin-left: 0; } .body-csv { box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12),0 2px 4px -1px rgba(0,0,0,0.3); overflow-x: auto; } .body-csv td { white-space: nowrap; } /* Embedded */ details { margin: 5px 25px 20px; box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12),0 2px 4px -1px rgba(0,0,0,0.3); border: 1px solid #BDBDBD; border-radius: 4px; } details summary { padding: 15px; font-size: 120%; } form.long-form h3 { grid-column: 1 / 3; } form.long-form { padding: 15px; display: grid; grid-template-columns: max-content max-content max-content; grid-gap: 20px; font-size: 18px; max-width: 600px; padding: 20px; margin: 10px; border-radius: 2px; } form.long-form label { grid-column: 1; text-align: right; margin: 0; align-self: center; padding: 0; } form.long-form input, form.long-form button { grid-column: 2; } form.long-form input { background: rgba(0,0,0,.04); border-width: 0 0 1px 0; border-style: solid; border-color: #8c8c8c; padding: 10px; border-radius: 4px 4px 0 0; }