aboutsummaryrefslogtreecommitdiff
path: root/static/index.html
blob: 40b1eadc0de10500a3c2bfda7003aa5ed3dd0fc1 (plain)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html>
    <head lang="pt">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
        <style type="text/css" media="screen">
/* Resettings some html properties */
html, body, div, h1, header,section{
	margin: 0;
	padding: 0;
	border: 0;
    font-family: monospace;
}

h1 {
    font-size: 1.25rem;
    color: #fff;
    text-transform: uppercase;
}

ul {
    margin: 0;
}

body {
    font-family: sans-serif;
    background-color: #f4f4f4;
}

header {
    display: flex;
    justify-content: space-between;
    margin: auto;
    margin-bottom: 1em;
    background: #0062cc;
    padding: .75em;
}

nav {
    top: .75em;
    right: .75em;
}

.warning {
  font-size: small;
  color: red;
  visibility: hidden;
}

.btn {
  display: inline-block;
  padding: .1rem .75rem;
  background: #e9ecef;
  border: #343a40 1px solid;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
  color: #000;
  border-radius: 0;
  text-decoration: none;
  transition: 0.5s all;
}

.btn:hover {
    background-color: #fff;
}

nav li {
    display: inline;
    margin: 0 0 0 0;
}

.section {
    justify-content: left;
    margin-bottom: 1em;
    display: flex;
}

.section input {
    max-width: 10em;
}

.form-ctl {
    width: 1.3em;
    height: 1.3em;
    background-color: white;
    border-radius: 0;
    vertical-align: middle;
    border: 1px solid #ddd;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.form-ctl:checked {
    background-color: gray;
}

a {
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  padding-left: 5px;
}

main {
    width: 60%;
    margin: 0 auto;
}

#feedUrl {
    text-overflow: ellipsis;
    max-width: 100%;
    white-space: normal;
    word-break: break-all;
}

@media (width <= 600px) {
    main {
        width: 90%;
    }
}

        </style>
    </head>
    <body>
        <header>
            <h1>Filtro para o Nerdcast</h1>
            <nav>
                <ul>
                    <li>
                        <a class="btn" href="https://git.gabrielgio.me/jnfilter/">Código fonte ➤</a>
                    </li>
                </ul>
            </nav>
        </header>
        <main>
            <div class="section">
                Selecione os quadros:
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="nerdcast" /><a>NerdCast</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="empreendedor" /><a>Empreendedor</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="mamicas" /><a>Canecas de Mamicas</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="english" /><a>Speak English</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="nerdcash" /><a>NerdCash</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="bunker" /><a>Lá do Bunker</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="tech" /><a>NerdTech</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="genera" /><a>Generacast</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="rpg" /><a>NerdCast RPG</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="catar" /><a>Vai te Catar</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="cloud" /><a>Nerd na Cloud</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="contar" /><a>Vou te Contar</a>
            </div>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateList(this)" id="parceiro" /><a>Papo de Parceiro</a>
            </div>
            <hr/>
            <div class="section">
                <input class="form-ctl" type="checkbox" onchange="updateTag(this)" />
                <a>Mudar metadata</a>
            </div>
            <div class="section">
                <p> Caso você use um agregador que gerencie o feed para você
                (como pocketcast), talvez você precise habilitar esta opção para
                mudar o metadata do feed, fazendo assim com que ele seja
                reconhecido como um feed único.
                </p>
            </div>
            <div class="section">
                <a id="feedUrl" href="https://jnfilter.gabrielgio.me?q=mamicas" type="textbox">https://jnfilter.gabrielgio.me</a>
            </div>
        </main>
        <script>
var feedUrl = document.getElementById("feedUrl")
var fields = new Set()
var tag = false 

function updateFeedUrl() {
    if (fields.size == 0) {
        url = "https://jnfilter.gabrielgio.me"
    } else {
        url = "https://jnfilter.gabrielgio.me?q="+[...fields].join(',')
    }

    if (tag) {
        if (fields.size == 0) {
            url += "?tag=true"
        } else {
            url += "&tag=true"
        }
    }

    feedUrl.textContent = url
    feedUrl.href = url
}

function updateList(elem) {
    if (elem.checked){
        fields.add(elem.id)
    } else {
        fields.delete(elem.id)
    }
    updateFeedUrl()
}

function updateTag(elem) {
    tag = elem.checked
    updateFeedUrl()
}
        </script>
    </body>
</html>