summaryrefslogtreecommitdiff
path: root/qutebrowser/html/settings.html
blob: 62b424a59bdf620275996fb405f768c6bc64812a (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
{% extends "base.html" %}

{% block script %}
var cset = function(option, value) {
  // FIXME:conf we might want some error handling here?
  var url = "qute://settings/set?option=" + encodeURIComponent(option);
  url += "&value=" + encodeURIComponent(value);
  var xhr = new XMLHttpRequest();
  xhr.open("GET", url);
  xhr.send();
}
{% endblock %}

{% block style %}
table { border: 1px solid grey; border-collapse: collapse; }
pre { margin: 2px; }
th, td { border: 1px solid grey; padding: 0px 5px; }
th { background: lightgrey; }
th pre { color: grey; text-align: left; }
input { width: 98%; }
.setting { width: 75%; }
.value { width: 25%; text-align: center; }
.noscript, .noscript-text { color:red; }
.noscript-text { margin-bottom: 5cm; }
.option_description { margin: .5ex 0; color: grey; font-size: 80%; font-style: italic; white-space: pre-line; }
{% endblock %}

{% block content %}
<noscript><h1 class="noscript">View Only</h1><p class="noscript-text">Changing settings requires javascript to be enabled!</p></noscript>
<header><h1>{{ title }}</h1></header>
<table>
    <tr>
        <th>Setting</th>
        <th>Value</th>
    </tr>
  {% for option in configdata.DATA.values() if not option.no_autoconfig %}
    <tr>
      <!-- FIXME: convert to string properly -->
      <td class="setting">{{ option.name }} (Current: {{ confget(option.name) | string |truncate(100) }})
        {% if option.description %}
          <p class="option_description">{{ option.description|e }}</p>
        {% endif %}
      </td>
      <td class="value">
        <input type="text"
          id="input-{{ option.name }}"
          onblur="cset('{{ option.name }}', this.value)"
          value="{{ confget(option.name) }}">
        </input>
      </td>
    </tr>
  {% endfor %}
</table>

{% endblock %}