aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/js/postHandler.js26
-rw-r--r--templates/blog/post.html2
2 files changed, 14 insertions, 14 deletions
diff --git a/static/js/postHandler.js b/static/js/postHandler.js
index c6f169b3..dd647363 100644
--- a/static/js/postHandler.js
+++ b/static/js/postHandler.js
@@ -39,15 +39,15 @@ function lightsOff() {
// #overlay. Go from 0.8 -> 0.9 opacity
var currentStatus = $('#lightsStatus').attr('data-status');
var windowWidth = document.documentElement.clientWidth;
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
$('#overlay').fadeTo('fast', 0.8);
if (windowWidth > 480) {
$('#sidebar').children().fadeTo('fast', 1);
$('#header').fadeTo('fast', 1);
$('#footer').fadeTo('fast', 1);
}
- $('#lightsStatus').attr('data-status', 'on');
- $('#lightsStatus').attr('src', onImage);
+ $('#lightsStatus').attr('data-status', 'off');
+ $('#lightsStatus').attr('src', offImage);
} else {
$('#overlay').fadeTo('fast', 0.9);
if (windowWidth > 480) {
@@ -55,8 +55,8 @@ function lightsOff() {
$('#header').fadeTo('fast', 0.2);
$('#footer').fadeTo('fast', 0.2);
}
- $('#lightsStatus').attr('data-status', 'off');
- $('#lightsStatus').attr('src', offImage);
+ $('#lightsStatus').attr('data-status', 'on');
+ $('#lightsStatus').attr('src', onImage);
}
}
@@ -99,13 +99,13 @@ var allInputElementsOnPage = $('input');
// If lights are off, then on hover on sidebar .children(), fadeTo 1 for currently hovered child
$('#sidebar').children().hover(function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
$(this).fadeTo('fast', 0.85);
}
}, function() {
var currentStatus = $('#lightsStatus').attr('data-status');
// if none of the input elements are focused, then fadeTo 0.2
- if (currentStatus == 'off' && allInputElementsOnPage.is(':focus') == false) {
+ if (currentStatus == 'on' && allInputElementsOnPage.is(':focus') == false) {
$(this).fadeTo('fast', 0.2);
}
});
@@ -113,19 +113,19 @@ $('#sidebar').children().hover(function() {
// same for header and footer
$('#header').hover(function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
$(this).fadeTo('fast', 0.85);
}
}, function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off' && allInputElementsOnPage.is(':focus') == false) {
+ if (currentStatus == 'on' && allInputElementsOnPage.is(':focus') == false) {
$(this).fadeTo('fast', 0.2);
}
});
$('#search-form > input[type=text]').blur(function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
var isHovered = $('#header').is(':hover');
if (isHovered == false) {
$('#header').fadeTo('fast', 0.2);
@@ -135,7 +135,7 @@ $('#search-form > input[type=text]').blur(function() {
$('#login-form > input').blur(function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
var isHovered = $('#login-area').is(':hover');
if (isHovered == false) {
$('#login-area').fadeTo('fast', 0.2);
@@ -145,12 +145,12 @@ $('#login-form > input').blur(function() {
$('#footer').hover(function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
$(this).fadeTo('fast', 0.85);
}
}, function() {
var currentStatus = $('#lightsStatus').attr('data-status');
- if (currentStatus == 'off') {
+ if (currentStatus == 'on') {
$(this).fadeTo('fast', 0.2);
}
});
diff --git a/templates/blog/post.html b/templates/blog/post.html
index 4e44bfe7..7c0e6d3b 100644
--- a/templates/blog/post.html
+++ b/templates/blog/post.html
@@ -5,7 +5,7 @@
<div id="post-actions-bar" class="mtsbitem">
<a class="pa-btn" href="{% url 'blog:home' %}">Home</a>
<a class="pa-btn" href="#comments">Opinions</a>
- <a class="pa-btn" href="javascript:;" onclick="lightsOff()">Lights <img id="lightsStatus" data-status="on" src="{% static 'images/site/on.png' %}" alt="Off" style="height: 11px; position: relative; top: 2px;"></a>
+ <a class="pa-btn" href="javascript:;" onclick="lightsOff()">Focus <img id="lightsStatus" data-status="off" src="{% static 'images/site/off.png' %}" alt="Off" style="height: 11px; position: relative; top: 2px;"></a>
<a class="pa-btn" href="javascript:;" onclick="blindMode()">Spectacles <img id="blindStatus" data-status="off" src="{% static 'images/site/off.png' %}" alt="Off" style="height: 11px; position: relative; top: 2px;"></a>
{% comment %} <a class="pa-btn" id="translate-jp" href="javascript:;">
<img src="{% static 'images/icons/translate.png' %}" alt="Translate to Japanese" style="height: 11px; width: 11px; margin-right: 5px; position: relative; top: 1px;">