Changeset 67 in code for trunk/docs


Ignore:
Timestamp:
Feb 7, 2024, 12:26:14 AM (16 months ago)
Author:
yakumo.izuru
Message:

Fix bugs, many other changes

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

Location:
trunk/docs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/api/index.html

    r66 r67  
    88        </head>
    99        <body id="body">
    10                 <h1 id="header">API Documentation</h1>
    11                 <br><hr>
    12                 <h2 class="get">[GET] /api/translate</h2>
    13                 <h2 class="post">[POST] /api/translate</h2>
    14                 <h3>Description</h3>
    15                 <p>Translation endpoint, input must be URL-encoded (e.g. multi-byte characters, words separated by space)</p>
    16                 <h3>Arguments</h3>
    17                 <ul>
    18                         <li>engine</li>
    19                         <li>from</li>
    20                         <li>text</li>
    21                         <li>to</li>
    22                 </ul>
    23                 <h3>Examples</h3>
    24                 <p><pre><code>GET /api/translate?engine=google&amp;from=auto&amp;to=en&amp;text="sonrisa"</code></pre></p>
    25                 <hr>
    26                 <h2 class="get">[GET] /api/source_languages</h2>
    27                 <h2 class="get">[GET] /api/target_languages</h2>
    28                 <h3>Description</h3>
    29                 <p>Get a JSON array of supported source and target languages for a particular engine</p>
    30                 <h3>Arguments</h3>
    31                 <ul>
    32                         <li>engine</li>
    33                 </ul>
    34                 <h3>Examples</h3>
    35                 <p><pre><code>GET /api/source_languages?engine=google</code></pre></p>
    36                 <p><pre><code>GET /api/target_languages?engine=google</code></pre></p>
    37                 <hr>
    38                 <h2 class="get">[GET] /api/tts</h2>
    39                 <h3>Description</h3>
    40                 <p>Obtain text-to-speech audio files from an engine, provided said engine supports them</p>
    41                 <h3>Arguments</h3>
    42                 <ul>
    43                         <li>engine</li>
    44                         <li>lang</li>
    45                         <li>text</li>
    46                 </ul>
    47                 <h3>Examples</h3>
    48                 <p><pre><code>GET /api/tts?engine=google&amp;lang=en&amp;text="hi"</code></pre></p>
    49                 <hr>
    50                 <h2 class="post">[POST] /switchlanguages</h2>
    51                 <h3>Description</h3>
    52                 <p>Switch between source and target languages, as long as the source language isn't "auto"</p>
    53                 <hr>
     10                <h1>API documentation</h1>
     11                <table border="1" align="center">
     12                        <tr>
     13                                <td>
     14                                        <h2 class="get">[GET] /api/translate</h2>
     15                                        <h2 class="post">[POST] /api/translate</h2>
     16                                        <h3>Description</h3>
     17                                        <p>Translation endpoint, input must be URL-encoded (e.g. multi-byte characters, words separated by space)</p>
     18                                        <h3>Arguments</h3>
     19                                        <ul>
     20                                                <li>engine</li>
     21                                                <li>from</li>
     22                                                <li>text</li>
     23                                                <li>to</li>
     24                                        </ul>
     25                                </td>
     26                        </tr>
     27                        <tr>
     28                                <td>
     29                                        <h2 class="get">[GET] /api/source_languages</h2>
     30                                        <h2 class="get">[GET] /api/target_languages</h2>
     31                                        <h3>Description</h3>
     32                                        <p>Get a JSON array of supported source and target languages for a particular engine</p>
     33                                        <h3>Arguments</h3>
     34                                        <ul>
     35                                                <li>engine</li>
     36                                        </ul>
     37                                </td>
     38                        </tr>
     39                        <tr>
     40                                <td>
     41                                        <h2 class="get">[GET] /api/tts</h2>
     42                                        <h3>Description</h3>
     43                                        <p>Obtain text-to-speech audio files from an engine, provided said engine supports them</p>
     44                                        <h3>Arguments</h3>
     45                                        <ul>
     46                                                <li>engine</li>
     47                                                <li>lang</li>
     48                                                <li>text</li>
     49                                        </ul>
     50                                </td>
     51                        </tr>
     52                        <tr>
     53                                <td>
     54                                        <h2 class="get">[GET] /robots.txt</h2>
     55                                </td>
     56                        </tr>
     57                        <tr>
     58                                <td>
     59                                        <h2 class="post">[POST] /switchlanguages</h2>
     60                                        <h3>Description</h3>
     61                                        <p>Switch between source and target languages, as long as the source language isn't "auto"</p>
     62                                        <p>Must only be called inside the form interface</p>
     63                                </td>
     64                        </tr>
     65                        <tr>
     66                                <td>
     67                                        <h2 class="get">[GET] /version</h2>
     68                                        <h3>Description</h3>
     69                                        <p>Return the software version as a JSON array</p>
     70                                </td>
     71                        </tr>
     72                </table>
    5473        </body>
    5574</html>
  • trunk/docs/index.html

    r66 r67  
    77                <title>Mai | Documentation</title>
    88        </head>
    9         <body id="body">
    10                 <img src="/static/favicon128x128.png" style="text-align: center;">
    11                 <h1 id="header">Documentation</h1>
    12                 <ul id="nav">
    13                         <li><a href="/docs/api">API</a></li>
    14                 </ul>
     9        <body>
     10                <table>
     11                        <tr><td>
     12                                        <table border="1" align="left">
     13                                                <tr>
     14                                                        <td><a href="/docs/api">API</a></td>
     15                                                </tr>
     16                                        </table>
     17                        </tr></td>
     18                        <tr><td>
     19                                        <table border="1" align="center">
     20                                                <tr>
     21                                                        <td>
     22                                                                <p>Welcome to Mai's documentation!<p>
     23                                                                <p>See the menu for the available entries</p>
     24                                                                <p>Anything else is covered by the man pages</p>
     25                                                        </td>
     26                                                </tr>
     27                                        </table>
     28                                </td></tr>
     29                </table>
    1530        </body>
    1631</html>
  • trunk/docs/style.css

    r66 r67  
    1 /*
    2  * Taken from vnpower
    3  */
    4 
    5 * {
    6   box-sizing: border-box; }
    7 
    81body {
    9   top: 0;
    10   margin: 0;
    11   background-color: #1d1f21;
    12   color: white;
    13   font-family: "Open Sans", "Roboto", "Noto Sans", "Noto Sans CJK JP", sans-serif;
    14   line-height: 1.618;
     2        background-color: #f8cfd2;
     3        color: rgb(206, 147, 191);
    154}
    165
    17 h2.get {
    18         color: orange;
     6a, a:visited {
     7        color: rgb(206, 147, 191);
    198}
    209
    21 h2.post {
    22         color: green;
     10@media screen and (prefers-color-scheme: dark) {
     11        body {
     12                background-color: #700000;
     13                color: #ffffff;
     14        }
     15        a, a:visited {
     16                color: #18c018;
     17        }
    2318}
    2419
    25 @media (max-width: 684px) {
    26   body {
    27     font-size: 1rem; } }
    28 
    29 @media (max-width: 382px) {
    30   body {
    31     font-size: 1rem; } }
    32 
    33 a {
    34   color: #81a2be;
    35   text-decoration-color: #81a2be; }
    36 
    37 #header {
    38   width: 100%;
    39   min-width: 320px;
    40   background-color: #282a2e; }
    41 
    42 #header img {
    43   width: 280px; }
    44 
    45 #header-content {
    46   margin: 0 auto;
    47   width: min-content; }
    48 
    49 #nav {
    50   display: flex;
    51   justify-content: center;
    52   background-color: #373b41; }
    53 
    54 #footer {
    55   margin-top: 0.5rem;
    56   text-align: center; }
    57 
    58 #body {
    59   min-height: 75vh;
    60   max-width: 800px;
    61   margin: 1rem auto;
    62   padding: 0 0.6rem; }
    63   #body h1,
    64   #body h2,
    65   #body h3,
    66   #body h4,
    67   #body h5,
    68   #body h6 {
    69     line-height: 1.1;
    70     font-family: sans-serif;
    71     font-weight: 700;
    72     margin-top: 1rem;
    73     margin-bottom: 1rem;
    74     overflow-wrap: break-word;
    75     word-wrap: break-word;
    76     -ms-word-break: break-all;
    77     word-break: break-word; }
    78   #body h1 {
    79     border-bottom: 1px solid #b5bd68;
    80     display: block; }
    81   #body p {
    82     margin-top: 0px;
    83     margin-bottom: 0.5rem; }
    84   #body li > p {
    85     padding: 0;
    86     margin: 0; }
    87   #body small,
    88   #body sub,
    89   #body sup {
    90     font-size: 75%; }
    91   #body img,
    92   #body video {
    93     height: auto;
    94     max-width: 100%;
    95     margin-top: 0.5rem;
    96     margin-bottom: 0.5rem;
    97     box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.12), 0px 2px 2px 0px rgba(0, 0, 0, 0.12), 0px 4px 4px 0px rgba(0, 0, 0, 0.12), 0px 8px 8px 0px rgba(0, 0, 0, 0.12), 0px 16px 16px 0px rgba(0, 0, 0, 0.12); }
    98   #body pre {
    99     background-color: #373b41;
    100     display: block;
    101     padding: 1em;
    102     overflow-x: auto;
    103     margin-top: 0px;
    104     margin-bottom: 0.5rem; }
    105   #body code, #body kbd, #body samp {
    106     padding: 0 0.5em;
    107     background-color: #373b41;
    108     white-space: pre-wrap; }
    109   #body pre > code {
    110     padding: 0;
    111     background-color: transparent;
    112     white-space: pre;
    113     font-size: 1em; }
    114 
     20table {
     21        border-color: white;
     22}
Note: See TracChangeset for help on using the changeset viewer.