Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jan 4, 2013
1 parent acd8fe2 commit 686f12b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion page/handle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion page/page.css
Expand Up @@ -37,11 +37,20 @@ p {
margin: 0px;
}
#readme {
padding: 6px;
padding: 10px;
}
#readme p {
line-height: 10px;
}
#readme h1 {
font-size: 20px;
}
#readme h3 {
margin: -10px 0px;
}
#readme code {
display: inline-block;
}
#click {
background: #fad1d1;
}
8 changes: 8 additions & 0 deletions readme.md
Expand Up @@ -18,6 +18,14 @@ Originally parsted on Gist: https://gist.github.com/2498711
After a long time, I found it was almost what I wanted.
So I will make it a repo, hope it helps.

### Referece and Thanks

I used `highlight.js` to highlight my CoffeeScript source code:
https://github.com/isagalaev/highlight.js

And `pagedown` to render README file into HTML:
http://code.google.com/p/pagedown/wiki/PageDown

### License

MIT
2 changes: 1 addition & 1 deletion src/handle.coffee
Expand Up @@ -56,7 +56,7 @@ window.onload = ->
@text "This is all my code for implementing Lilyturf:"
@pre id: "source",
@code class: "coffeescript",
@text res.target.response
@html res.target.response
(q "#code").insertAdjacentHTML "beforeend", block
hljs.highlightBlock (q "#code").querySelector("pre")

Expand Down
7 changes: 6 additions & 1 deletion src/lilyturf.coffee
Expand Up @@ -15,7 +15,12 @@ lilyturf =
attrs = ""
for key, value of obj then attrs += " #{key}='#{value}'"
attrs
text: (text) -> text
text: (text) ->
text
.replace(/&/g,"&")
.replace(/</g,"&lt;")
.replace(/>/g,"&gt;")
.replace(/ /,"&nbsp;")
html: (html) -> html

dom_way:
Expand Down
11 changes: 10 additions & 1 deletion src/page.styl
Expand Up @@ -38,10 +38,19 @@ p
margin 0px

#readme
padding 6px
padding 10px

p
line-height 10px

h1
font-size 20px

h3
margin -10px 0px

code
display inline-block

#click
background hsl(0,80,90)

0 comments on commit 686f12b

Please sign in to comment.