Tweak API documentation page design

This commit is contained in:
2017-12-11 20:45:55 +01:00
parent 837fc8859b
commit d88ef848aa
9 changed files with 33 additions and 47 deletions

View File

@@ -5,18 +5,21 @@
/* Global Definitions */ /* Global Definitions */
.api_doc_details{ .api_doc_details{
border: 2px solid; border-top: 1px solid;
border-radius: 4px; border-bottom: 1px solid;
margin-top: 10px; margin-top: 10px;
margin: 15px -8px 15px -8px;
} }
.api_doc_details > summary { .api_doc_details > summary {
padding: 2px; padding: 2px;
font-family: monospace; font-family: monospace;
} }
.api_doc_details > summary > .method {
display: inline-block;
width: 80px;
}
.api_doc_details > div { .api_doc_details > div {
padding: 5px; padding: 8px;
} }
table{ table{
@@ -44,46 +47,30 @@ h3{
/* GET requests */ /* GET requests */
.api_doc_details.request_get{ .api_doc_details.request_get{
border-color: #0000F0; border-color: rgb(54, 54, 255);
} background-color: rgba(32, 32, 255, 0.2);
.api_doc_details.request_get > summary{
background-color: #000040;
} }
/* POST requests */ /* POST requests */
.api_doc_details.request_post{ .api_doc_details.request_post{
border-color: #009000; border-color: #00d000;
} background-color: rgba(0, 255, 0, 0.05);
.api_doc_details.request_post > summary{
background-color: #004000;
} }
/* DELETE requests */ /* DELETE requests */
.api_doc_details.request_delete{ .api_doc_details.request_delete{
border-color: #B00000; border-color: #B00000;
} background-color: rgba(255, 0, 0, 0.05);
.api_doc_details.request_delete > summary{
background-color: #400000;
} }
/* PUT requests */ /* PUT requests */
.api_doc_details.request_put{ .api_doc_details.request_put{
border-color: #B06000; border-color: #B06000;
} background-color: rgba(255, 128, 0, 0.05);
.api_doc_details.request_put > summary{
background-color: #804000;
} }
/* PATCH requests */ /* PATCH requests */
.api_doc_details.request_patch{ .api_doc_details.request_patch{
border-color: #6000B0; border-color: #6000B0;
background-color: rgba(128, 0, 255, 0.1);
} }
.api_doc_details.request_patch > summary{
background-color: #400080;
}

View File

@@ -10,7 +10,6 @@
<link rel="stylesheet" href="/res/style/listview.css"/> <link rel="stylesheet" href="/res/style/listview.css"/>
<link href='https://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'/> <link href='https://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'/>
<link rel="shortcut icon" href="/res/img/tray32.png"/> <link rel="shortcut icon" href="/res/img/tray32.png"/>
<meta name="theme-color" content="#9FCF6C"/>
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain.png"/> <link rel="icon" sizes="180x180" href="/res/img/pixeldrain.png"/>
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_big.png"/> <link rel="icon" sizes="256x256" href="/res/img/pixeldrain_big.png"/>
@@ -20,16 +19,16 @@
{{template "bgpattern"}} {{template "bgpattern"}}
<meta name="twitter:creator" content="@Fornax96" /> <meta name="theme-color" content="#202020"/>
<meta name="twitter:image" th:content="*{ogImage}" /> <meta name="twitter:image" content="*{ogImage}" />
<meta property="og:title" th:content="*{ogTitle}" /> <meta property="og:title" content="*{ogTitle}" />
<meta property="og:type" th:content="*{ogType}" /> <meta property="og:type" content="*{ogType}" />
<meta property="og:site_name" th:content="*{ogSiteName}" /> <meta property="og:site_name" content="*{ogSiteName}" />
<meta property="og:description" th:content="*{ogDescription}" /> <meta property="og:description" content="*{ogDescription}" />
<meta property="description" th:content="*{description}" /> <meta property="description" content="*{description}" />
<meta property="og:url" th:content="*{ogUrl}" /> <meta property="og:url" content="*{ogUrl}" />
<meta property="og:image" th:content="*{ogImage}" /> <meta property="og:image" content="*{ogImage}" />
<meta property="og:image:url" th:content="*{ogImage}" /> <meta property="og:image:url" content="*{ogImage}" />
<meta property="article:author" content="Fornax96" /> <meta property="article:author" content="Fornax96" />
<link rel="image_src" th:href="*{ogImage}" /> <link rel="image_src" th:href="*{ogImage}" />
</head> </head>

View File

@@ -1,6 +1,6 @@
{{define "api-file-id-delete"}} {{define "api-file-id-delete"}}
<details th:fragment="details" class="api_doc_details request_delete"> <details th:fragment="details" class="api_doc_details request_delete">
<summary>DELETE: /file/{id}</summary> <summary><span class="method">DELETE</span>/file/{id}</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-file-id-download-get"}} {{define "api-file-id-download-get"}}
<details th:fragment="details" class="api_doc_details request_get"> <details th:fragment="details" class="api_doc_details request_get">
<summary>GET: /file/{id}/download</summary> <summary><span class="method">GET</span>/file/{id}/download</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-file-id-get"}} {{define "api-file-id-get"}}
<details th:fragment="details" class="api_doc_details request_get"> <details th:fragment="details" class="api_doc_details request_get">
<summary>GET: /file/{id}</summary> <summary><span class="method">GET</span>/file/{id}</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-file-id-info-get"}} {{define "api-file-id-info-get"}}
<details th:fragment="details" class="api_doc_details request_get"> <details th:fragment="details" class="api_doc_details request_get">
<summary>GET: /file/{id}/info</summary> <summary><span class="method">GET</span>/file/{id}/info</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-file-id-thumbnail-get"}} {{define "api-file-id-thumbnail-get"}}
<details th:fragment="details" class="api_doc_details request_get"> <details th:fragment="details" class="api_doc_details request_get">
<summary>GET: /file/{id}/thumbnail</summary> <summary><span class="method">GET</span>/file/{id}/thumbnail</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-file-post"}} {{define "api-file-post"}}
<details th:fragment="details" class="api_doc_details request_post"> <details th:fragment="details" class="api_doc_details request_post">
<summary>POST: /file</summary> <summary><span class="method">POST</span>/file</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>

View File

@@ -1,6 +1,6 @@
{{define "api-list-post"}} {{define "api-list-post"}}
<details class="api_doc_details request_post"> <details class="api_doc_details request_post">
<summary>POST: /list</summary> <summary><span class="method">POST</span>/list</summary>
<div> <div>
<h3>Description</h3> <h3>Description</h3>
<p> <p>