Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lesson Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
prace-lessons
Lesson Template
Commits
355f699b
Commit
355f699b
authored
8 years ago
by
Rémi Emonet
Browse files
Options
Downloads
Patches
Plain Diff
Making challenges foldable
parent
e17b8ca3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/css/lesson.scss
+7
-0
7 additions, 0 deletions
assets/css/lesson.scss
assets/js/lesson.js
+10
-0
10 additions, 0 deletions
assets/js/lesson.js
with
17 additions
and
0 deletions
assets/css/lesson.scss
+
7
−
0
View file @
355f699b
...
...
@@ -136,3 +136,10 @@ ul,
ol
{
padding-left
:
1em
;
}
span
.fold-unfold
{
margin-left
:
1em
;
font-size
:
95%
;
opacity
:
0
.5
;
}
This diff is collapsed.
Click to expand it.
assets/js/lesson.js
+
10
−
0
View file @
355f699b
// Make all tables striped by default.
$
(
"
table
"
).
addClass
(
"
table table-striped
"
);
// Handle foldable challenges (on click and at start)
$
(
"
.challenge
"
).
click
(
function
(
event
)
{
$
(
"
>*:not(h2)
"
,
this
).
toggle
(
400
);
});
$
(
"
.challenge
"
).
each
(
function
()
{
$
(
"
>*:not(h2)
"
,
this
).
toggle
();
var
h2
=
$
(
"
h2:first
"
,
this
);
h2
.
append
(
"
<span class='fold-unfold'>(click to fold/unfold)</span>
"
);
});
// Handle searches.
// Relies on document having 'meta' element with name 'search-domain'.
function
google_search
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment