my-bookmark/public/views/bookmarks.html

82 lines
5.0 KiB
HTML

<div class="ui segment js-segment-navigate" ng-if="showStyle === 'navigate'">
<div class="ui container" ng-repeat="tag in bookmarks" ng-init="tagIndex=$index">
<div class="ui grid">
<div class="row">
<div class="wrap" style="width:88px;color:#0aa770;text-align:left;margin-left:20px;" ng-click="jumpToTags(tag.id)">
<span title="{{ tag.name }}">{{ tag.name }}</span>
</div>
<div class="fourteen wide column" ng-if="tag.bookmarks.length">
<div class="ui grid container">
<div
class="four wide column js-navigate-bookmark"
ng-class="{bookmarkNormalHover:bookmarkNormalHover, bookmarkEditHover:bookmarkEditHover, bookmark:(!bookmarkNormalHover && !bookmarkEditHover)}"
ng-mouseover="edit ? (bookmarkEditHover=true) : (bookmarkNormalHover=true)"
ng-mouseleave="edit ? (bookmarkEditHover=false) : (bookmarkNormalHover=false)"
ng-repeat="bookmark in tag.bookmarks"
ng-click="jumpToUrl(bookmark.url, bookmark.id)"
title="{{ bookmark.title }}"
id="{{bookmark.id}}">
<img class="ui ui middle aligned tiny image bookmarkOperaterHover" style="width:16px;height:16px" ng-src="./images/{{ bookmarkEditHover ? 'delete-hover' : 'delete'}}.png" ng-if="edit" ng-click="delBookmark(bookmark.id)">
<img class="ui ui middle aligned tiny image bookmarkOperaterHover" style="width:16px;height:16px;float:right;" ng-src="./images/{{ bookmarkEditHover ? 'edit-bookmark-hover' : 'edit-bookmark'}}.png" ng-if="edit" ng-click="editBookmark(bookmark.id)">
<img class="ui ui middle aligned tiny image" ng-src=" http://favicon.byi.pw/?url={{ bookmark.url }}" style="width:16px;height:16px" ng-if="!edit">
<span>{{ bookmark.title}}</span>
</div>
<div class="two wide column js-more-bookmark" ng-class="" ng-mouseover="" ng-mouseleave="" title="查看更多" ng-if="tag.bookmarks.length >= 4" ng-click="jumpToTags(tag.id)">
<img class="ui ui middle aligned tiny image" ng-src="./images/more.png" style="width:16px;height:16px">
</div>
</div>
</div>
<div ng-if="tagIndex === 0" style="width:22px;height:22px;" class="js-edit" ng-click="toggleMode()" title="{{edit ? '退出编辑模式' : '点我进入编辑模式'}}"><img class="ui ui middle aligned tiny image" ng-src="./images/{{ edit ? 'back' : 'edit'}}.png"></div>
</div>
</div>
<div class="ui divider"></div>
</div>
</div>
<table class="ui celled table" ng-if="showStyle === 'table'">
<thead>
<tr>
<th>标题</th>
<th>链接</th>
<th style="width:90px;">点击次数</th>
<th style="width:100px;">创建日期</th>
<th style="width:100px;">最后点击</th>
<th style="width:150px;">分类</th>
<th style="width:105px;">操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="bookmark in bookmarks" id="{{ bookmark.id }}">
<td>
<img class="ui ui middle aligned tiny image" src=" http://favicon.byi.pw/?url={{bookmark.url}}" style="width:16px;height:16px">
<span ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{bookmark.title}}">
{{ bookmark.title }}
</span>
</td>
<td ng-click="jumpToUrl(bookmark.url, bookmark.id)">
<span title="{{bookmark.url}}">{{ bookmark.url }}</span>
</td>
<td>{{ bookmark.click_count }}</td>
<td>{{ bookmark.created_at }}</td>
<td>{{ bookmark.last_click }}</td>
<td>
<div class="ui label" ng-repeat="tag in bookmark.tags" tag-id="{{ tag.id }}" ng-click="jumpToTags(tag.id)">
{{ tag.name }}
</div>
</td>
<td>
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 5px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark.id)">
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 5px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)">
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 5px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark.id)">
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="7">
<pagination></pagination>
</th>
</tr>
</tfoot>
</table>
<div class="ui segment" ng-if="showStyle === 'card'">正在开发中,尽请期待。。。。。。</div>