Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
#117 - home from initial template using bulma framework classes
Browse files Browse the repository at this point in the history
  • Loading branch information
teles committed Jan 11, 2017
1 parent 8c88d1e commit 008c754
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.3.0/css/bulma.min.css">
<!-- inject:css -->
<!-- endinject -->
</head>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<img data-ng-src="{{vc.post.featured_image}}">
<figure class="image is-square">
<img data-ng-src="{{vc.post.featured_image}}" class="image">
</figure>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div data-ng-bind-html="vc.post.content | trustAsHtml"></div>
<div class="title is-2" data-ng-bind-html="vc.post.content | trustAsHtml"></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div data-ng-bind-html="vc.post.content.rendered | trustAsHtml"></div>
<div class="content" data-ng-bind-html="vc.post.content.rendered | trustAsHtml"></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h1 data-ng-bind-html="vc.post.title | trustAsHtml"></h1>
<h1 class="title is-2" data-ng-bind-html="vc.post.title | trustAsHtml"></h1>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h1 data-ng-bind="vc.post.title.rendered"></h1>
<h1 class="title is-2" data-ng-bind="vc.post.title.rendered"></h1>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p data-ng-bind-html="vc.post.excerpt | trustAsHtml "></p>
<p class="content" data-ng-bind-html="vc.post.excerpt | trustAsHtml "></p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p data-ng-bind-html="vc.post.excerpt.rendered | trustAsHtml "></p>
<p class="content" data-ng-bind-html="vc.post.excerpt.rendered | trustAsHtml "></p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h2><a data-ng-bind-html="vc.post.title | trustAsHtml " data-ui-sref="post({postSlug:vc.post.slug, postYear: vc.post.year, postMonth: vc.post.month, postDay: vc.post.day, postId: vc.post.ID})"></a></h2>
<h2 class="title is-3"><a data-ng-bind-html="vc.post.title | trustAsHtml " data-ui-sref="post({postSlug:vc.post.slug, postYear: vc.post.year, postMonth: vc.post.month, postDay: vc.post.day, postId: vc.post.ID})"></a></h2>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<h2><a data-ng-bind="vc.post.title.rendered" data-ui-sref="post({postSlug:vc.post.slug, postYear: vc.post.year, postMonth: vc.post.month, postDay: vc.post.day, postId: vc.post.id})"></a></h2>
<h2 class="title is-3"><a data-ng-bind="vc.post.title.rendered" data-ui-sref="post({postSlug:vc.post.slug, postYear: vc.post.year, postMonth: vc.post.month, postDay: vc.post.day, postId: vc.post.id})"></a></h2>
12 changes: 7 additions & 5 deletions src/js/components/list-posts/templates/list-posts.template.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div>
<p data-ng-if="vc.vm.isLoadingPosts">Carregando posts</p>
<div data-ng-repeat="post in vc.vm.postsList">
<div class="columns is-multiline">
<div data-ng-if="vc.vm.isLoadingPosts">Loading</div>
<div data-ng-repeat="post in vc.vm.postsList" class="column is-half">
<list-posts-title data-post="post"></list-posts-title>
<post-date data-post="post"></post-date>
<featured-image data-post="post"></featured-image>
<list-posts-excerpt data-post="post"></list-posts-excerpt>
<share data-post="post"></share>
<div class="section">
<list-posts-excerpt data-post="post"></list-posts-excerpt>
<share data-post="post"></share>
</div>
</div>
</div>
15 changes: 9 additions & 6 deletions src/js/components/pagination/templates/pagination.template.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<div>
<nav class="pagination">
<a data-ui-sref="home-pagination({pageNumber:vc.vm.prevPageNumber})"
data-ng-if="vc.vm.prevPageNumber">&lt;&lt;</a>

<a data-ng-repeat="page in vc.vm.pages" data-ng-bind="page.number" data-ui-sref="home-pagination({pageNumber:page.number})"></a>
data-ng-if="vc.vm.prevPageNumber" class="pagination-previous">&lt;&lt;</a>
<ul class="pagination-list">
<li data-ng-repeat="page in vc.vm.pages">
<a data-ng-bind="page.number" data-ui-sref="home-pagination({pageNumber:page.number})" class="pagination-link"></a>
</li>
</ul>

<a data-ui-sref="home-pagination({pageNumber:vc.vm.nextPageNumber})" data-ng-if="vc.vm.nextPageNumber">&gt;&gt;</a>
</div>
<a data-ui-sref="home-pagination({pageNumber:vc.vm.nextPageNumber})" data-ng-if="vc.vm.nextPageNumber" class="pagination-next">&gt;&gt;</a>
</nav>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p data-ng-bind="vc.post.date | date : 'dd/MM/y' "></p>
<p data-ng-bind="vc.post.date | date : 'dd/MM/y' " class="subtitle is-5"></p>
43 changes: 38 additions & 5 deletions src/js/views/home/templates/home.template.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
<div>
<div data-infinite-scroll="vc.loadMorePostsAndPaginate()" data-infinite-scroll-immediate-check="false" data-infinite-scroll-disabled="vc.vm.isLoadingPosts || vc.isInfiniteScrollDisabled">
<list-posts></list-posts>
<span data-ng-if="vc.vm.isLoadingPosts">Carregando posts novos ...</span>
<pagination></pagination>
<div>
<div class="container">
<nav class="nav">
<div class="nav-left">
<a class="nav-item">
Blog name
</a>
</div>

<span class="nav-toggle">
<span></span>
<span></span>
<span></span>
</span>

<!-- This "nav-menu" is hidden on mobile -->
<!-- Add the modifier "is-active" to display it on mobile -->
<div class="nav-right nav-menu">
<a class="nav-item">
Page 1
</a>
<a class="nav-item">
Page 2
</a>
<a class="nav-item">
Page 3
</a>
</div>
</nav>
</div>

<div class="container">
<div data-infinite-scroll="vc.loadMorePostsAndPaginate()" data-infinite-scroll-immediate-check="false" data-infinite-scroll-disabled="vc.vm.isLoadingPosts || vc.isInfiniteScrollDisabled" class="columns is-multiline section">
<list-posts class="column is-9"></list-posts>
</div>
<div class="section">
<pagination></pagination>
</div>
</div>
</div>

0 comments on commit 008c754

Please sign in to comment.