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
224c4c02
Commit
224c4c02
authored
May 04, 2019
by
Goutte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore the site javascript.
parent
e3c02c56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
site.js
user/themes/quark/js/site.js
+23
-23
base.html.twig
user/themes/textbook/templates/partials/base.html.twig
+1
-1
No files found.
user/themes/quark/js/site.js
View file @
224c4c02
...
...
@@ -32,28 +32,28 @@ jQuery(document).ready(function($){
}
});
//Smooth scroll to start
$
(
'#to-start'
).
click
(
function
(){
var
start_y
=
$
(
'#start'
).
position
().
top
;
var
header_offset
=
45
;
window
.
scroll
({
top
:
start_y
-
header_offset
,
left
:
0
,
behavior
:
'smooth'
});
return
false
;
});
//Smooth scroll to top
$
(
'#to-top'
).
click
(
function
(){
window
.
scroll
({
top
:
0
,
left
:
0
,
behavior
:
'smooth'
});
return
false
;
});
// Responsive Menu
$
(
'#toggle'
).
click
(
function
()
{
$
(
this
).
toggleClass
(
'active'
);
$
(
'#overlay'
).
toggleClass
(
'open'
);
$
(
'body'
).
toggleClass
(
'mobile-nav-open'
);
});
// Tree Menu
$
(
".tree"
).
treemenu
({
delay
:
300
});
//
//
Smooth scroll to start
//
$('#to-start').click(function(){
//
var start_y = $('#start').position().top;
//
var header_offset = 45;
//
window.scroll({ top: start_y - header_offset, left: 0, behavior: 'smooth' });
//
return false;
//
});
//
//
//
Smooth scroll to top
//
$('#to-top').click(function(){
//
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
//
return false;
//
});
//
//
//
Responsive Menu
//
$('#toggle').click(function () {
//
$(this).toggleClass('active');
//
$('#overlay').toggleClass('open');
//
$('body').toggleClass('mobile-nav-open');
//
});
//
//
//
Tree Menu
//
$(".tree").treemenu({delay:300});
});
user/themes/textbook/templates/partials/base.html.twig
View file @
224c4c02
...
...
@@ -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