-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathconfig-generator.html.twig
84 lines (76 loc) · 2.79 KB
/
config-generator.html.twig
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
<style>
main {
width: 80%;
margin: auto;
}
fieldset#CYPHT_MODULES {
word-break: break-all;
}
#generate,
#reset-all {
margin: auto;
display: block;
margin-bottom: 20px;
}
#result {
height: 600px;
}
</style>
<main>
<h1>Cypht Config Generator</h1>
<blockquote>
Click any of the options below to configure Cypht!<br>
On the bottom of the page you can find a button to generate your .env
</blockquote>
{% for file in site.data.configFiles %}
<details>
<summary class="h4" role="button">
{{file | replace({".php": ""})}}
</summary>
{% for option in site.data.configOptions[file] %}
{% set select = option.inputType == "select" %}
{% set inputId = option.key ~ "_CCGINPUT" %}
<fieldset id="{{option.key}}">
<legend>
<h3>{{option.key}}</h3>
</legend>
<label for="{{inputId}}">{{option.commentHtml}}</label>
{% if option.valueDefault %}<p>Default: {{option.valueDefault}}</p>{% endif %}
{% if not select %}
<input id="{{inputId}}" type="{{option.inputType}}" name="{{option.key}}"
data-default="{{option.valueDefault}}" {% if option.valueDefault %} {% if option.inputType=="checkbox"
and option.valueDefault=="true" %} checked="true" {% else %} value="{{option.valueDefault}}" {% endif %}
{% endif %} />
{% else %}
<select class="btn btn-light text-left" id="{{inputId}}" name="{{option.key}}" data-default="{{option.valueDefault}}">
{% for setValue in option.setValues %}
<option value="{{setValue.value}}">{{setValue.value}} - {{setValue.description}}</option>
{% endfor %}
</select>
{% endif %}
<button class="reset btn btn-light">Reset</button>
</fieldset>
{% endfor %}
</details>
<hr>
{% endfor %}
<hr>
<button class="btn btn-success" id="generate">Generate .env file</button>
<button class="btn btn-light" id="reset-all">Reset all</button>
<p>
Please note that neither <code>allow_session_cache</code> & <code>cache_class</code> are configurable
through here,
as it is not recommended and as such quite advanced usage.
Check <a href="https://github.com/cypht-org/cypht/blob/master/config/app.php">
app.php (@github:cypht-org/cypht)
</a> for more info
</p>
<textarea class="container" id="result"></textarea>
<nav>
<ul>
<a href="https://github.com/cypht-org/cypht-website#cypht-config-generator-generator">
<li>Source code</li>
</a>
</ul>
</nav>
</main>