Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
loongmxbt committed Feb 26, 2016
0 parents commit ed842e4
Show file tree
Hide file tree
Showing 30 changed files with 585 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1 change: 1 addition & 0 deletions .meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
7 changes: 7 additions & 0 deletions .meteor/.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics

1b92aag1u3iypp1fox5d
48 changes: 48 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library

standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code

## Orion
orionjs:core
orionjs:pages

## Styles
twbs:bootstrap
fortawesome:fontawesome
orionjs:bootstrap

## Router
kadira:flow-router
kadira:blaze-layout

## Files
orionjs:filesystem
vsivsi:orion-file-collection
orionjs:file-attribute
orionjs:image-attribute

## Editor
orionjs:summernote

## i18n
loongmxbt:orion-lang-zh-cn

## Test
msavin:mongol

## Export
nicolaslopezj:orion-exporter
2 changes: 2 additions & 0 deletions .meteor/platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
123 changes: 123 additions & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[email protected]
[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
anti:[email protected]
[email protected]
[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
cosmos:[email protected]
dburles:[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
fortawesome:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
kadira:[email protected]
kadira:[email protected]
lai:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
loongmxbt:[email protected]
matb33:[email protected]
mdg:[email protected]
[email protected]
[email protected]
[email protected]
meteorhacks:[email protected]
meteorhacks:[email protected]
meteortoys:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
momentjs:[email protected]
[email protected]
[email protected]
msavin:[email protected]
nicolaslopezj:[email protected]
nicolaslopezj:[email protected]
nicolaslopezj:[email protected]
nicolaslopezj:[email protected]
nicolaslopezj:[email protected]
[email protected]_2
[email protected]_1
[email protected]
[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
orionjs:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
softwarerero:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
summernote:[email protected]
[email protected]
[email protected]
[email protected]
twbs:[email protected]
[email protected]
[email protected]
[email protected]
useraccounts:[email protected]
useraccounts:[email protected]
vsivsi:[email protected]
vsivsi:[email protected]
[email protected]
[email protected]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Orion Kickstarter

## seeds.js
创建默认用户,其中管理员用户密码为
[email protected]
admin123

## posts功能
添加修改删除post,并赋予相应权限

## i18n中文
orion自带翻译

## TODO
页面模板
13 changes: 13 additions & 0 deletions client/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FlowRouter.route('/', {
name: "home",
action: function() {
BlazeLayout.render("mainLayout", {content: "home"});
}
});

FlowRouter.route('/posts/:postId', {
name: "postItem",
action: function() {
BlazeLayout.render("mainLayout", {content: "postItem"});
}
});
13 changes: 13 additions & 0 deletions client/views/home/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template name="home">

<div class="container">

<h1>{{dict 'site.desc'}}</h1>

<hr>

{{> postsList}}

</div>

</template>
7 changes: 7 additions & 0 deletions client/views/layout/main_layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template name="mainLayout">
{{> header}}
<div class="container">
{{> Template.dynamic template=content}}
</div>
{{> footer}}
</template>
4 changes: 4 additions & 0 deletions client/views/layout/sidenav_layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<template name="sidenavLayout">


</template>
9 changes: 9 additions & 0 deletions client/views/pages/default_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template name="pagesDefault">
{{> header}}
<div class="container">
<h1 class="title">{{ title }}</h1>
<div class="content">
{{{ content }}}
</div>
</div>
</template>
9 changes: 9 additions & 0 deletions client/views/pages/not_found.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template name="notFound">
{{> header}}
<div class="container">
<h1>404 not found!</h1>
<p>Page not found! Go to <a href="/">home page</a>.</p>
</div>
{{> footer}}

</template>
6 changes: 6 additions & 0 deletions client/views/pages/simple_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template name="pagesSimple">
<h1 class="title">{{ title }}</h1>
<div class="content">
{{{ content }}}
</div>
</template>
8 changes: 8 additions & 0 deletions client/views/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template name="footer">
<footer class="footer">
<hr>
<div class="container">
<p class="text-muted">Orion CMS</p>
</div>
</footer>
</template>
27 changes: 27 additions & 0 deletions client/views/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template name="header">
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ app_name }}</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/about">About</a></li>
<li><a href="/contact">Contact</a></li>
{{#if currentUser}}
<li><a href="/admin">{{currentUser.profile.name}}</a></li>
{{else}}
<li><a href="/admin">Login</a></li>
{{/if}}
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
</template>
5 changes: 5 additions & 0 deletions client/views/partials/header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Template.header.helpers({
app_name: function() {
return orion.config.get('APP_NAME');
}
})
26 changes: 26 additions & 0 deletions client/views/posts/post_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template name="postItem">
<div class="container">
<header>
<h1>Post Page</h1>
<a href="/">Back</a>
</header>

{{#if Template.subscriptionsReady}}
{{#with post}}
<h3>{{title}}</h3>
<img src="{{image.url}}" width="640px">
<br>
{{{body}}}
{{/with}}
{{else}}
<p>Loading...</p>
{{/if}}

<hr>

<footer>
<p>Orion Blog</p>
</footer>
</div>

</template>
15 changes: 15 additions & 0 deletions client/views/posts/post_item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Template.postItem.onCreated(function() {
var self = this;
var postId = FlowRouter.getParam('postId');
self.autorun(function() {
self.subscribe('postById', postId);
});
});

Template.postItem.helpers({
post: function() {
var postId = FlowRouter.getParam('postId');
var post = Posts.findOne({_id: postId}) || {};
return post;
}
});
6 changes: 6 additions & 0 deletions client/views/posts/posts_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template name="postsList">
{{#each posts}}
<h1><a href="{{pathForPost}}">{{title}}</a></h1>
<img src="{{image.url}}" width="640px">
{{/each}}
</template>
Loading

0 comments on commit ed842e4

Please sign in to comment.