EyeTrackVR-Docs/docs/_includes/custom/3d_printed_parts/Parts.html
DaOfficialWizard 2f50c7d0c6 update
- Added multilink support for Parts List.
2022-06-23 13:50:57 +02:00

102 lines
3.2 KiB
HTML

<!-- Do not edit this file - it is a template. Please edit the threed_parts.yml file -->
<style>
.accordion {
width: 100%;
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 .hmd {
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 .hmd::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 .parts {
position: relative;
height: 0;
font-size: 20px;
text-align: justify;
width: 100%;
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 .parts {
height: 180px;
}
/* Changes from plus sign to negative sign once active */
.accordion .container.active .hmd::before {
content: '';
font-size: 30px;
}
</style>
<h1 class="fs-6 fw-500" align="left">3d Printed Parts For Supported Headsets</h1>
<div class="accordion-body">
{% for threed_parts in site.data.3d_printed_parts_yaml.3d_printed_parts %}
<div class="accordion">
<hr>
<div class="container">
<div class="hmd fw-400">
<h1 class="fs-5 fw-500">
{{ threed_parts.hmd }}
</h1>
</div>
<div class="parts">
<blockquote>
<span class="answerspan-{{ threed_parts.threed_parts_link_id }}">
<ul>
{% if threed_parts.hyper_links != null and threed_parts.hyper_links != "" %}
{% for hyper_link in threed_parts.hyper_links %}
<p>
<a href="{{ hyper_link.url }}" target="_blank">{{ hyper_link.desc }}</a>
</p>
{% endfor %}
{% endif %}
{% for part in threed_parts.parts %}
<li>{{ part }}</li>
{% endfor %}
</ul>
</span>
</blockquote>
</div>
</div>
</div>
{% endfor %}
</div>
<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>