Lorenzo Dellacà
67344effd0
CSS code was divided in multiple files, however this was not practical for organization since different pages needed different CSS classes one another, that were in most of those CSS files. This commit brings (mostly) everything in one file with a table of contents on top. An exception is made for fonts, that are now in a separate "fonts.css" file, since they contain fundamentally different things. Classes organization is not yet complete, however a great part was done. Next commits will finalize this organization and finish moving classes. Signed-off-by: Lorenzo Dellacà <lorenzo.dellaca@mind-overflow.net>
49 lines
1013 B
JavaScript
Executable File
49 lines
1013 B
JavaScript
Executable File
var scroll_pos = 0;
|
|
var transparent = true;
|
|
var offset = 100;
|
|
|
|
function makeTransparent()
|
|
{
|
|
$("#mind-global-navbar_primary").removeClass('mind-global-navbar_primary-colored').addClass('mind-global-navbar_primary-transparent');
|
|
transparent = true;
|
|
}
|
|
|
|
function makeOpaque()
|
|
{
|
|
$("#mind-global-navbar_primary").removeClass('mind-global-navbar_primary-transparent').addClass('mind-global-navbar_primary-colored');
|
|
transparent = false;
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#mind-global-navbar_primary").addClass('mind-global-navbar_primary-allowmoving');
|
|
scroll_pos = $(this).scrollTop();
|
|
|
|
if(scroll_pos > offset)
|
|
{
|
|
makeOpaque();
|
|
}
|
|
else
|
|
{
|
|
makeTransparent();
|
|
}
|
|
|
|
$(document).scroll(function() {
|
|
scroll_pos = $(this).scrollTop();
|
|
if(transparent)
|
|
{
|
|
if(scroll_pos > offset)
|
|
{
|
|
makeOpaque();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if(scroll_pos <= offset)
|
|
{
|
|
makeTransparent();
|
|
}
|
|
}
|
|
});
|
|
});
|