Clean up todo
This commit is contained in:
parent
de15d61ebb
commit
613c002d5a
2 changed files with 0 additions and 117 deletions
|
@ -8,12 +8,6 @@
|
|||
clear: both;
|
||||
}
|
||||
}
|
||||
/* TODO: remove this */
|
||||
@media (min-width: 800px) {
|
||||
#event-tab {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.time {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
|
|
@ -13,16 +13,6 @@
|
|||
margin-left: 13%;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
/* TODO: remove this */
|
||||
.middle-content {
|
||||
margin-left: 0;
|
||||
max-width: 75%;
|
||||
width: -webkit-fill-available;
|
||||
}
|
||||
.blog-sidebar, .right-sidebar {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
@media(max-width: 799px) {
|
||||
#content {
|
||||
|
@ -33,112 +23,11 @@
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: remove this */
|
||||
#three-col-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_media %}
|
||||
<script type="text/javascript">
|
||||
// TODO: remove this
|
||||
function onWindowReady() {
|
||||
// http://stackoverflow.com/a/1060034/1090657
|
||||
var hidden = 'hidden';
|
||||
|
||||
// Standards:
|
||||
if (hidden in document)
|
||||
document.addEventListener('visibilitychange', onchange);
|
||||
else if ((hidden = 'mozHidden') in document)
|
||||
document.addEventListener('mozvisibilitychange', onchange);
|
||||
else if ((hidden = 'webkitHidden') in document)
|
||||
document.addEventListener('webkitvisibilitychange', onchange);
|
||||
else if ((hidden = 'msHidden') in document)
|
||||
document.addEventListener('msvisibilitychange', onchange);
|
||||
// IE 9 and lower:
|
||||
else if ('onfocusin' in document)
|
||||
document.onfocusin = document.onfocusout = onchange;
|
||||
// All others:
|
||||
else
|
||||
window.onpageshow = window.onpagehide
|
||||
= window.onfocus = window.onblur = onchange;
|
||||
|
||||
function onchange(evt) {
|
||||
var v = 'window-visible', h = 'window-hidden', evtMap = {
|
||||
focus: v, focusin: v, pageshow: v, blur: h, focusout: h, pagehide: h
|
||||
};
|
||||
|
||||
evt = evt || window.event;
|
||||
if (evt.type in evtMap)
|
||||
document.body.className = evtMap[evt.type];
|
||||
else
|
||||
document.body.className = this[hidden] ? 'window-hidden' : 'window-visible';
|
||||
|
||||
if ('$' in window)
|
||||
$(window).trigger('dmoj:' + document.body.className);
|
||||
}
|
||||
|
||||
$('.tabs').each(function () {
|
||||
var $this = $(this), $h2 = $(this).find('h2'), $ul = $(this).find('ul');
|
||||
var cutoff = ($h2.textWidth() || 400) + 20, handler;
|
||||
$ul.children().each(function () {
|
||||
cutoff += $(this).width();
|
||||
});
|
||||
$(window).resize(handler = function () {
|
||||
$this.toggleClass('tabs-no-flex', $this.width() < cutoff);
|
||||
});
|
||||
handler();
|
||||
});
|
||||
|
||||
// set the initial state (but only if browser supports the Page Visibility API)
|
||||
if (document[hidden] !== undefined)
|
||||
onchange({type: document[hidden] ? 'blur' : 'focus'});
|
||||
|
||||
$("a.close").click(function () {
|
||||
var $closer = $(this);
|
||||
$closer.parent().fadeOut(200);
|
||||
});
|
||||
|
||||
register_time($('.time-with-rel'));
|
||||
|
||||
if (typeof window.orientation !== 'undefined') {
|
||||
$(window).resize(function () {
|
||||
var width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
||||
// $('#viewport').attr('content', width > 480 ? 'initial-scale=1' : 'width=480');
|
||||
});
|
||||
}
|
||||
|
||||
$.ajaxSetup({
|
||||
beforeSend: function (xhr, settings) {
|
||||
if (!(/^(GET|HEAD|OPTIONS|TRACE)$/.test(settings.type)) && !this.crossDomain)
|
||||
xhr.setRequestHeader('X-CSRFToken', $.cookie('csrftoken'));
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
$("[data-src]img").each(function() {
|
||||
$(this).attr("src", $(this).attr("data-src"));
|
||||
})
|
||||
$("[data-src]iframe").each(function() {
|
||||
$(this).attr("src", $(this).attr("data-src"));
|
||||
})
|
||||
}, "100");
|
||||
|
||||
$('form').submit(function (evt) {
|
||||
// Prevent multiple submissions of forms, see #565
|
||||
$("input[type='submit']").prop('disabled', true);
|
||||
});
|
||||
|
||||
$('.lang-dropdown-item').click(function() {
|
||||
$('select[name="language"]').val($(this).attr('value'));
|
||||
$('#form-lang').submit();
|
||||
})
|
||||
$('#logout').on('click', () => $('#logout-form').submit());
|
||||
}
|
||||
|
||||
function activateBlogBoxOnClick() {
|
||||
$('.blog-box').on('click', function() {
|
||||
var $description = $(this).children('.blog-description');
|
||||
|
|
Loading…
Reference in a new issue