Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
cc98fa4e
Commit
cc98fa4e
authored
Feb 03, 2015
by
Arthur Verschaeve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate vanilla JS example to `todomvc-app-css`
parent
52040902
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
585 additions
and
3369 deletions
+585
-3369
examples/vanillajs/.gitignore
examples/vanillajs/.gitignore
+6
-0
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine-html.js
...bower_components/jasmine/lib/jasmine-core/jasmine-html.js
+0
-681
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine.css
...ajs/bower_components/jasmine/lib/jasmine-core/jasmine.css
+0
-82
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine.js
...lajs/bower_components/jasmine/lib/jasmine-core/jasmine.js
+0
-2600
examples/vanillajs/bower_components/todomvc-common/bg.png
examples/vanillajs/bower_components/todomvc-common/bg.png
+0
-0
examples/vanillajs/index.html
examples/vanillajs/index.html
+3
-2
examples/vanillajs/node_modules/todomvc-app-css/index.css
examples/vanillajs/node_modules/todomvc-app-css/index.css
+394
-0
examples/vanillajs/node_modules/todomvc-common/base.css
examples/vanillajs/node_modules/todomvc-common/base.css
+141
-0
examples/vanillajs/node_modules/todomvc-common/base.js
examples/vanillajs/node_modules/todomvc-common/base.js
+27
-0
examples/vanillajs/package.json
examples/vanillajs/package.json
+10
-0
examples/vanillajs/test/SpecRunner.html
examples/vanillajs/test/SpecRunner.html
+4
-4
No files found.
examples/vanillajs/.gitignore
0 → 100644
View file @
cc98fa4e
node_modules/todomvc-app-css
!node_modules/todomvc-app-css/index.css
node_modules/todomvc-common
!node_modules/todomvc-common/base.js
!node_modules/todomvc-common/base.css
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine-html.js
deleted
100644 → 0
View file @
52040902
This diff is collapsed.
Click to expand it.
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine.css
deleted
100644 → 0
View file @
52040902
body
{
background-color
:
#eeeeee
;
padding
:
0
;
margin
:
5px
;
overflow-y
:
scroll
;
}
#HTMLReporter
{
font-size
:
11px
;
font-family
:
Monaco
,
"Lucida Console"
,
monospace
;
line-height
:
14px
;
color
:
#333333
;
}
#HTMLReporter
a
{
text-decoration
:
none
;
}
#HTMLReporter
a
:hover
{
text-decoration
:
underline
;
}
#HTMLReporter
p
,
#HTMLReporter
h1
,
#HTMLReporter
h2
,
#HTMLReporter
h3
,
#HTMLReporter
h4
,
#HTMLReporter
h5
,
#HTMLReporter
h6
{
margin
:
0
;
line-height
:
14px
;
}
#HTMLReporter
.banner
,
#HTMLReporter
.symbolSummary
,
#HTMLReporter
.summary
,
#HTMLReporter
.resultMessage
,
#HTMLReporter
.specDetail
.description
,
#HTMLReporter
.alert
.bar
,
#HTMLReporter
.stackTrace
{
padding-left
:
9px
;
padding-right
:
9px
;
}
#HTMLReporter
#jasmine_content
{
position
:
fixed
;
right
:
100%
;
}
#HTMLReporter
.version
{
color
:
#aaaaaa
;
}
#HTMLReporter
.banner
{
margin-top
:
14px
;
}
#HTMLReporter
.duration
{
color
:
#aaaaaa
;
float
:
right
;
}
#HTMLReporter
.symbolSummary
{
overflow
:
hidden
;
*
zoom
:
1
;
margin
:
14px
0
;
}
#HTMLReporter
.symbolSummary
li
{
display
:
block
;
float
:
left
;
height
:
7px
;
width
:
14px
;
margin-bottom
:
7px
;
font-size
:
16px
;
}
#HTMLReporter
.symbolSummary
li
.passed
{
font-size
:
14px
;
}
#HTMLReporter
.symbolSummary
li
.passed
:before
{
color
:
#5e7d00
;
content
:
"\02022"
;
}
#HTMLReporter
.symbolSummary
li
.failed
{
line-height
:
9px
;
}
#HTMLReporter
.symbolSummary
li
.failed
:before
{
color
:
#b03911
;
content
:
"x"
;
font-weight
:
bold
;
margin-left
:
-1px
;
}
#HTMLReporter
.symbolSummary
li
.skipped
{
font-size
:
14px
;
}
#HTMLReporter
.symbolSummary
li
.skipped
:before
{
color
:
#bababa
;
content
:
"\02022"
;
}
#HTMLReporter
.symbolSummary
li
.pending
{
line-height
:
11px
;
}
#HTMLReporter
.symbolSummary
li
.pending
:before
{
color
:
#aaaaaa
;
content
:
"-"
;
}
#HTMLReporter
.exceptions
{
color
:
#fff
;
float
:
right
;
margin-top
:
5px
;
margin-right
:
5px
;
}
#HTMLReporter
.bar
{
line-height
:
28px
;
font-size
:
14px
;
display
:
block
;
color
:
#eee
;
}
#HTMLReporter
.runningAlert
{
background-color
:
#666666
;
}
#HTMLReporter
.skippedAlert
{
background-color
:
#aaaaaa
;
}
#HTMLReporter
.skippedAlert
:first-child
{
background-color
:
#333333
;
}
#HTMLReporter
.skippedAlert
:hover
{
text-decoration
:
none
;
color
:
white
;
text-decoration
:
underline
;
}
#HTMLReporter
.passingAlert
{
background-color
:
#a6b779
;
}
#HTMLReporter
.passingAlert
:first-child
{
background-color
:
#5e7d00
;
}
#HTMLReporter
.failingAlert
{
background-color
:
#cf867e
;
}
#HTMLReporter
.failingAlert
:first-child
{
background-color
:
#b03911
;
}
#HTMLReporter
.results
{
margin-top
:
14px
;
}
#HTMLReporter
#details
{
display
:
none
;
}
#HTMLReporter
.resultsMenu
,
#HTMLReporter
.resultsMenu
a
{
background-color
:
#fff
;
color
:
#333333
;
}
#HTMLReporter
.showDetails
.summaryMenuItem
{
font-weight
:
normal
;
text-decoration
:
inherit
;
}
#HTMLReporter
.showDetails
.summaryMenuItem
:hover
{
text-decoration
:
underline
;
}
#HTMLReporter
.showDetails
.detailsMenuItem
{
font-weight
:
bold
;
text-decoration
:
underline
;
}
#HTMLReporter
.showDetails
.summary
{
display
:
none
;
}
#HTMLReporter
.showDetails
#details
{
display
:
block
;
}
#HTMLReporter
.summaryMenuItem
{
font-weight
:
bold
;
text-decoration
:
underline
;
}
#HTMLReporter
.summary
{
margin-top
:
14px
;
}
#HTMLReporter
.summary
.suite
.suite
,
#HTMLReporter
.summary
.specSummary
{
margin-left
:
14px
;
}
#HTMLReporter
.summary
.specSummary.passed
a
{
color
:
#5e7d00
;
}
#HTMLReporter
.summary
.specSummary.failed
a
{
color
:
#b03911
;
}
#HTMLReporter
.description
+
.suite
{
margin-top
:
0
;
}
#HTMLReporter
.suite
{
margin-top
:
14px
;
}
#HTMLReporter
.suite
a
{
color
:
#333333
;
}
#HTMLReporter
#details
.specDetail
{
margin-bottom
:
28px
;
}
#HTMLReporter
#details
.specDetail
.description
{
display
:
block
;
color
:
white
;
background-color
:
#b03911
;
}
#HTMLReporter
.resultMessage
{
padding-top
:
14px
;
color
:
#333333
;
}
#HTMLReporter
.resultMessage
span
.result
{
display
:
block
;
}
#HTMLReporter
.stackTrace
{
margin
:
5px
0
0
0
;
max-height
:
224px
;
overflow
:
auto
;
line-height
:
18px
;
color
:
#666666
;
border
:
1px
solid
#ddd
;
background
:
white
;
white-space
:
pre
;
}
#TrivialReporter
{
padding
:
8px
13px
;
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
overflow-y
:
scroll
;
background-color
:
white
;
font-family
:
"Helvetica Neue Light"
,
"Lucida Grande"
,
"Calibri"
,
"Arial"
,
sans-serif
;
/*.resultMessage {*/
/*white-space: pre;*/
/*}*/
}
#TrivialReporter
a
:visited
,
#TrivialReporter
a
{
color
:
#303
;
}
#TrivialReporter
a
:hover
,
#TrivialReporter
a
:active
{
color
:
blue
;
}
#TrivialReporter
.run_spec
{
float
:
right
;
padding-right
:
5px
;
font-size
:
.8em
;
text-decoration
:
none
;
}
#TrivialReporter
.banner
{
color
:
#303
;
background-color
:
#fef
;
padding
:
5px
;
}
#TrivialReporter
.logo
{
float
:
left
;
font-size
:
1.1em
;
padding-left
:
5px
;
}
#TrivialReporter
.logo
.version
{
font-size
:
.6em
;
padding-left
:
1em
;
}
#TrivialReporter
.runner.running
{
background-color
:
yellow
;
}
#TrivialReporter
.options
{
text-align
:
right
;
font-size
:
.8em
;
}
#TrivialReporter
.suite
{
border
:
1px
outset
gray
;
margin
:
5px
0
;
padding-left
:
1em
;
}
#TrivialReporter
.suite
.suite
{
margin
:
5px
;
}
#TrivialReporter
.suite.passed
{
background-color
:
#dfd
;
}
#TrivialReporter
.suite.failed
{
background-color
:
#fdd
;
}
#TrivialReporter
.spec
{
margin
:
5px
;
padding-left
:
1em
;
clear
:
both
;
}
#TrivialReporter
.spec.failed
,
#TrivialReporter
.spec.passed
,
#TrivialReporter
.spec.skipped
{
padding-bottom
:
5px
;
border
:
1px
solid
gray
;
}
#TrivialReporter
.spec.failed
{
background-color
:
#fbb
;
border-color
:
red
;
}
#TrivialReporter
.spec.passed
{
background-color
:
#bfb
;
border-color
:
green
;
}
#TrivialReporter
.spec.skipped
{
background-color
:
#bbb
;
}
#TrivialReporter
.messages
{
border-left
:
1px
dashed
gray
;
padding-left
:
1em
;
padding-right
:
1em
;
}
#TrivialReporter
.passed
{
background-color
:
#cfc
;
display
:
none
;
}
#TrivialReporter
.failed
{
background-color
:
#fbb
;
}
#TrivialReporter
.skipped
{
color
:
#777
;
background-color
:
#eee
;
display
:
none
;
}
#TrivialReporter
.resultMessage
span
.result
{
display
:
block
;
line-height
:
2em
;
color
:
black
;
}
#TrivialReporter
.resultMessage
.mismatch
{
color
:
black
;
}
#TrivialReporter
.stackTrace
{
white-space
:
pre
;
font-size
:
.8em
;
margin-left
:
10px
;
max-height
:
5em
;
overflow
:
auto
;
border
:
1px
inset
red
;
padding
:
1em
;
background
:
#eef
;
}
#TrivialReporter
.finished-at
{
padding-left
:
1em
;
font-size
:
.6em
;
}
#TrivialReporter
.show-passed
.passed
,
#TrivialReporter
.show-skipped
.skipped
{
display
:
block
;
}
#TrivialReporter
#jasmine_content
{
position
:
fixed
;
right
:
100%
;
}
#TrivialReporter
.runner
{
border
:
1px
solid
gray
;
display
:
block
;
margin
:
5px
0
;
padding
:
2px
0
2px
10px
;
}
examples/vanillajs/bower_components/jasmine/lib/jasmine-core/jasmine.js
deleted
100644 → 0
View file @
52040902
This diff is collapsed.
Click to expand it.
examples/vanillajs/bower_components/todomvc-common/bg.png
deleted
100644 → 0
View file @
52040902
2.08 KB
examples/vanillajs/index.html
View file @
cc98fa4e
...
...
@@ -3,7 +3,8 @@
<head>
<meta
charset=
"utf-8"
>
<title>
VanillaJS • TodoMVC
</title>
<link
rel=
"stylesheet"
href=
"bower_components/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-common/base.css"
>
<link
rel=
"stylesheet"
href=
"node_modules/todomvc-app-css/index.css"
>
</head>
<body>
<section
id=
"todoapp"
>
...
...
@@ -38,7 +39,7 @@
<p>
Refactored by
<a
href=
"https://github.com/cburgmer"
>
Christoph Burgmer
</a></p>
<p>
Part of
<a
href=
"http://todomvc.com"
>
TodoMVC
</a></p>
</footer>
<script
src=
"
bower_component
s/todomvc-common/base.js"
></script>
<script
src=
"
node_module
s/todomvc-common/base.js"
></script>
<script
src=
"js/helpers.js"
></script>
<script
src=
"js/store.js"
></script>
<script
src=
"js/model.js"
></script>
...
...
examples/vanillajs/
bower_components/todomvc-common/base
.css
→
examples/vanillajs/
node_modules/todomvc-app-css/index
.css
View file @
cc98fa4e
This diff is collapsed.
Click to expand it.
examples/vanillajs/node_modules/todomvc-common/base.css
0 → 100644
View file @
cc98fa4e
hr
{
margin
:
20px
0
;
border
:
0
;
border-top
:
1px
dashed
#c5c5c5
;
border-bottom
:
1px
dashed
#f7f7f7
;
}
.learn
a
{
font-weight
:
normal
;
text-decoration
:
none
;
color
:
#b83f45
;
}
.learn
a
:hover
{
text-decoration
:
underline
;
color
:
#787e7e
;
}
.learn
h3
,
.learn
h4
,
.learn
h5
{
margin
:
10px
0
;
font-weight
:
500
;
line-height
:
1.2
;
color
:
#000
;
}
.learn
h3
{
font-size
:
24px
;
}
.learn
h4
{
font-size
:
18px
;
}
.learn
h5
{
margin-bottom
:
0
;
font-size
:
14px
;
}
.learn
ul
{
padding
:
0
;
margin
:
0
0
30px
25px
;
}
.learn
li
{
line-height
:
20px
;
}
.learn
p
{
font-size
:
15px
;
font-weight
:
300
;
line-height
:
1.3
;
margin-top
:
0
;
margin-bottom
:
0
;
}
#issue-count
{
display
:
none
;
}
.quote
{
border
:
none
;
margin
:
20px
0
60px
0
;
}
.quote
p
{
font-style
:
italic
;
}
.quote
p
:before
{
content
:
'“'
;
font-size
:
50px
;
opacity
:
.15
;
position
:
absolute
;
top
:
-20px
;
left
:
3px
;
}
.quote
p
:after
{
content
:
'”'
;
font-size
:
50px
;
opacity
:
.15
;
position
:
absolute
;
bottom
:
-42px
;
right
:
3px
;
}
.quote
footer
{
position
:
absolute
;
bottom
:
-40px
;
right
:
0
;
}
.quote
footer
img
{
border-radius
:
3px
;
}
.quote
footer
a
{
margin-left
:
5px
;
vertical-align
:
middle
;
}
.speech-bubble
{
position
:
relative
;
padding
:
10px
;
background
:
rgba
(
0
,
0
,
0
,
.04
);
border-radius
:
5px
;
}
.speech-bubble
:after
{
content
:
''
;
position
:
absolute
;
top
:
100%
;
right
:
30px
;
border
:
13px
solid
transparent
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.04
);
}
.learn-bar
>
.learn
{
position
:
absolute
;
width
:
272px
;
top
:
8px
;
left
:
-300px
;
padding
:
10px
;
border-radius
:
5px
;
background-color
:
rgba
(
255
,
255
,
255
,
.6
);
transition-property
:
left
;
transition-duration
:
500ms
;
}
@media
(
min-width
:
899px
)
{
.learn-bar
{
width
:
auto
;
padding-left
:
300px
;
}
.learn-bar
>
.learn
{
left
:
8px
;
}
}
examples/vanillajs/
bower_component
s/todomvc-common/base.js
→
examples/vanillajs/
node_module
s/todomvc-common/base.js
View file @
cc98fa4e
/* global _ */
(
function
()
{
'
use strict
'
;
/* jshint ignore:start */
// Underscore's Template Module
// Courtesy of underscorejs.org
var
_
=
(
function
(
_
)
{
...
...
@@ -114,6 +116,7 @@
if
(
location
.
hostname
===
'
todomvc.com
'
)
{
window
.
_gaq
=
[[
'
_setAccount
'
,
'
UA-31081062-1
'
],[
'
_trackPageview
'
]];(
function
(
d
,
t
){
var
g
=
d
.
createElement
(
t
),
s
=
d
.
getElementsByTagName
(
t
)[
0
];
g
.
src
=
'
//www.google-analytics.com/ga.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
)}(
document
,
'
script
'
));
}
/* jshint ignore:end */
function
redirect
()
{
if
(
location
.
hostname
===
'
tastejs.github.io
'
)
{
...
...
@@ -175,13 +178,17 @@
if
(
learnJSON
.
backend
)
{
this
.
frameworkJSON
=
learnJSON
.
backend
;
this
.
frameworkJSON
.
issueLabel
=
framework
;
this
.
append
({
backend
:
true
});
}
else
if
(
learnJSON
[
framework
])
{
this
.
frameworkJSON
=
learnJSON
[
framework
];
this
.
frameworkJSON
.
issueLabel
=
framework
;
this
.
append
();
}
this
.
fetchIssueCount
();
}
Learn
.
prototype
.
append
=
function
(
opts
)
{
...
...
@@ -212,6 +219,26 @@
document
.
body
.
insertAdjacentHTML
(
'
afterBegin
'
,
aside
.
outerHTML
);
};
Learn
.
prototype
.
fetchIssueCount
=
function
()
{
var
issueLink
=
document
.
getElementById
(
'
issue-count-link
'
);
if
(
issueLink
)
{
var
url
=
issueLink
.
href
.
replace
(
'
https://github.com
'
,
'
https://api.github.com/repos
'
);
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'
GET
'
,
url
,
true
);
xhr
.
onload
=
function
(
e
)
{
var
parsedResponse
=
JSON
.
parse
(
e
.
target
.
responseText
);
if
(
parsedResponse
instanceof
Array
)
{
var
count
=
parsedResponse
.
length
if
(
count
!==
0
)
{
issueLink
.
innerHTML
=
'
This app has
'
+
count
+
'
open issues
'
;
document
.
getElementById
(
'
issue-count
'
).
style
.
display
=
'
inline
'
;
}
}
};
xhr
.
send
();
}
};
redirect
();
getFile
(
'
learn.json
'
,
Learn
);
})();
examples/vanillajs/
bower
.json
→
examples/vanillajs/
package
.json
View file @
cc98fa4e
{
"name"
:
"todomvc-vanillajs"
,
"version"
:
"0.0.0"
,
"private"
:
true
,
"dependencies"
:
{
"todomvc-common"
:
"~0.3.0"
"todomvc-common"
:
"^1.0.1"
,
"todomvc-app-css"
:
"^1.0.1"
},
"devDependencies"
:
{
"jasmine
"
:
"~1.3.1
"
"jasmine
-core"
:
"^0.3.0
"
}
}
examples/vanillajs/test/SpecRunner.html
View file @
cc98fa4e
...
...
@@ -3,12 +3,12 @@
<head>
<title>
Jasmine Spec Runner
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../bower_component
s/jasmine/lib/jasmine-core/jasmine.css"
>
<script
type=
"text/javascript"
src=
"../bower_component
s/jasmine/lib/jasmine-core/jasmine.js"
></script>
<script
type=
"text/javascript"
src=
"../bower_component
s/jasmine/lib/jasmine-core/jasmine-html.js"
></script>
<link
rel=
"stylesheet"
href=
"../node_module
s/jasmine/lib/jasmine-core/jasmine.css"
>
<script
src=
"../node_module
s/jasmine/lib/jasmine-core/jasmine.js"
></script>
<script
src=
"../node_module
s/jasmine/lib/jasmine-core/jasmine-html.js"
></script>
<!-- include spec files here... -->
<script
type=
"text/javascript"
src=
"ControllerSpec.js"
></script>
<script
src=
"ControllerSpec.js"
></script>
<!-- include source files here... -->
<script>
...
...
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