Skip to content

Commit

Permalink
Add hello seajs demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lifesinger committed Oct 16, 2012
1 parent cfe144a commit d601172
Show file tree
Hide file tree
Showing 35 changed files with 11,139 additions and 182 deletions.
4 changes: 2 additions & 2 deletions docs/assets/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ p.copyright {

/* for mobile device */
@media screen and (max-width: 1200px) {
.extra { display: none; }
#extra { display: none; }
}


Expand All @@ -304,7 +304,7 @@ p.copyright {
}


/* misc style */
/* code style */
pre, code {
font-size: 14px;
font-family: Monaco, Consolas, "Lucida Console", monospace;
Expand Down
21 changes: 14 additions & 7 deletions docs/assets/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ define('home', [], function(require) {

var navs = document.getElementById('nav').getElementsByTagName('a')
var pages = getElementsByClassName('content', 'page')
var introInited = false
var extraInited = false

updateView()
bindEvents()
updateView()


// Helpers
Expand All @@ -28,9 +28,9 @@ define('home', [], function(require) {
if (document.getElementById('page-' + pageId)) {
setActiveNav(pageId)
setActivePage(pageId)
window.scrollTo(0, 0)
}

window.scrollTo(0, 0)
}

function setActiveNav(pageId) {
Expand All @@ -48,7 +48,14 @@ define('home', [], function(require) {
page.className = isActive ? 'page page-active' : 'page'
}

if (pageId === 'intro') initIntroPage()
if (pageId === 'intro' || pageId === 'quick-start') {
initExtra()

var iframe = document.getElementById('#quick-start-iframe')
if (iframe) {
iframe.src += new Date().getTime()
}
}
}

function bindEvents() {
Expand Down Expand Up @@ -77,8 +84,8 @@ define('home', [], function(require) {
return document.getElementById('page-' + href.replace(/.*#(\w+).*/, '$1'))
}

function initIntroPage() {
if (introInited) return
function initExtra() {
if (extraInited) return

require.async('highlight', function(highlight) {
highlight.init()
Expand All @@ -88,7 +95,7 @@ define('home', [], function(require) {
initLazySrc($)
})

introInited = true
extraInited = true
}

function initLazySrc($) {
Expand Down
9 changes: 0 additions & 9 deletions docs/assets/quick-start/hello.js

This file was deleted.

Binary file added docs/examples/hello-seajs/assets/images/a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/e2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/j.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/l2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/o.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/hello-seajs/assets/images/s2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading

0 comments on commit d601172

Please sign in to comment.