2017-07-23 00:09:35 +02:00
<h3>Query Parameters</h3>
<div class="row">
<div class="col s12">
<div class="card-panel indigo lighten-5 z-depth-1">
<div class="row">
<div class="col s12 black-text">
<p class="flow-text">Use query parameters to customize your individual embeds out of this world!</p>
2017-09-04 05:40:42 +02:00
<p>Query parameters are in the format of key-value pairs. They are appended after your embed url such that it would look like so: <br><em>https://titanembeds.com/embed/1234567890<strong>?css=1&defaultchannel=81387914189078528&theme=DiscordDark</strong></em></p>
2017-07-23 00:09:35 +02:00
<p>Below is the reference of all the avaliable query parameters that may be used.</p>
2017-11-26 03:03:53 +01:00
{% if "administrate_guild" in request.url %}<p><strong>Modify the input fields to change your query parameters for your embed. Leave a box empty to not use the parameter.</strong></p>{% endif %}
2017-07-23 00:09:35 +02:00
<ul class="collection">
2017-11-26 03:03:53 +01:00
{% for param in constants.QUERY_PARAMETERS %}
2017-07-23 00:09:35 +02:00
<li class="collection-item">
2017-11-26 03:03:53 +01:00
<strong>{{ param.name }}=<{{ param.type }}></strong> <br>
{{ param.description }}
{% if param.options %}
2017-07-23 00:09:35 +02:00
<hr>
<strong>Avaliable Options:</strong>
<ul class="browser-default">
2017-11-26 03:03:53 +01:00
{% for option in param.options %}
<li><strong>{{ option.name }}</strong> {% if option.default %}(default){% endif %}</li>
{% endfor %}
2017-07-23 00:09:35 +02:00
</ul>
<hr>
2017-11-26 03:03:53 +01:00
{% else %}
<br>
{% endif %}
<em>Eg: {{ param.name }}={{ param.example }}</em>
{% if "administrate_guild" in request.url %}
<br>
2018-03-11 20:18:17 +01:00
<input class="queryparam" name="{{ param.name }}" type="text" style="background-color: #F9F8F6;" placeholder="{{ param.example }}">
2017-11-26 03:03:53 +01:00
{% endif %}
2017-08-30 20:48:26 +02:00
</li>
2017-11-26 03:03:53 +01:00
{% endfor %}
2017-07-23 00:09:35 +02:00
</ul>
</div>
2017-11-26 03:03:53 +01:00
{% if "administrate_guild" in request.url %}
<div class="col s12 black-text">
2018-04-26 05:19:40 +02:00
<p class="flow-text">Copy these URL/iframe code after entering the parameters in the form.</p>
2017-11-26 03:03:53 +01:00
<ul class="collection">
<li class="collection-item">
<strong>Embed/Server ID</strong>
<input id="queryparam_guildid" type="text" style="background-color: #F9F8F6;" value="{{ guild['id'] }}">
</li>
<li class="collection-item">
Embed URL after query parameters appled
2018-04-26 05:19:40 +02:00
<input id="queryparam_url" readonly value="{{ url_for("embed.guild_embed", guild_id=guild['id'], _external=True) }}" type="text" onclick="this.setSelectionRange(0, this.value.length)">
</li>
<li class="collection-item">
Embed iFrame after query parameters appled
<input id="queryparam_iframe" readonly type="text" onclick="this.setSelectionRange(0, this.value.length)">
2017-11-26 03:03:53 +01:00
</li>
</ul>
</div>
{% endif %}
2017-07-23 00:09:35 +02:00
</div>
</div>
</div>
2017-11-26 03:03:53 +01:00
</div>
{% if "administrate_guild" in request.url %}
<script type="text/javascript" src="{{ url_for('static', filename='js/query_parameters.js') }}" defer></script>
{% endif %}