Skip to content

Commit

Permalink
66 - user manuals for lab equipments (#67)
Browse files Browse the repository at this point in the history
* Basic implementations
* URL updates
  • Loading branch information
NuwanJ authored Oct 10, 2023
1 parent ef0afe8 commit 798cc19
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 18 deletions.
70 changes: 70 additions & 0 deletions _data/user_manuals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"MakerSpace Lab": {
"link": "/equipment/user-manuals/makerspace/",
"manuals": [
{
"title": "Tenma Oscilloscope",
"description": "300MHz Dual Trace Analog Oscilloscope",
"thumb": "#",
"urls": [
{
"title": "User Manual",
"link": "https://drive.google.com/file/d/1JKNHXBG50qj1F-vPREiIU1kXxbLWxEI2/view?usp=drive_link"
},
{
"title": "Specifications",
"link": "https://drive.google.com/file/d/1AQqXA7QY8HpiNYhCzNvcbh03F4CQw-LK/view?usp=drive_link"
}
]
},
{
"title": "Tenma Switch Mode Bench PSU",
"description": "Model: 72-8340A",
"thumb": "#",
"urls": [
{
"title": "Instruction Manual",
"link": "https://drive.google.com/file/d/14CYosU7cW6OjB4a8aPQPyk1B8akS0LO9/view?usp=drive_link"
},
{
"title": "Technical Specifications",
"link": "https://drive.google.com/file/d/1_hm-3SsrTo942theigiY6NXCzd3oNfVg/view?usp=drive_link"
},

{
"title": "Calibration Report",
"link": "https://drive.google.com/file/d/1sgSTi2DkcCs8B3hinTzdItZ7zdaPZOkM/view?usp=drive_link"
}
]
},
{
"title": "PRECISION Signal Generator",
"description": "Dual Channel Function/Arbitrary Waveform Generators",
"thumb": "#",
"urls": [
{
"title": "User Manual",
"link": "https://drive.google.com/file/d/1EAHecuojuF1Dx8ERHdJFpNt0p-XSyN5K/view?usp=drive_link"
},
{
"title": "Data Sheet",
"link": "https://drive.google.com/file/d/1LMritF-CZvWq4qAKnP_Q-pPDK-W14uBF/view?usp=drive_link"
},
{
"title": "Programming Manual",
"link": "https://drive.google.com/file/d/1Lsx487LB7YEMNaai4D6P1EiQiX-bw2fb/view?usp=drive_link"
}

]
}
]
},
"Electronics Lab": {
"link": "/equipment/user-manuals/electronics-lab",
"manuals": []
},
"Networking Lab": {
"link": "/equipment/user-manuals/network-lab",
"manuals": []
}
}
43 changes: 25 additions & 18 deletions _layouts/QA_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,42 @@
---

{% assign content_ = content | replace: '<faq>', '<div>' %}
{% assign content_ = content_ | replace: '</faq>', '</div><br>' %}
{% assign content_ = content_ | replace: '</faq>', '</div><br>' %}

{% assign content_ = content_ | replace: '<question>', '<div><b>Q.' %}
{% assign content_ = content_ | replace: '</question>', '</b></div>' %}
{% assign content_ = content_ | replace: '</question>', '</b></div>' %}

{% assign content_ = content_ | replace: '<answer>', '<div>' %}
{% assign content_ = content_ | replace: '</answer>', '</div>' %}
{% assign content_ = content_ | replace: '</answer>', '</div>' %}

{% assign content_ = content_ | replace: '<code class="', '<div class="highlight"><pre><code class="dracula ' %}
{% assign content_ = content_ | replace: '</code>', '</code></pre></div>' %}
{% assign content_ = content_ | replace: '<code class="', '<div class=" highlight"><pre><code class="dracula ' %}
{% assign content_ = content_ | replace: '</code>', '</code></pre>
</div>' %}
{% include page_tree_builder.html pages=site.html_pages -%}
{%- assign parent_page = pages_list | where: "title", page.parent -%}

<div class="bg-secondary p-3 pb-1 rounded">
<h1 class="text-white">{{ page.title }}</h1>
<nav aria-label="breadcrumb page-breadcrumb">
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="{% link faq/index.html %}" class="link-light">Home</a></li>
<li class="breadcrumb-item">
<a class="text-white" href="{{ parent_page[0].permalink }}">{{ page.parent }}</a>
</li>
<li class="breadcrumb-item text-white">
{{ page.title }}
</li>
</ol>
</nav>
<h1 class="text-white">{{ page.title }}</h1>
<nav aria-label="breadcrumb page-breadcrumb">
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="{% link faq/index.html %}" class="link-light">Home</a></li>
{%- if page.grand_parent -%}
{%- assign grand_parent_page = pages_list | where: "title", page.grand_parent -%}
<li class="breadcrumb-item">
<a class="text-white" href="{{ grand_parent_page[0].permalink }}">{{ page.grand_parent }}</a>
</li>
{%- endif -%}
<li class="breadcrumb-item">
<a class="text-white" href="{{ parent_page[0].permalink }}">{{ page.parent }}</a>
</li>
<li class="breadcrumb-item text-white">
{{ page.title }}
</li>
</ol>
</nav>
</div>

<div class="container pt-5">
{{ content_ }}
</div>
</div>
12 changes: 12 additions & 0 deletions faq/equipment/equipment.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@
index: 6
---

<h5>User Manuals</h5>
<div>
<ul>
{%- assign manuals = site.data.user_manuals -%}
{%- for m in manuals -%}
<li><a href="{{ m[1]['link'] | relative_url }}">{{ m[0] }}</a></li>
{%- endfor -%}
</ul>
</div>

<hr>

<!--EXPAND ALL BUTTON ON TOP RIGHT CORNER
Later add to template-->
<p style="text-align:right">
<button type="button" class="btn btn-dark btn-expand-all">EXPAND ALL</button>
</p>


<!-- 1 -->
{% include qa-template.html
id="1"
Expand Down
35 changes: 35 additions & 0 deletions faq/equipment/user-manuals/00_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: QA_page
permalink: "/equipment/user-manuals/"

parent: "Equipment"
title: "User Manuals"
index: 1
author: "Nuwan Jaliyagoda"
---


<h3>User Manuals</h3>
<div>
<ul>
{%- assign manuals = site.data.user_manuals -%}
{%- for m in manuals -%}
<li>
<a href="{{ m[1]['link'] | relative_url }}">{{ m[0] }}</a>
<ul>
{%- for eq in m[1]['manuals'] -%}
<li class="pb-2">
<b>{{ eq['title'] }}</b><span class="text-muted ms-2">{{ eq['description'] }}</span>
<div class="px-3">
{%- for url in eq['urls'] -%}
<a class="ms-3" href="{{ url['link'] | relative_url}}" target="_blank">{{url['title']}}</a>
{%- endfor -%}
</div>
</li>
{%- endfor -%}
</ul>

</li>
{%- endfor -%}
</ul>
</div>
33 changes: 33 additions & 0 deletions faq/equipment/user-manuals/01_makerspace.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: QA_page
permalink: /equipment/user-manuals/makerspace/

grand_parent: "Equipment"
parent: "User Manuals"
title: "MakerSpace Lab"

author: "Nuwan Jaliyagoda"
---

{%- assign manuals = site.data.user_manuals -%}

<h3>User Manuals - {{ page.title }}</h3>

<div class="pt-3">
{%- for m in manuals -%}
{%- if m[0] == page.title -%}
<ul>
{%- for eq in m[1]['manuals'] -%}
<li class="pb-2">
<b>{{ eq['title'] }}</b><span class="text-muted ms-2">{{ eq['description'] }}</span>
<div class="px-3">
{%- for url in eq['urls'] -%}
<a class="ms-3" href="{{ url['link'] | relative_url}}" target="_blank">{{url['title']}}</a>
{%- endfor -%}
</div>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
{%- endfor -%}
</div>
33 changes: 33 additions & 0 deletions faq/equipment/user-manuals/02_electronics-lab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: QA_page
permalink: /equipment/user-manuals/electronics-lab/

grand_parent: "Equipment"
parent: "User Manuals"
title: "Electronics Lab"

author: "Nuwan Jaliyagoda"
---

{%- assign manuals = site.data.user_manuals -%}

<h3>User Manuals - {{ page.title }}</h3>

<div class="pt-3">
{%- for m in manuals -%}
{%- if m[0] == page.title -%}
<ul>
{%- for eq in m[1]['manuals'] -%}
<li class="pb-2">
<b>{{ eq['title'] }}</b><span class="text-muted ms-2">{{ eq['description'] }}</span>
<div class="px-3">
{%- for url in eq['urls'] -%}
<a class="ms-3" href="{{ url['link'] | relative_url}}" target="_blank">{{url['title']}}</a>
{%- endfor -%}
</div>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
{%- endfor -%}
</div>
33 changes: 33 additions & 0 deletions faq/equipment/user-manuals/03_network-lab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: QA_page
permalink: /equipment/user-manuals/network-lab/

grand_parent: "Equipment"
parent: "User Manuals"
title: "Networking Lab"

author: "Nuwan Jaliyagoda"
---

{%- assign manuals = site.data.user_manuals -%}

<h3>User Manuals - {{ page.title }}</h3>

<div class="pt-3">
{%- for m in manuals -%}
{%- if m[0] == page.title -%}
<ul>
{%- for eq in m[1]['manuals'] -%}
<li class="pb-2">
<b>{{ eq['title'] }}</b><span class="text-muted ms-2">{{ eq['description'] }}</span>
<div class="px-3">
{%- for url in eq['urls'] -%}
<a class="ms-3" href="{{ url['link'] | relative_url}}" target="_blank">{{url['title']}}</a>
{%- endfor -%}
</div>
</li>
{%- endfor -%}
</ul>
{%- endif -%}
{%- endfor -%}
</div>

0 comments on commit 798cc19

Please sign in to comment.