Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M3P2 HTML Generator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M3P2
M3P2 HTML Generator
Commits
676eb570
Commit
676eb570
authored
May 06, 2019
by
Goutte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more javascript.
parent
450dc69b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
29 deletions
+42
-29
site.js
user/themes/quark/js/site.js
+41
-28
base.html.twig
user/themes/textbook/templates/partials/base.html.twig
+1
-1
No files found.
user/themes/quark/js/site.js
View file @
676eb570
var
isTouch
=
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
;
function
scrollHeader
()
{
// Has scrolled class on header
var
zvalue
=
$
(
document
).
scrollTop
();
if
(
zvalue
>
75
)
$
(
"#header"
).
addClass
(
"scrolled"
);
else
$
(
"#header"
).
removeClass
(
"scrolled"
);
}
// function scrollHeader() {
// // Has scrolled class on header
// var zvalue = $(document).scrollTop();
// if ( zvalue > 75 )
// $("#header").addClass("scrolled");
// else
// $("#header").removeClass("scrolled");
// }
//
// function parallaxBackground() {
// $('.parallax').css('background-positionY', ($(window).scrollTop() * 0.3) + 'px');
// }
function
parallaxBackground
()
{
$
(
'.parallax'
).
css
(
'background-positionY'
,
(
$
(
window
).
scrollTop
()
*
0.3
)
+
'px'
);
}
jQuery
(
document
).
ready
(
function
(
$
)
{
jQuery
(
document
).
ready
(
function
(
$
){
scrollHeader
();
// Scroll Events
if
(
!
isTouch
){
$
(
document
).
scroll
(
function
()
{
scrollHeader
();
parallaxBackground
();
});
};
// // Dropdown navigation fix
// var lists = $("nav.dropmenu > ul > li > ul > li > ul > li > ul");
//
// console.log(lists);
// // console.log(lists.width());
//
// lists.each(function(k, list){
// console.log("key", k);
// console.log("list", list);
// console.log($(list).width());
// $(list).css('left', "-"+$(list).width()+"px")
// });
// Touch scroll
$
(
document
).
on
({
'touchmove'
:
function
(
e
)
{
scrollHeader
();
// Replace this with your code.
}
});
// scrollHeader();
//
// // Scroll Events
// if ( ! isTouch) {
// $(document).scroll(function() {
// scrollHeader();
// parallaxBackground();
// });
// }
//
// // Touch scroll
// $(document).on({
// 'touchmove': function(e) {
// scrollHeader(); // Replace this with your code.
// }
// });
// //Smooth scroll to start
// $('#to-start').click(function(){
...
...
user/themes/textbook/templates/partials/base.html.twig
View file @
676eb570
...
...
@@ -31,7 +31,7 @@
{# … No we did not, not until we remake the language selector #}
{%
do
assets.addJs
(
'jquery'
,
101
)
%}
{#
{
% do assets.addJs('theme://js/jquery.treemenu.js',
{
group:'bottom'}) %}#}
{%
do
assets.addJs
(
'theme://js/site.js'
,
{
group
:
'bottom'
}
)
%
}
{#
{
% do assets.addJs('theme://js/site.js',
{
group:'bottom'}) %}#
}
{%
endblock
%}
{{
assets.js
()
|
raw
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment