about summary refs log tree commit diff
path: root/kittybox-rs/companion-lite/index.html
blob: e494cd9b2838038b72ca2e23832d9b8e43cf63fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Kittybox-Micropub debug client</title>
        <link rel="stylesheet" href="./style.css">
        <script type="module" src="./main.js"></script>
    </head>
    <body>
      <noscript>
        <h1 class="header">Kittybox Companion (Lite)</h1>
        <p>I'm sorry, Kittybox Companion requires JavaScript to work.</p>

        <p>This is a requirement due to multiple interactive features present in Kittybox, such as support for multiple-entry form fields, interactive login sequence and more.</p>

        <p>However, the Micropub standard is extremely flexible, and if you happen to have a token, you can publish articles, notes, likes, follows and more by sending requests directly to the Micropub endpoint.</p>

        <p><a href="https://micropub.spec.indieweb.org/">The Micropub spec is defined here.</a> Good luck!</p>
      </noscript>

      <div class="view" id="unauthorized" style="display:none">
        <form action="#" id="indieauth">
          <label for="me">Your website URL:</label>
          <input id="me" name="me" type="url">
          <input type="submit">
        </form>
      </div>

      <div class="view" id="authorizing" style="display:none">
        <p>Performing the authorization dance...</p>
      </div>

      <div class="view" id="authorized" style="display:none">
        <form action="/.kittybox/micropub" method="POST" id="micropub">
          <fieldset>
            <legend>Post details:</legend>
            <section>
              <label for="name">Name (leave blank for an unnamed post):</label>
              <input id="name" type="text">
            </section>
            <section>
              <label for="content">Content:</label>
              <textarea id="content" placeholder="Your post's text goes here"></textarea>
            </section>
            <section>
              <label for="category">Categories (separeted by commas):</label>
              <input id="category" type="text">
            </section>
            <fieldset>
              <legend>Channels</legend>
              <section>
                <input type="radio" id="no_channel" name="channel_select" checked value="">
                <label for="no_channel">Default channel only</label>
              </section>

              <section>
                <input type="radio" id="select_channels" name="channel_select" value="on">
                <label for="select_channels">Select channels manually</label>
              </section>
              
              <fieldset id="channels" style="display: none">
                <legend>Available channels:</legend>
                <template id="channel_selector">
                  <section>
                    <input type="checkbox" name="channel" id="" value="">
                    <label for=""></label>
                  </section>
                </template>
                <div id="channels_target"></div>
              </fieldset>
            </fieldset>
          </fieldset>
          <input type="submit">
        </div>
      </main>
    </body>
</html>