mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
97 lines
2.5 KiB
HTML
97 lines
2.5 KiB
HTML
<!-- Do not edit this file - it is a template. Please edit the faq.yml file -->
|
|
<style>
|
|
.accordion {
|
|
width: 800px;
|
|
margin: 1px auto;
|
|
|
|
padding: 5px 5px;
|
|
}
|
|
|
|
.accordion .container {
|
|
position: relative;
|
|
margin: 5px 5px;
|
|
}
|
|
|
|
/* Positions the labels relative to the .container. Adds padding to the top and bottom and increases font size. Also makes its cursor a pointer */
|
|
|
|
.accordion .question {
|
|
position: relative;
|
|
padding: 5px 0;
|
|
font-size: 30px;
|
|
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Positions the plus sign 5px from the right. Centers it using the transform property. */
|
|
|
|
.accordion .question::before {
|
|
content: '\2304';
|
|
|
|
position: absolute;
|
|
top: 50%;
|
|
right: -5px;
|
|
font-size: 30px;
|
|
transform: translateY(-50%);
|
|
}
|
|
|
|
/* Hides the content (height: 0), decreases font size, justifies text and adds transition */
|
|
|
|
.accordion .answer {
|
|
position: relative;
|
|
height: 0;
|
|
font-size: 20px;
|
|
text-align: justify;
|
|
width: 780px;
|
|
transition: 0.5s;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Adds a horizontal line between the contents */
|
|
|
|
.accordion hr {
|
|
width: 100;
|
|
margin-left: 0;
|
|
border: 1px solid grey;
|
|
}
|
|
|
|
/* Unhides the content part when active. Sets the height */
|
|
|
|
.accordion .container.active .answer {
|
|
height: 150px;
|
|
}
|
|
|
|
/* Changes from plus sign to negative sign once active */
|
|
|
|
.accordion .container.active .question::before {
|
|
content: '';
|
|
font-size: 30px;
|
|
}
|
|
</style>
|
|
<h1 class="fs-6 fw-500" align="center">Frequently Asked Questions <br> Welcome to our FAQ!</h1>
|
|
{% for faq in site.data.faq.FAQ %}
|
|
<div class="accordion">
|
|
<hr>
|
|
<div class="container">
|
|
<div class="question fw-400">
|
|
<h1 class="fs-5 fw-500">{% if faq.question != null and faq.question != "" %} {{
|
|
faq.question }} {% endif %}</h1>
|
|
</div>
|
|
<div class="answer">
|
|
{% if faq.answer != null and faq.answer != "" %}
|
|
<blockquote>
|
|
{{ faq.answer }}
|
|
</blockquote>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
<script type="text/javascript">
|
|
const accordion = document.getElementsByClassName('container');
|
|
|
|
for (i = 0; i < accordion.length; i++) {
|
|
accordion[i].addEventListener('click', function () {
|
|
this.classList.toggle('active')
|
|
})
|
|
}
|
|
</script> |