Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
338
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
23
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
6cd3c3e9
Commit
6cd3c3e9
authored
8 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
✌️
parent
201f48d7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/web/app/dev/router.js
+42
-0
42 additions, 0 deletions
src/web/app/dev/router.js
src/web/app/dev/router.ls
+0
-51
0 additions, 51 deletions
src/web/app/dev/router.ls
src/web/app/dev/script.js
+2
-2
2 additions, 2 deletions
src/web/app/dev/script.js
with
44 additions
and
53 deletions
src/web/app/dev/router.js
0 → 100644
+
42
−
0
View file @
6cd3c3e9
const
route
=
require
(
'
page
'
);
let
page
=
null
;
module
.
exports
=
me
=>
{
route
(
'
/
'
,
index
);
route
(
'
/apps
'
,
apps
);
route
(
'
/app/new
'
,
newApp
);
route
(
'
/app/:app
'
,
app
);
route
(
'
*
'
,
notFound
);
function
index
()
{
mount
(
document
.
createElement
(
'
mk-index
'
));
}
function
apps
()
{
mount
(
document
.
createElement
(
'
mk-apps-page
'
));
}
function
newApp
()
{
mount
(
document
.
createElement
(
'
mk-new-app-page
'
));
}
function
app
(
ctx
)
{
const
el
=
document
.
createElement
(
'
mk-app-page
'
);
el
.
setAttribute
(
'
app
'
,
ctx
.
params
.
app
);
mount
(
el
);
}
function
notFound
()
{
mount
(
document
.
createElement
(
'
mk-not-found
'
));
}
// EXEC
route
();
};
const
riot
=
require
(
'
riot
'
);
function
mount
(
content
)
{
if
(
page
)
page
.
unmount
();
const
body
=
document
.
getElementById
(
'
app
'
);
page
=
riot
.
mount
(
body
.
appendChild
(
content
))[
0
];
}
This diff is collapsed.
Click to expand it.
src/web/app/dev/router.ls
deleted
100644 → 0
+
0
−
51
View file @
201f48d7
# Router
#================================
route
=
require
\page
page
=
null
module
.
exports
=
(
me
)
~>
# Routing
#--------------------------------
route
\/
index
route
\/apps
apps
route
\/app/new
new-app
route
\/app/:app
app
route
\*
not-found
# Handlers
#--------------------------------
function
index
mount
document
.
create-element
\mk-index
function
apps
mount
document
.
create-element
\mk-apps-page
function
new-app
mount
document
.
create-element
\mk-new-app-page
function
app
ctx
document
.
create-element
\mk-app-page
..
set-attribute
\app
ctx
.
params
.
app
..
|>
mount
function
not-found
mount
document
.
create-element
\mk-not-found
# Exec
#--------------------------------
route
!
# Mount
#================================
riot
=
require
\riot
function
mount
content
if
page
?
then
page
.
unmount
!
body
=
document
.
get-element-by-id
\app
page
:=
riot
.
mount
body
.
append-child
content
.
0
This diff is collapsed.
Click to expand it.
src/web/app/dev/script.js
+
2
−
2
View file @
6cd3c3e9
...
...
@@ -3,8 +3,8 @@
*/
require
(
'
./tags
'
);
const
boot
=
require
(
'
../boot
.js
'
);
const
route
=
require
(
'
./router
.ls
'
);
const
boot
=
require
(
'
../boot
'
);
const
route
=
require
(
'
./router
'
);
/**
* Boot
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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