2019-07-04 01:21:58 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
2019-07-18 21:50:50 +08:00
|
|
|
<title>{% if page and page.title %}{{ page.title }} |{% endif %} {% block title%}{{ config.title }}{% endblock %}</title>
|
2019-07-04 01:21:58 +08:00
|
|
|
<meta name="description" content="{% block description%}{{ config.description }}{% endblock %}">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
|
|
|
|
<meta property="og:type" content="website">
|
|
|
|
{% block ogtitle %}
|
|
|
|
<meta property="og:title" content="{% block og_title%}{{ config.title }}{% endblock %}">
|
|
|
|
{% endblock %}
|
|
|
|
{% block ogdescription %}
|
|
|
|
<meta property="og:description" content="{% block og_description%}{{ config.description }}{% endblock %}">
|
|
|
|
{% endblock %}
|
|
|
|
<meta property="og:site_name" content="{{ config.extra.author }}">
|
|
|
|
<meta property="og:url" content="{{ config.base_url }}">
|
|
|
|
<meta property="og:image" content={{ get_url(path='images/logo@2x.png', cachebust=true) }}>
|
|
|
|
{% block meta %}{% endblock meta %}
|
|
|
|
|
2019-07-29 18:23:36 +08:00
|
|
|
<meta name="theme-color" content="#715ec7">
|
2019-07-19 16:57:30 +08:00
|
|
|
<link rel="manifest" href="/manifest.json" />
|
|
|
|
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-114x114.png') }}" sizes="114x114">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-120x120.png') }}" sizes="120x120">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-144x144.png') }}" sizes="144x144">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-152x152.png') }}" sizes="152x152">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-180x180.png') }}" sizes="180x180">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-57x57.png') }}" sizes="57x57">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-60x60.png') }}" sizes="60x60">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-72x72.png') }}" sizes="72x72">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon-76x76.png') }}" sizes="76x76">
|
|
|
|
<link rel="apple-touch-icon" href="{{ get_url(path='/apple-icon.png') }}">
|
|
|
|
|
|
|
|
<link rel="icon" href="{{ get_url(path='/favicon-16x16.png') }}" sizes="16x16">
|
|
|
|
<link rel="icon" href="{{ get_url(path='/favicon-32x32.png') }}" sizes="32x32">
|
|
|
|
<link rel="icon" href="{{ get_url(path='/favicon-96x96.png') }}" sizes="96x96">
|
|
|
|
|
2019-07-04 01:21:58 +08:00
|
|
|
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="shortcut icon" type="image/x-icon">
|
|
|
|
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="icon" type="image/x-icon">
|
|
|
|
|
|
|
|
{% block styles %}{% endblock %}
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<!-- HEADER -->
|
|
|
|
|
2020-01-15 19:06:18 +08:00
|
|
|
<div class="container-fluid container-header shadow th sticky-top">
|
2019-07-04 01:21:58 +08:00
|
|
|
|
|
|
|
<header class="container">
|
|
|
|
|
2019-12-30 18:34:18 +08:00
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-th-1 justify-content-center justify-content-between pt-md-3 pb-md-3" role="navigation">
|
2019-07-04 01:21:58 +08:00
|
|
|
|
2019-07-08 18:03:40 +08:00
|
|
|
<a class="navbar-brand logo mr-0" href="/">
|
2019-07-04 01:21:58 +08:00
|
|
|
<img src="{{ get_url(path='images/logo@2x.png') }}" height="25" alt="logo">
|
|
|
|
</a>
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
|
|
|
2019-08-01 20:08:44 +08:00
|
|
|
<ul class="navbar-nav ml-0 ml-md-auto text-left text-lg-left pt-2 pb-2 pt-md-0 pb-md-0">
|
2019-07-04 01:21:58 +08:00
|
|
|
|
|
|
|
{% set section = get_section(path='_index.md') %}
|
|
|
|
{% for section in section.subsections %}
|
|
|
|
|
|
|
|
{% set subsection = get_section(path=section) %}
|
|
|
|
{% set root_current_path = current_path | split(pat='/') | first %}
|
|
|
|
{% set root_section_path = subsection.path | split(pat='/') | first %}
|
|
|
|
|
2019-07-20 16:41:31 +08:00
|
|
|
{% if subsection.pages|length > 0 and subsection.title != 'Other' %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
|
|
|
<li class="nav-item ml-0 ml-md-4 dropdown {% if root_current_path == root_section_path %}active{% endif %}">
|
|
|
|
<a class="nav-link dropdown-toggle {% if current_path == subsection.path %}active{% endif %}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
{{ subsection.title }}
|
|
|
|
</a>
|
2019-08-01 20:08:44 +08:00
|
|
|
<div class="dropdown-menu shadow-none shadow-lg text-left text-lg-left" aria-labelledby="navbarDropdown">
|
2019-10-02 12:16:07 +08:00
|
|
|
{% for tmp_page in subsection.pages %}
|
|
|
|
{% if tmp_page.extra.menu_item and tmp_page.extra.menu_item == "th1" %}
|
2020-01-15 19:06:18 +08:00
|
|
|
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">{{ tmp_page.title }}</a>
|
2019-10-02 12:16:07 +08:00
|
|
|
{% else %}
|
2020-01-15 19:06:18 +08:00
|
|
|
<a class="dropdown-item pt-2 pb-2 {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">{{ tmp_page.title }}</a>
|
2019-10-02 12:16:07 +08:00
|
|
|
{% endif %}
|
2019-07-04 01:21:58 +08:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
2019-07-20 16:41:31 +08:00
|
|
|
{% elif subsection.title != 'Other' %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
|
|
|
<li class="nav-item ml-0 ml-md-4 {% if current_path == subsection.path %}active{% endif %}">
|
|
|
|
<a class="nav-link" href="{{ subsection.permalink }}">{{ subsection.title }}</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ./HEADER -->
|
|
|
|
|
|
|
|
<!-- HERO -->
|
|
|
|
{% block hero %}
|
|
|
|
{% endblock %}
|
|
|
|
<!-- ./HERO -->
|
|
|
|
|
|
|
|
<!-- MAIN CONTENT -->
|
|
|
|
{% block main %}
|
|
|
|
{% endblock %}
|
|
|
|
<!-- ./MAIN CONTENT -->
|
|
|
|
|
2019-07-29 18:23:36 +08:00
|
|
|
<noscript id="deferred-main-styles">
|
|
|
|
<link rel="stylesheet" href="{{ get_url(path='css/bootstrap-4.3.1.min.css', cachebust=true) }}">
|
|
|
|
<link rel="stylesheet" href="{{ get_url(path='css/styles.css', cachebust=true) }}">
|
|
|
|
{% block deferred_styles %}{% endblock %}
|
|
|
|
</noscript>
|
|
|
|
<script>
|
|
|
|
var loadDeferredMainStyles = function() {
|
|
|
|
var addStylesNode = document.getElementById("deferred-main-styles");
|
|
|
|
var replacement = document.createElement("div");
|
|
|
|
replacement.innerHTML = addStylesNode.textContent;
|
|
|
|
document.body.appendChild(replacement)
|
|
|
|
addStylesNode.parentElement.removeChild(addStylesNode);
|
|
|
|
};
|
|
|
|
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
|
|
|
|
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
|
|
|
|
if (raf) raf(function() { window.setTimeout(loadDeferredMainStyles, 0); });
|
|
|
|
else window.addEventListener('load', loadDeferredMainStyles);
|
|
|
|
</script>
|
|
|
|
|
2019-07-04 01:21:58 +08:00
|
|
|
<!-- FOOTER -->
|
|
|
|
|
2019-10-02 12:16:07 +08:00
|
|
|
{% block footer %}
|
2019-07-04 01:21:58 +08:00
|
|
|
<footer class="container text-center text-md-left">
|
|
|
|
|
2019-07-05 20:58:20 +08:00
|
|
|
{% block footer_contact %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
2019-07-19 17:49:57 +08:00
|
|
|
{% include "includes/footer_contact_direction.html" %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
2019-07-05 20:58:20 +08:00
|
|
|
{% endblock %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
2019-10-02 12:16:07 +08:00
|
|
|
<p class="pt-4 pb-2 text-center">
|
2019-07-04 01:21:58 +08:00
|
|
|
<small>Copyright © <span id="copyright_year"></span>, M-Labs. All Rights Reserved.</small>
|
|
|
|
</p>
|
|
|
|
|
2020-01-23 01:55:17 +08:00
|
|
|
{% block fcopyright %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2019-07-04 01:21:58 +08:00
|
|
|
</footer>
|
2019-10-02 12:16:07 +08:00
|
|
|
{% endblock footer %}
|
2019-07-04 01:21:58 +08:00
|
|
|
|
|
|
|
<!-- ./FOOTER -->
|
|
|
|
|
2019-07-19 23:28:56 +08:00
|
|
|
<!-- MODAL for enlarged picture -->
|
|
|
|
<div class="modal" id="modalEnlarged" tabindex="-1" role="dialog">
|
2019-07-22 17:41:00 +08:00
|
|
|
<div class="modal-dialog mx-auto modal-lg" role="document">
|
2019-07-19 23:28:56 +08:00
|
|
|
<div class="modal-content">
|
2019-07-22 17:41:00 +08:00
|
|
|
<div class="modal-body mx-auto">
|
2019-07-19 23:28:56 +08:00
|
|
|
<img src="" id="enlarged" class="img-fluid">
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-07-04 01:21:58 +08:00
|
|
|
|
2019-10-02 12:16:07 +08:00
|
|
|
<!-- <script src="{{ get_url(path='js/as.js', cachebust=true) }}"></script> -->
|
2019-07-29 18:23:36 +08:00
|
|
|
|
2020-01-15 19:06:18 +08:00
|
|
|
<script src="{{ get_url(path='js/jquery-3.3.1.min.js', cachebust=true) }}"></script>
|
2019-07-04 01:21:58 +08:00
|
|
|
<script src="{{ get_url(path='js/popper-1.14.7.min.js', cachebust=true) }}"></script>
|
|
|
|
<script src="{{ get_url(path='js/bootstrap-4.3.1.min.js', cachebust=true) }}"></script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
(function () {
|
2019-10-02 12:16:07 +08:00
|
|
|
var cy = document.getElementById('copyright_year');
|
|
|
|
if (cy) {
|
|
|
|
cy.textContent = (new Date()).getFullYear();
|
|
|
|
}
|
2019-07-04 01:21:58 +08:00
|
|
|
})();
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2019-07-19 23:28:56 +08:00
|
|
|
<script>
|
|
|
|
$(function () {
|
2019-07-22 20:30:41 +08:00
|
|
|
$('#modalEnlarged').on('hidden.bs.modal', function (e) {
|
|
|
|
$('#enlarged').attr('src', '');
|
|
|
|
});
|
|
|
|
|
2019-07-19 23:28:56 +08:00
|
|
|
$('[data-popup]').click(function (evt) {
|
|
|
|
var _self = $(this);
|
|
|
|
var _img_enlarged = _self.data('nsrc');
|
|
|
|
$('#enlarged').attr('src', _img_enlarged);
|
|
|
|
$('#modalEnlarged').modal('show');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-15 19:06:18 +08:00
|
|
|
<script>
|
2020-01-22 23:10:41 +08:00
|
|
|
function deviceIsMobile() {
|
|
|
|
// https://coderwall.com/p/i817wa/one-line-function-to-detect-mobile-devices-with-javascript
|
|
|
|
return (
|
|
|
|
(typeof window.orientation !== 'undefined') ||
|
|
|
|
navigator.userAgent.match(/Android/i) ||
|
|
|
|
navigator.userAgent.match(/webOS/i) ||
|
|
|
|
navigator.userAgent.match(/iPhone/i) ||
|
|
|
|
navigator.userAgent.match(/iPad/i) ||
|
|
|
|
navigator.userAgent.match(/iPod/i) ||
|
|
|
|
navigator.userAgent.match(/BlackBerry/i) ||
|
|
|
|
navigator.userAgent.match(/Windows Phone/i) ||
|
|
|
|
(navigator.userAgent.indexOf('IEMobile') !== -1)
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-01-15 19:06:18 +08:00
|
|
|
(function () {
|
|
|
|
var mywindow = $(window);
|
|
|
|
var mypos = mywindow.scrollTop();
|
|
|
|
var up = false;
|
|
|
|
var newscroll;
|
|
|
|
var navbarSupportedContent = $('#navbarSupportedContent');
|
2020-01-22 23:10:41 +08:00
|
|
|
|
|
|
|
if (!deviceIsMobile()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-01-15 19:06:18 +08:00
|
|
|
mywindow.scroll(function () {
|
|
|
|
newscroll = mywindow.scrollTop();
|
2020-01-21 19:24:57 +08:00
|
|
|
if (newscroll < 30) {
|
|
|
|
$('.container-header').stop().fadeIn();
|
|
|
|
return;
|
|
|
|
}
|
2020-01-21 01:02:47 +08:00
|
|
|
if (!navbarSupportedContent.hasClass('show')) {
|
2020-01-21 19:02:38 +08:00
|
|
|
if (newscroll > (mypos + 0) && !up) {
|
2020-01-21 01:02:47 +08:00
|
|
|
$('.container-header').stop().fadeOut();
|
|
|
|
up = !up;
|
2020-01-21 19:02:38 +08:00
|
|
|
} else if(newscroll < (mypos + 0) && up) {
|
2020-01-21 01:02:47 +08:00
|
|
|
$('.container-header').stop().fadeIn();
|
|
|
|
up = !up;
|
|
|
|
}
|
2020-01-15 19:06:18 +08:00
|
|
|
}
|
2020-01-21 19:02:38 +08:00
|
|
|
mypos = newscroll;
|
2020-01-15 19:06:18 +08:00
|
|
|
});
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
|
2019-07-22 18:46:55 +08:00
|
|
|
{% block js %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2019-07-04 01:21:58 +08:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|