mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
ui: Create reusable CSS class for collapsible-button
.collapsible-button is used by both "Client Apps" and the "How to verify?" button in backups:verify-ssh-hostkey page. Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
3a6dcbe7a7
commit
9f71c5867e
@ -20,41 +20,39 @@
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{{ title }}</h3>
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h3>{{ title }}</h3>
|
||||
|
||||
<br/>
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<br/>
|
||||
|
||||
<p>
|
||||
The authenticity of host {{ hostname }} cannot be established.<br/> The SSH host advertises the following public keys. Please verify any one of them.
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<p>
|
||||
The authenticity of host {{ hostname }} cannot be established.<br/>
|
||||
The SSH host advertises the following public keys. Please verify any one of them.
|
||||
<a class="btn btn-default collapsed collapsible-button" data-toggle="collapse" href="#help" aria-expanded="false"><i class="fa fa-chevron-right fa-fw" aria-hidden="true"></i> {% trans "How to verify?" %}</a>
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<div class="collapse panel-body" id="help">
|
||||
{% blocktrans trimmed %}
|
||||
<p>Run the following command on the SSH host machine. The output should match one of the provided options. You can also use dsa, ecdsa, ed25519 etc. instead of rsa, by choosing the corresponding file.</p>
|
||||
{% endblocktrans %}
|
||||
<p>
|
||||
<a class="btn btn-default" data-toggle="collapse" href="#help" aria-expanded="false">{% trans "How to verify?" %} <i class="fa fa-chevron-down fa-fw" aria-hidden="true"></i></a>
|
||||
<code>sudo ssh-keygen -lf /etc/ssh/ssh_host_rsa_key</code>
|
||||
</p>
|
||||
<div class="collapse" id="help">
|
||||
{% blocktrans trimmed %}
|
||||
<p>Run the following command on the SSH host machine. The output should match one of the provided options. You can also use dsa, ecdsa, ed25519 etc. instead of rsa, by choosing the corresponding file.</p>
|
||||
{% endblocktrans %}
|
||||
<p>
|
||||
<code>sudo ssh-keygen -lf /etc/ssh/ssh_host_rsa_key</code>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ form|bootstrap }}
|
||||
{{ form|bootstrap }}
|
||||
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="{% trans "Verify" %}"/>
|
||||
<a class="btn btn-default" role="button" href="{% url 'backups:index' %}">
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</form>
|
||||
<input type="submit" class="btn btn-primary" value="{% trans " Verify " %}"/>
|
||||
<a class="btn btn-default" role="button" href="{% url 'backups:index' %}">
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -23,10 +23,9 @@
|
||||
|
||||
{% if clients %}
|
||||
<p>
|
||||
<button id="clients-button" type="button" class="btn btn-default collapsed"
|
||||
<button type="button" class="btn btn-default collapsed collapsible-button"
|
||||
data-toggle="collapse" data-target="#clients">
|
||||
{% trans "Client Apps" %}
|
||||
<span class="fa fa-chevron-right" aria-hidden="true"></span>
|
||||
<i class="fa fa-chevron-right fa-fw" aria-hidden="true"></i> {% trans "Client Apps" %}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
|
||||
@ -231,16 +231,16 @@ footer {
|
||||
}
|
||||
|
||||
/* Icon when collapsible content is shown */
|
||||
#clients-button .fa {
|
||||
.collapsible-button .fa {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#clients-button .fa:before,
|
||||
.no-js #clients-button.collapsed .fa:before {
|
||||
.collapsible-button .fa:before,
|
||||
.no-js .collapsible-button.collapsed .fa:before {
|
||||
content: "\f078";
|
||||
}
|
||||
|
||||
#clients-button.collapsed .fa:before {
|
||||
.collapsible-button.collapsed .fa:before {
|
||||
content: "\f054";
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user