aboutsummaryrefslogtreecommitdiff
path: root/views/index.pug
blob: 69e2abab63a187761a6e322d4712a3fc572858dc (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
78
79
80
81
82
83
84
html
  head
    title='Urushi Counter'
    meta(name='viewport', content='width=device-width, initial-scale=1')
    link(rel='icon', type='image/png', href='favicon.png')
    link(rel='stylesheet', href='https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/light.min.css')

  body
    .tool
      code #{site}/get/@
      input#name(type='text', placeholder=':name', style='display: inline-block; width: 80px; height: 1.4em; line-height: 1.4em; margin: 0 4px; vertical-align: middle;')
      code ?theme=
      select#theme(style='display: inline-block; height: 1.6em; line-height: 1.6em; font-size: 14px; margin: 0 4px; padding: 0 4px; vertical-align: middle;')
        option(value='urushi') urushi
        option(value='asoul') asoul
        option(value='moebooru') moebooru
        option(value='moebooru-h') moebooru-h
        option(value='rule34') rule34
        option(value='gelbooru') gelbooru
        option(value='gelbooru-h') gelbooru-h
      button#get(style='margin: 10px 0;') Get
      img#result(style='display: block;')

      script.
        var btn = document.getElementById('get'),
            img = document.getElementById('result')

        btn.addEventListener('click', function() {
          var name = document.getElementById('name'),
              themeEl = document.getElementById('theme')
          var text = name.value ? name.value.trim() : ''
          var theme = themeEl.value || 'moebooru'
          if(!text) {
            alert('Please input counter name.')
            return
          }

          img.src = '#{site}/get/@' + text + '?theme=' + theme
        })

    h2 Usage
    p Replace <code>:example</code> with your counter's handle.

    h5 HTML
    code &lt;img src="#{site}/get/@:example" alt=":example" />

    h5 Markdown
    code ![:example](#{site}/get/@:example)

    br
    br

    h2 Example
    p <a href="#{site}/get/@index?theme=urushi" target="_blank"><code>#{site}/get/@index?theme=urushi</code></a>

    p <img src="#{site}/get/@index?theme=urushi" alt="Urushi Counter" />

    details
      summary(style='display: inline-block;')
        h3(style='display: inline-block; cursor: pointer; margin-bottom: 0;') More Examples (Click to Expand)

      h3
        a(href='https://space.bilibili.com/703007996' target="_blank") A-SOUL
      <img src="#{site}/get/@demo?theme=asoul" alt="A-SOUL" />

      h3
        a(href='https://github.com/moebooru/moebooru' target="_blank") Moebooru
      <img src="#{site}/get/@demo?theme=moebooru" alt="Moebooru" />

      h3
        a(href='https://github.com/moebooru/moebooru' target="_blank") Moebooru (Hentai)
      <img src="#{site}/get/@demo?theme=moebooru-h" alt="Moebooru (Hentai)" />

      h3
        a(href='https://rule34.xxx/' target="_blank") Rule 34 (NSFW)
      <img src="#{site}/get/@demo?theme=rule34" alt="Rule 34" />

      h3
        a(href='https://gelbooru.com/' target="_blank") Gelbooru (NSFW)
      <img src="#{site}/get/@demo?theme=gelbooru" alt="Gelbooru" />

      h3
        a(href='https://gelbooru.com/' target="_blank") Gelbooru (Hentai)
      <img src="#{site}/get/@demo?theme=gelbooru-h" alt="Gelbooru (Hentai)" />