use css to cut texture name
This commit is contained in:
parent
e28be4cc32
commit
fbee383d5f
@ -2,7 +2,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-07-10 17:17:07
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-08-06 18:53:02
|
||||
* @Last Modified time: 2016-08-13 21:57:29
|
||||
*/
|
||||
|
||||
@import "style.scss";
|
||||
@ -38,6 +38,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.texture-name {
|
||||
width: 85%;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.model-label {
|
||||
font-weight: 500;
|
||||
font-size: 15px;
|
||||
|
@ -43,30 +43,7 @@
|
||||
<div class="box-body">
|
||||
@forelse ($textures as $texture)
|
||||
<a href="./skinlib/show?tid={{ $texture['tid'] }}">
|
||||
<div class="item" tid="{{ $texture['tid'] }}">
|
||||
<div class="item-body">
|
||||
<img src="./preview/{{ $texture['tid'] }}.png">
|
||||
</div>
|
||||
<div class="item-footer">
|
||||
<span title="{{ $texture['name'] }}">{{ Utils::getStringOmitted($texture['name'], 12) }} <small>({{ $texture['type'] }})</small></span>
|
||||
@if (isset($_SESSION['email']))
|
||||
|
||||
@if ($user->closet->has($texture['tid']))
|
||||
<a title="从衣柜中移除" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@else
|
||||
<a title="添加至衣柜" class="more like" tid="{{ $texture['tid'] }}" href="javascript:addToCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<a title="请先登录" class="more like" href="javascript:;" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@endif
|
||||
|
||||
@if ($texture['public'] == "0")
|
||||
<small class="more" tid="{{ $texture['tid'] }}">私密</small>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('skinlib.item')
|
||||
</a>
|
||||
@empty
|
||||
<p style="text-align: center; margin: 30px 0;">无结果</p>
|
||||
|
29
resources/views/skinlib/item.tpl
Normal file
29
resources/views/skinlib/item.tpl
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="item" tid="{{ $texture['tid'] }}">
|
||||
<div class="item-body">
|
||||
<img src="{{ Http::urlTo('/preview/'.$texture['tid'].'.png') }}">
|
||||
</div>
|
||||
|
||||
<div class="item-footer">
|
||||
<p class="texture-name">
|
||||
<span title="{{ $texture['name'] }}">{{ $texture['name'] }} <small>({{ $texture['type'] }})</small></span>
|
||||
</p>
|
||||
|
||||
|
||||
@if (isset($_SESSION['email']))
|
||||
|
||||
@if ($user->closet->has($texture['tid']))
|
||||
<a title="从衣柜中移除" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@else
|
||||
<a title="添加至衣柜" class="more like" tid="{{ $texture['tid'] }}" href="javascript:addToCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<a title="请先登录" class="more like" href="javascript:;" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
@endif
|
||||
|
||||
@if ($texture['public'] == "0")
|
||||
<small class="more" tid="{{ $texture['tid'] }}">私密</small>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
@ -44,32 +44,7 @@
|
||||
<div class="box-body">
|
||||
@forelse ($textures as $texture)
|
||||
<a href="../skinlib/show?tid={{ $texture['tid'] }}">
|
||||
<div class="item" tid="{{ $texture['tid'] }}">
|
||||
<div class="item-body">
|
||||
<img src="../preview/{{ $texture['tid'] }}.png">
|
||||
</div>
|
||||
<div class="item-footer">
|
||||
<span>{{ $texture['name'] }} <small>({{ $texture['type'] }})</small></span>
|
||||
@if (isset($_SESSION['email']))
|
||||
|
||||
@if ($user->closet->has($texture['tid']))
|
||||
<a href="javascript:removeFromCloset({{ $texture['tid'] }});" class="more like liked" tid="{{ $texture['tid'] }}" title="从衣柜中移除" data-placement="top" data-toggle="tooltip">
|
||||
@else
|
||||
<a href="javascript:addToCloset({{ $texture['tid'] }});" class="more like" tid="{{ $texture['tid'] }}" title="添加至衣柜" data-placement="top" data-toggle="tooltip">
|
||||
@endif
|
||||
|
||||
@else
|
||||
<a href="javascript:;" class="more like" title="请先登录" data-placement="top" data-toggle="tooltip">
|
||||
@endif
|
||||
<i class="fa fa-heart"></i>
|
||||
</a>
|
||||
|
||||
@if($texture->public == "0")
|
||||
<small class="more" tid="{{ $texture['tid'] }}">私密</small>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('skinlib.item')
|
||||
</a>
|
||||
@empty
|
||||
<p style="text-align: center; margin: 30px 0;">无结果</p>
|
||||
|
Loading…
Reference in New Issue
Block a user