UNPKG

@curveball/browser

Version:

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

386 lines (314 loc) 5.93 kB
* { box-sizing: border-box; } body, td, input, th { font-family: "Roboto", "Ubuntu", sans-serif; color: #444; } .hljs, code { font-family: 'JetBrains Mono', 'Fira Code', 'Inconsolata', 'Ubuntu Mono', monospace; } p, td, th, li { line-height: 150%; } body, h1, h2, h3, h4, h5, form, pre { margin: 0; padding: 0; } header { 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); padding: 0 20px 0 90px; color: white; background: #1b1c3c; background-image: url('../../curveball.svg'); background-size: 70px; background-position: 5px center; background-repeat: no-repeat; display: flex; align-items: center; } h1 { font-weight: 300; line-height: 100px; vertical-align: middle; flex: 1; display: flex; justify-content: space-between; } h2 { font-weight: 300; } table { border-collapse: collapse; } table td, table th { border-bottom: 1px solid #ddd; padding: 5px 50px 5px 0; } table th { text-align: left; } h1 .divider { display: none; } header a { color: white; text-decoration: none; } ul.button-actions { display: flex; flex-direction: row; gap: 8px; list-style: none; margin: 0; padding: 0; } /* search */ form.search { background: #fff5; display: flex; border-radius: 10px; padding: 2px 5px; margin-left: 20px } form.search img { filter: invert(100%); } form.search input { background: none; border: none; width: 100px; transition: width 0.2s; color: white; font-size: 16px; } form.search input:focus { width: 200px; } nav.top-nav { box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14),0 1px 2px 0 rgba(0,0,0,0.12),0 2px 2px -1px rgba(0,0,0,0.3); height: 60px; padding: 2px 15px; } nav { display: flex; justify-content: space-between; } nav a { color: white; text-decoration: none; padding: 3px; min-width: 100px; display: inline-block; border-radius: 3px; } nav a:hover { box-shadow: 1px 1px 2px #ccc; } nav ul { list-style: none; display: flex; margin: 0; padding: 0; } nav ul:first-child { flex: 1; } nav li { padding: 10px 0; line-height: 100%; } nav li a { display: flex; flex-direction: column; align-items: center; color: #555; text-decoration: none; font-size: 80%; } nav li a img { height: 16px; margin-bottom: 5px; } nav .alternate { display: flex; align-items: center; padding-left: 30px } nav .alternate h3 { font-weight: 300; padding-right: 10px; font-size: 16px; } nav .alternate a { min-width: 1px; margin-left: 3px; font-size: 90%; background: #555; display: inline-block; border-radius: 2px; padding: 6px; } nav .alternate .type-csv { background: #057212; } nav .alternate .type-feed { background: #ff6600; } main { padding: 10px 30px 10px 30px; } main h2 { padding: 20px 0 15px; } /* A link for definitions. This usually shows up softer */ a.definition { text-decoration: underline; text-decoration-style: dotted; color: inherit; } /* These are little badges that show up next to links, like the methods they support or 'deprecated' */ .link-badge { background: #666; color: white; border-radius: 3px; padding: 2px 4px; font-weight: bold; margin-left: 3px; } .status-deprecated { background: #d93b3b; } .status-gone { background: #d93b3b; } .status-experimental { background: #3e57d6; } .method-post { background: #2365a8; } .method-get { background: #5c945f; } .method-put { background: #469e98; } .method-delete { background: #d93b3b; } .method-patch { background: #7a36ad; } .method-search { background: #9c1497; } .method-query { background: #aaaa44; } main code { border-radius: 2px; font-size: 18px; } /* Body */ .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 { overflow-x: scroll; } .body-csv table { 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, .body-csv th { white-space: nowrap; padding: 5px 50px 5px 5px; } /* Embedded */ details { margin: 5px 0 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; } form.long-form h3, form.long-form h1 { grid-column: 1 / 3; font-size: 16px; } form.long-form { padding: 0 0 15px; display: grid; grid-template-columns: max-content max-content max-content; grid-gap: 20px; font-size: 16px; max-width: 600px; padding: 20px 0; margin: 0; border-radius: 2px; } form.long-form .checkboxes { grid-column: 2 / 3; } form.long-form label { grid-column: 1; text-align: right; margin: 0; align-self: center; padding: 0; } form.long-form input, form.long-form .buttonRow { 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; } button { color: white; border: 0px solid; min-height: 10px; padding: 0 25px; line-height: 2; border-radius: .25ex; } .hljs ul { list-style: none; padding-left: 10px; margin: 0; } .hljs ul li { padding-left: 10px; margin: 0; line-height: normal; } .hljs a { color: inherit; } .hljs details { border: 0; margin: 0; padding: 0; box-shadow: none; } .hljs summary { margin: 0; padding: 0; } .hljs details[open] .hidden-when-open { display: none; } .hljs summary .teaser { border: 1px dotted #ccc; } .hidden-copy-paste { font-size: 0; }