Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs-editor
Commits
94eb66ce
Commit
94eb66ce
authored
Jun 08, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix links on home page
parent
a824d34e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
4 deletions
+54
-4
gadget/gadget_cribjs_page_cribjs_home.html
gadget/gadget_cribjs_page_cribjs_home.html
+10
-4
gadget/gadget_cribjs_page_cribjs_home.js
gadget/gadget_cribjs_page_cribjs_home.js
+44
-0
No files found.
gadget/gadget_cribjs_page_cribjs_home.html
View file @
94eb66ce
...
...
@@ -5,6 +5,12 @@
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<!-- renderjs -->
<script
src=
"../lib/rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"./gadget_cribjs_page_cribjs_home.js"
type=
"text/javascript"
></script>
<title>
CribJS Header
</title>
</head>
...
...
@@ -18,10 +24,10 @@
See how it is made, modify it, improve it.
Start developping your own way. Feel free to make this place your own crib.
</p>
<ul>
<li>
1. Browse the
<a
href=
"#view
=url_list"
>
list of URLs
</a>
you wish to edit
</li>
<li>
2. Edit and add files in your
<a
href=
"#view
=editor"
>
Editor
</a></li>
<li>
3.
<a
href=
"#view
=save_load"
>
Export and Import
</a>
your copy of the web locally and remotly
</li>
<li>
4.
<a
href=
"#view
=mass_remove"
>
Remove
</a>
uncessary URLs
</li>
<li>
1. Browse the
<a
class=
"url_list"
href=
"#page
=url_list"
>
list of URLs
</a>
you wish to edit
</li>
<li>
2. Edit and add files in your
<a
class=
"editor"
href=
"#page
=editor"
>
Editor
</a></li>
<li>
3.
<a
class=
"save_load"
href=
"#page
=save_load"
>
Export and Import
</a>
your copy of the web locally and remotly
</li>
<li>
4.
<a
class=
"mass_remove"
href=
"#page
=mass_remove"
>
Remove
</a>
uncessary URLs
</li>
</ul>
<p>
Have fun building the web :), here is your
<a
href=
"../crib-editor/todo.txt"
>
TODO list
</a>
.
</p>
</div>
...
...
gadget/gadget_cribjs_page_cribjs_home.js
0 → 100644
View file @
94eb66ce
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, Handlebars, document, loopEventListener, RSVP */
(
function
(
window
,
rJS
,
document
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Assign the element to a variable
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
//////////////////////////////////////////////
// acquired methods
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
,
page_list
=
[
"
url_list
"
,
"
editor
"
,
"
save_load
"
,
"
mass_remove
"
],
promise_list
=
[];
page_list
.
forEach
(
function
(
page
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
page
:
page
}))
})
// Handle main title
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
link_list
)
{
for
(
var
i
=
0
;
i
<
link_list
.
length
;
i
++
)
{
gadget
.
props
.
element
.
querySelector
(
"
.
"
+
page_list
[
i
]).
href
=
link_list
[
i
]
}
});
})
}(
window
,
rJS
,
document
,
RSVP
));
\ No newline at end of file
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