NDOJ/templates/three-column-content.html

78 lines
2.5 KiB
HTML
Raw Normal View History

2022-04-13 05:52:03 +00:00
{% extends "base.html" %}
{% block title_row %}{% endblock %}
{% block title_ruler %}{% endblock %}
{% block media %}
<style>
2022-07-05 05:54:04 +00:00
@media(min-width: 800px) {
#content {
width: 98%;
margin-left: 0;
}
}
@media(max-width: 799px) {
#content {
width: 100%;
margin-left: 0;
}
2022-04-13 05:52:03 +00:00
}
</style>
{% block three_col_media %}{% endblock %}
{% endblock %}
{% block js_media %}
<script type="text/javascript">
$(document).ready(function () {
$('.left-sidebar-item').on('click', function() {
var url = $(this).attr('data-href');
if (url === '#') return;
window.location.href = url;
});
2022-06-02 22:29:00 +00:00
$('.blog-box').on('click', function() {
var $description = $(this).children('.blog-description');
var max_height = $description.css('max-height');
2022-04-13 05:52:03 +00:00
if (max_height !== 'fit-content') {
2022-06-02 22:29:00 +00:00
$description.css('max-height', 'fit-content');
2022-04-13 05:52:03 +00:00
$(this).css('cursor', 'auto');
2022-06-02 22:29:00 +00:00
$(this).removeClass('pre-expand-blog');
2022-04-13 05:52:03 +00:00
}
})
2022-06-02 22:29:00 +00:00
$('.blog-box').each(function() {
2022-04-13 05:52:03 +00:00
if ($(this).prop('scrollHeight') > $(this).height() ) {
2022-06-02 22:29:00 +00:00
$(this).addClass('pre-expand-blog');
2022-04-13 05:52:03 +00:00
$(this).css('cursor', 'pointer');
}
});
});
</script>
{% block three_col_js %}{% endblock %}
{% endblock %}
{% macro make_tab_item(name, fa, url, text) %}
<div class="left-sidebar-item {% if page_type == name %}active{% endif %}" data-href="{{ url }}" id="{{ name }}-tab">
2022-06-02 22:09:24 +00:00
<span class="sidebar-icon"><i class="{{ fa }}"></i></span>
<span>{{ text }}</span>
2022-04-13 05:52:03 +00:00
</div>
{% endmacro %}
{% block body %}
{% block before_posts %}{% endblock %}
<div id="three-col-container">
{% block left_sidebar %}{% endblock %}
<div class="middle-content">
2022-05-30 06:59:53 +00:00
{% block middle_title %}{% endblock %}
2022-04-13 05:52:03 +00:00
{% block middle_content %}{% endblock %}
</div>
{% block right_sidebar %}{% endblock %}
</div>
{% block after_posts %}{% endblock %}
{% endblock %}
{% block bodyend %}
{{ super() }}
{% if REQUIRE_JAX %}
{% include "mathjax-load.html" %}
{% endif %}
{% include "comments/math.html" %}
{% endblock %}