web i server: login, post thought, get thoughts

This commit is contained in:
nau
2016-08-21 20:57:24 +02:00
parent ab562292cc
commit 21d8768a09
18 changed files with 890 additions and 100 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<html ng-app="thoughtsApp">
<head>
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
@@ -15,22 +15,22 @@
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
</head>
<body ng-app="thoughtsApp">
<body ng-controller="ThoughtsController as thoughtsList">
<div ng-include="'menu.htm'"></div>
<div class="container">
<div ng-controller="ThoughtsController as thoughtsList">
<div>
<ul class="collection">
<li class="collection-item avatar" ng-repeat="thought in thoughtsList.thoughts">
<li class="collection-item avatar" ng-repeat="thought in thoughtsList.thoughts | orderBy: '-time'">
<img ng-src="img/icons/animals/{{thought.avatar}}.png" class="circle">
<a ng-href="user.html?={{thought.username}}" class="title">
{{thought.username}}
</a>
<div class="chip">{{thought.time | date:'HH:mm'}}</div>
<p>{{thought.content}}</p>
<a href="#!" class="secondary-content"><i class="material-icons">grade</i></a>
<a href="#!" class="secondary-content"><i class="material-icons indigo-text text-lighten-2">grade</i></a>
</li>
</ul>
@@ -52,7 +52,7 @@
<script src="jslib/toastr.js"></script>
<link type="text/css" rel="stylesheet" href="jslib/toastr.css"/>
<script src="index.js"></script>
<script src="controllers.js"></script>
</body>