Browse Source

update projects

pull/1/head
wes 8 years ago
parent
commit
08ebae446b
  1. 1
      package.json
  2. 2
      src/projects.py
  3. 6
      src/scripts/app.tag
  4. 6
      src/scripts/projects.tag
  5. 5
      src/styles/riotblog.scss
  6. 4
      yarn.lock

1
package.json

@ -33,6 +33,7 @@
"axios": "^0.16.1", "axios": "^0.16.1",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"immutable": "^3.8.1", "immutable": "^3.8.1",
"moment": "^2.18.1",
"querystring": "^0.2.0", "querystring": "^0.2.0",
"rollup-plugin-json": "^2.1.1", "rollup-plugin-json": "^2.1.1",
"showdown": "^1.6.4", "showdown": "^1.6.4",

2
src/projects.py

@ -3,4 +3,4 @@ import requests
from json import loads from json import loads
def getProjects(): def getProjects():
return loads(requests.get("https://api.github.com/users/nisstyre56/repos?sort=updated&direction=desc").content) return loads(requests.get("https://api.github.com/users/nisstyre56/repos?sort=updated&direction=desc&affiliation=owner").content)

6
src/scripts/app.tag

@ -93,11 +93,15 @@ this.on("mount", () => {
route.start(true); route.start(true);
}); });
function notFork(p) {
return !p.fork;
}
function loaduser() { function loaduser() {
/* https://api.github.com/users/${self.username}/repos?sort=updated&direction=desc */ /* https://api.github.com/users/${self.username}/repos?sort=updated&direction=desc */
axios.get(`/blog/projects`) axios.get(`/blog/projects`)
.then(function(resp) { .then(function(resp) {
self.state.projects = Z.fromList(resp.data); self.state.projects = Z.fromList(resp.data.filter(notFork));
self.state.loaded = true; self.state.loaded = true;
self.update(); self.update();
}); });

6
src/scripts/projects.tag

@ -13,7 +13,8 @@
See on github See on github
</a> </a>
<p>{ this.project().description }</p> <p>{ this.project().description }</p>
<p>{ this.project().language }</p> <p>Written primarily in { this.project().language }</p>
<p>Started on { moment(this.project().created_at).format("MMMM Do YYYY") }</p>
</div> </div>
</div> </div>
</div> </div>
@ -41,6 +42,7 @@
</div> </div>
<script> <script>
import Z from './zipper.js'; import Z from './zipper.js';
import moment from 'moment';
var cycle_timeout = 12; var cycle_timeout = 12;
@ -50,6 +52,7 @@ var self = this;
self.transition = ""; self.transition = "";
self.swipe = true; self.swipe = true;
self.moment = moment;
var empty_project = { var empty_project = {
"name" : "", "name" : "",
@ -65,6 +68,7 @@ project() {
next() { next() {
self.update({"swipe" : false}); self.update({"swipe" : false});
self.opts.state.projects = Z.goRight(self.opts.state.projects); self.opts.state.projects = Z.goRight(self.opts.state.projects);
console.log(self.project());
self.update( self.update(
{ {
"transition" : "fadeInRight", "transition" : "fadeInRight",

5
src/styles/riotblog.scss

@ -1,6 +1,7 @@
$brandingBG: rgba(27, 76, 108, 0.50); $brandingBG: rgba(103, 173, 219, 0.40);
$branding: #25658f; $branding: #25658f;
$branding2: #4b93c1; $branding2: #4b93c1;
$branding3: #1b4c6c;
.branded, button { .branded, button {
border-radius: 5px; border-radius: 5px;
@ -92,7 +93,7 @@ a {
.navigate-item { .navigate-item {
color: $branding !important; color: $branding !important;
&:hover { &:hover {
color: white !important; color: $branding3 !important;
} }
} }

4
yarn.lock

@ -815,6 +815,10 @@ minimist@^1.2.0:
dependencies: dependencies:
minimist "0.0.8" minimist "0.0.8"
moment@^2.18.1:
version "2.18.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f"
ms@2.0.0: ms@2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

Loading…
Cancel
Save