tinkering with styling and layout, purely cosmetic changes

This commit is contained in:
Solomon Laing 2020-02-13 23:17:33 +10:30
parent 1cb3c3a550
commit 161cac42f1
7 changed files with 29 additions and 14 deletions

View File

@ -14,7 +14,7 @@ daddy.controller("loginCtrlr", function($scope, $cookies, $location, $http, stat
$scope.message = message $scope.message = message
$scope.setSignup = () => { $scope.setSignup = () => {
stateData.setPage("things") stateData.setPage("forum")
$location.path("/signup") $location.path("/signup")
} }
@ -37,8 +37,8 @@ daddy.controller("loginCtrlr", function($scope, $cookies, $location, $http, stat
console.log("set cookie") console.log("set cookie")
stateData.setUser(res.data[0]) stateData.setUser(res.data[0])
console.log("set data") console.log("set data")
stateData.setPage("things") stateData.setPage("forum")
$location.path("/things") $location.path("/")
} }
}).catch((res) => { }).catch((res) => {
if (res.status == 400) { if (res.status == 400) {
@ -73,7 +73,7 @@ daddy.controller("signupCtrlr", function($scope, $http, $location, stateData) {
$scope.status = false $scope.status = false
$scope.setLogin = () => { $scope.setLogin = () => {
stateData.setPage("things") stateData.setPage("forum")
$location.path("/login") $location.path("/login")
} }

View File

@ -11,6 +11,16 @@ daddy.controller("forumCtrlr", function($scope, $http, $location) {
} }
} }
$scope.messages = {
welcome : "Hello one and all, please ignore the unfinished state of \
this forum, it is a work in progress. However, all offered \
features sould currently work as expected.",
context : "This forum is a personal project that is being used as a \
learning tool to explore all sorts of things, from node \
development to hosting containers, created using Docker, \
on a small Odroid-MC1 and N2 kubernetes cluster."
}
$scope.errors = { $scope.errors = {
topic : { topic : {
show : false, show : false,

View File

@ -159,7 +159,7 @@ nav .userbar {
display: block; display: block;
margin: auto; margin: auto;
width: min-content; width: min-content;
margin-bottom: 50px; margin-bottom: 10px;
} }
.border { .border {
@ -172,6 +172,11 @@ nav .userbar {
display: block; display: block;
} }
.message {
width: 60%;
text-align: justify;
}
/* START forum CSS */ /* START forum CSS */
table { table {
@ -179,6 +184,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
width: fit-content; width: fit-content;
margin: auto; margin: auto;
min-width: 50%;
} }
table, td, th { table, td, th {

View File

@ -1,5 +1,5 @@
<article ng-controller="createCategoryCtrlr" ng-init="start()"> <article ng-controller="createCategoryCtrlr" ng-init="start()">
<section ng-show="!(error.userLevel.show)" class="item border"> <section ng-show="!(error.userLevel.show)" class="item center border">
<h3>{{titles.form}}</h3> <h3>{{titles.form}}</h3>
<form id="categoryForm" name="categoryForm" ng-submit="createCategory()"> <form id="categoryForm" name="categoryForm" ng-submit="createCategory()">
<label for="catName">Name: </label> <br /> <label for="catName">Name: </label> <br />
@ -10,7 +10,7 @@
</form> </form>
<p class="status" ng-show="status.show">{{status.text}}</p> <p class="status" ng-show="status.show">{{status.text}}</p>
</section> </section>
<section ng-show="error.userLevel.show" class="item border"> <section ng-show="error.userLevel.show" class="item center border" style="width: 30%;">
<p ng-show="error.userName.show">{{error.loggedIn.text1}} <span class="link" ng-click="setLogin()">{{error.loggedIn.link1}}</span> {{error.loggedIn.text2}}</p> <p ng-show="error.userName.show">{{error.loggedIn.text1}} <span class="link" ng-click="setLogin()">{{error.loggedIn.link1}}</span> {{error.loggedIn.text2}}</p>
<p ng-show="!(erro.userName.show)">{{error.userLevel.text1}}</p> <p ng-show="!(erro.userName.show)">{{error.userLevel.text1}}</p>
</section> </section>

View File

@ -1,5 +1,5 @@
<article ng-controller="createTopicCtrlr" ng-init="start()"> <article ng-controller="createTopicCtrlr" ng-init="start()">
<section ng-show="!(error.loggedIn.show)" class="item border"> <section ng-show="!(error.loggedIn.show)" class="item center border">
<h3>{{titles.form}}</h3> <h3>{{titles.form}}</h3>
<p ng-show="error.category.show && !error.userLevel.show">{{error.category.text1}} <span class="link" ng-click="setCreateCat()">{{error.category.link1}}</span> {{error.category.text2}}</p> <p ng-show="error.category.show && !error.userLevel.show">{{error.category.text1}} <span class="link" ng-click="setCreateCat()">{{error.category.link1}}</span> {{error.category.text2}}</p>
<p ng-show="error.category.show && error.userLevel.show">{{error.userLevel.text1}} <br /> {{error.userLevel.text2}}</p> <p ng-show="error.category.show && error.userLevel.show">{{error.userLevel.text1}} <br /> {{error.userLevel.text2}}</p>
@ -17,7 +17,7 @@
</form> </form>
<p class="status" ng-show="status.show">{{status.text}}</p> <p class="status" ng-show="status.show">{{status.text}}</p>
</section> </section>
<section ng-show="error.loggedIn.show" class="item border"> <section ng-show="error.loggedIn.show" class="item center border" style="width: 30%;">
<p>{{error.loggedIn.text1}} <span class="link" ng-click="setLogin()">{{error.loggedIn.link1}}</span> {{error.loggedIn.text2}}</p> <p>{{error.loggedIn.text1}} <span class="link" ng-click="setLogin()">{{error.loggedIn.link1}}</span> {{error.loggedIn.text2}}</p>
</section> </section>
</article> </article>

View File

@ -2,7 +2,8 @@
<section class="item stretch border"> <section class="item stretch border">
<h3>{{titles.main.heading}}</h3> <h3>{{titles.main.heading}}</h3>
<br /> <p class="center message">{{messages.welcome}}</p>
<p class="center message">{{messages.context}}</p>
<h3>{{titles.recent.heading}}</h3> <br /> <h3>{{titles.recent.heading}}</h3> <br />
<table> <table>
<tr> <tr>

View File

@ -3,8 +3,6 @@
<h3>{{topic.topicSubject}}</h3> <em><p>by {{topic.posts[0].user.userName}}</p></em> <br /> <h3>{{topic.topicSubject}}</h3> <em><p>by {{topic.posts[0].user.userName}}</p></em> <br />
<table> <table>
<tr> <tr>
<th colspan="2">{{topic.topicSubject}}</th> <th colspan="2">{{topic.topicSubject}}</th>
</tr> </tr>
@ -35,8 +33,8 @@
ng-click="setSignup()">{{logged.link2}}</span> {{logged.text3}}</td> ng-click="setSignup()">{{logged.link2}}</span> {{logged.text3}}</td>
<td colspan="2" ng-show="state.user.userNo != null"> <td colspan="2" ng-show="state.user.userNo != null">
<form name="replyForm" id="replyForm" ng-submit="makeReply(topic.topicNo)"> <form name="replyForm" id="replyForm" ng-submit="makeReply(topic.topicNo)">
<label for="replyCotnent">Reply:</label> <label for="replyCotnent">Reply:</label> <br />
<textarea name="replyContent" ng-model="reply.postContent" required></textarea> <textarea name="replyContent" ng-model="reply.postContent" required></textarea> <br />
<input type="submit" name="replySubmit" ng-model="reply.submit" value="Reply" /> <input type="submit" name="replySubmit" ng-model="reply.submit" value="Reply" />
</form> </form>
<p class="status" ng-show="status.show">{{status.text}}</p> <p class="status" ng-show="status.show">{{status.text}}</p>