An open API service indexing awesome lists of open source software.

https://github.com/ctxhou/onepage

Simple way to create onepage website.
https://github.com/ctxhou/onepage

Last synced: 11 months ago
JSON representation

Simple way to create onepage website.

Awesome Lists containing this project

README

          

# onepage

Simple way to create onepage website.

## Usage

### Including files:

```html

```

### HTML structure

**Set one content in each page view**

```html



First View


Second View


Third View




```
**Set multi content in some page views**

insert `page_content` class in page_view

```html



First View




second view first content




second view second content




Third View




```

**Set the header anchor link**

```html
choice1
choice2
choice3
```

### Initialization
Default Initialization:

```javascript
$("#onepage").onepage();
```
Alter options:

```javascript
$("#onepage").onepage({
'resize': true,
'navLink': '.header-choice-link',
'sectionSelector': '.page_view',
'bg_color': '["yellow", "blue"]'
});
```

### Options

| Options | value | default | explain |example|
|-----------------|--------------|---------------------|--------------------------------------------|--------------------------------------------|
| resize | true / false | true | true: page_view is full height; vice versa ||
| navLink | class name | .header-choice-link | customize your header link class ||
| sectionSelector | class name | .page_view | customize your section view class ||
| bkg_color | [section color] | [ ] | customize your section color |[["#aaa","blue"], "tomato"]|

## Develop
### Environment

First, install the needed ruby gem

bundle install

### Compile css file

compass watch


#License

MIT