Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reorganized life using roots #45

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/public/
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 Lim Chee Aun <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,34 @@ How to setup your own *Life*
----------------------------

1. Fork this project.
2. `git checkout -b gh-pages` (or any branch name you like)
3. Make a copy of `life.example.md`, rename it to `life.md`.
4. Add your life events into `life.md`.
5. Preview it on a local server. Use [`python -m SimpleHTTPServer`](http://docs.python.org/2/library/simplehttpserver.html) or [`http-server`](https://github.com/nodeapps/http-server).
6. Commit `life.md` (not in `master` branch).
7. `git push origin gh-pages -f` and publish to [GitHub Pages](http://pages.github.com/).
8. Update the website link in your GitHub repo description.
9. Tell the world about your Life.
10. Add your Life to the [Lives](https://github.com/cheeaun/life/wiki/Lives) page.
2. install [roots](http://roots.cx): `npm install roots -g`
3. Add your life events into `life.md`.
4. Preview your life by running `roots watch` from within the project directory.
5. When you like it, run `roots compile`.
6. `./public/index.html` is the resulting self-contained, compiled life.
7. Commit `life.md`.
8. Use `roots deploy --gh-pages` to deploy your life to [GitHub Pages](http://pages.github.com/)
9. Update the website link in your GitHub repo description.
10. Tell the world about your Life.
11. Add your Life to the [Lives](https://github.com/cheeaun/life/wiki/Lives) page.

How to upgrade your *Life*
--------------------------

1. `git checkout master`
2. `git remote add cheeaun https://github.com/cheeaun/life.git`
3. `git fetch cheeaun` and `git merge cheeaun/master` to upgrade to latest Life.
4. `git checkout gh-pages` and `git merge master` to sync changes back to GitHub Pages.
Fetch this repo and rebase your configuration on top of it.

[Learn more](https://help.github.com/articles/fork-a-repo).

For those who forked the earlier version of Life, these are the steps that I would recommend (requires some Git-fu):
For those who forked the earlier version of Life, these are the steps that I would recommend:

1. Backup your `life.md`.
2. Reset (hard) your fork to this repo's `master` branch.
3. Clean up your `gh-pages`.
4. Re-commit your `life.md` there.
5. Make sure your `master` branch is untouched so that future updates work.
3. Re-commit your `life.md`.

How to configure your *Life*
----------------------------

1. Make a copy of `config.example.json`, rename it to `config.json`.
2. Only commit it in `gh-pages` branch.
Edit `lifeConfig` in `app.coffee`.

The configuration:

Expand Down
17 changes: 17 additions & 0 deletions app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
fs = require 'fs'

# roots v2.1.2
# Files in this list will not be compiled - minimatch supported
ignore_files: ['_*', 'README*', '.gitignore', '.DS_Store', 'life.md', 'LICENSE']
ignore_folders: ['.git', 'css', 'js']

layouts:
default: 'layout.jade'

locals:
lifeConfig: JSON.stringify(
yearLength: 120
hideAge: false
markdown: String(fs.readFileSync 'life.md')
)
customStylesheetURL: null
90 changes: 90 additions & 0 deletions assets/css/_main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
html{
font-family: Open Sans, Helvetica, Arial, sans-serif;
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
html{
height: 100%;
}
body{
min-height: 100%;
color: #fff;
background-color: #384047;
margin: 0;
padding: 0;
font-size: 12px;
-webkit-text-size-adjust: none;
position: relative;
}
a{
color: #fff;
}
header{
position: fixed;
bottom: 0;
margin: 0;
padding: 20px;
}
header a{
margin-left: 1em;
opacity: .3;
text-decoration: none;
}
header a:hover{
opacity: .7;
text-decoration: underline;
}
h1{
display: inline;
font-size: 20px;
font-weight: normal;
line-height: 1em;
opacity: .5;
z-index: 3;
font-weight: 300;
white-space: nowrap;
}
#life{
padding-top: 40px;
padding-bottom: 5em;
}
#life section.year{
min-height: 100%;
box-sizing: border-box;
-moz-box-sizing: border-box;
border-left: 1px dashed rgba(255,255,255,.1);
color: rgba(255,255,255,.3);
position: absolute;
top: 0;
bottom: 0;
padding-left: 10px;
padding-top: 10px;
pointer-events: none;
font-weight: 300;
white-space: nowrap;
}
#life .event{
padding-right: 20px;
padding-bottom: 5px;
vertical-align: middle;
white-space: nowrap;
}
#life .event b{
font-weight: normal;
color: rgba(255,255,255,.5);
}
#life .event .time{
display: inline-block;
overflow: hidden;
height: 0;
border: 4px solid #fff;
border-radius: 4px;
margin-right: 10px;
opacity: .3;
position: relative;
left: -2px;
}
#life .event:hover .time{
opacity: .5;
}
Loading