added a new partial posts_list.tpl like topics_list.tpl

removed dupe template code and css
main
barisusakli 10 years ago
parent f8b300eae9
commit 4335e9a7da

@ -1,38 +1,6 @@
// TODO: Needs to be cleaned up - do not child theme or you will lose your work. // TODO: Needs to be cleaned up - do not child theme or you will lose your work.
.account { .account {
.topic-row {
width: 100%;
}
}
.favourites {
.topic-row {
width: 100%;
margin-bottom: 10px;
.user-img {
width: 24px;
height: 24px;
float: left;
}
a {
span {
overflow: hidden;
height: 16px;
padding-left: 8px;
}
}
.content {
max-height: 250px;
position: relative;
clear: left;
display: block;
overflow: hidden;
}
}
} }
@ -95,17 +63,6 @@
} }
.user-recent-posts {
.panel-body {
.content {
max-height:250px;
word-break: break-word;
overflow: hidden;
position: relative;
}
}
}
.account-stats { .account-stats {
.formatted-number, .human-readable-number { .formatted-number, .human-readable-number {
font-size:30px; font-size:30px;

@ -141,15 +141,4 @@
} }
} }
[component="groups/activity"] {
.content {
max-height: 250px;
word-break: break-word;
overflow: hidden;
position: relative;
}
.user-img {
width: 32px;
}
}
} }

@ -15,7 +15,7 @@
@import "users"; @import "users";
@import "outgoing"; @import "outgoing";
@import "footer"; @import "footer";
@import "posts_list";
@import "slide-menu"; @import "slide-menu";

@ -0,0 +1,31 @@
.posts-list {
list-style-type: none;
padding-left: 0px;
.posts-list-item {
width: 100%;
margin-bottom: 10px;
.user-img {
width: 24px;
height: 24px;
float: left;
border-radius: 50%;
}
a {
span {
overflow: hidden;
height: 16px;
padding-left: 8px;
}
}
.content {
max-height: 250px;
position: relative;
clear: left;
display: block;
overflow: hidden;
}
}
}

@ -2,6 +2,7 @@
.user-img { .user-img {
width: 24px; width: 24px;
height: 24px; height: 24px;
border-radius: 50%;
} }
} }

@ -7,33 +7,9 @@
<!-- ENDIF !posts.length --> <!-- ENDIF !posts.length -->
<div class="row"> <div class="row">
<div class="col-md-12 user-favourite-posts" data-nextstart="{nextStart}">
<!-- BEGIN posts -->
<div class="topic-row panel panel-default clearfix">
<div class="panel-body">
<a href="{relative_path}/user/{posts.user.userslug}">
<img title="{posts.user.username}" class="img-rounded user-img" src="{posts.user.picture}">
</a>
<a href="{relative_path}/user/{posts.user.userslug}"> <!-- IMPORT partials/posts_list.tpl -->
<strong><span>{posts.user.username}</span></strong>
</a>
<div class="content">
{posts.content}
<p class="fade-out"></p>
</div>
<small>
<span class="pull-right post-preview-footer">
[[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] &bull;
<a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}">[[global:read_more]]</a>
</span>
</small>
</div>
</div>
<!-- END posts -->
</div>
<!-- IF config.usePagination --> <!-- IF config.usePagination -->
<!-- IMPORT partials/paginator.tpl --> <!-- IMPORT partials/paginator.tpl -->
<!-- ENDIF config.usePagination --> <!-- ENDIF config.usePagination -->

@ -8,31 +8,9 @@
<!-- ENDIF !posts.length --> <!-- ENDIF !posts.length -->
<div class="row"> <div class="row">
<div class="col-md-12 user-favourite-posts" data-nextstart="{nextStart}">
<!-- BEGIN posts -->
<div class="topic-row panel panel-default clearfix">
<div class="panel-body">
<a href="{relative_path}/user/{posts.user.userslug}">
<img title="{posts.user.username}" class="img-rounded user-img" src="{posts.user.picture}">
</a>
<a href="{relative_path}/user/{posts.user.userslug}"> <!-- IMPORT partials/posts_list.tpl -->
<strong><span>{posts.user.username}</span></strong>
</a>
<div class="content">
<p>{posts.content}</p>
<p class="fade-out"></p>
</div>
<small>
<span class="pull-right">
[[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] &bull;
<a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}">[[global:read_more]]</a>
</span>
</small>
</div>
</div>
<!-- END posts -->
</div>
<!-- IF config.usePagination --> <!-- IF config.usePagination -->
<!-- IMPORT partials/paginator.tpl --> <!-- IMPORT partials/paginator.tpl -->
<!-- ENDIF config.usePagination --> <!-- ENDIF config.usePagination -->

@ -137,38 +137,13 @@
</div> </div>
<div class="col-md-7">
<div class="col-md-7 user-recent-posts" data-nextstart="{nextStart}"> <!-- IF !posts.length -->
<div class="topic-row panel panel-default clearfix"> <span>[[user:has_no_posts]]</span>
<div class="panel-heading"> <!-- ENDIF !posts.length -->
<h3 class="panel-title">[[global:recentposts]]</h3> <!-- IMPORT partials/posts_list.tpl -->
</div>
<div class="panel-body">
<!-- IF !posts.length -->
<span>[[user:has_no_posts]]</span>
<!-- ENDIF !posts.length -->
<!-- BEGIN posts -->
<div class="user-post clearfix" data-pid="{posts.pid}">
<div class="content">
<p>{posts.content}</p>
<p class="fade-out"></p>
</div>
<small>
<span class="pull-right post-preview-footer">
[[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] &bull;
<a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}">[[global:read_more]]</a>
</span>
</small>
</div>
<hr/>
<!-- END posts -->
<div class="loading-indicator text-center hidden">
<i class="fa fa-refresh fa-spin"></i>
</div>
</div>
</div>
</div> </div>
</div> </div>
<br/> <br/>

@ -168,39 +168,12 @@
</div> </div>
</div> </div>
<!-- ENDIF group.isOwner --> <!-- ENDIF group.isOwner -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-edit"></i> [[groups:details.latest_posts]]</h3>
</div>
<div component="groups/activity" class="panel-body">
<!-- IF !posts.length -->
<div class="alert alert-info">[[groups:details.has_no_posts]]</div>
<!-- ENDIF !posts.length -->
<!-- BEGIN posts --> <div>
<!-- IF !@first --><hr class="clear" /><!-- ENDIF !@first --> <!-- IF !posts.length -->
<div class="user-post clearfix" data-pid="{posts.pid}"> <div class="alert alert-info">[[groups:details.has_no_posts]]</div>
<a href="{relative_path}/user/{posts.user.userslug}"> <!-- ENDIF !posts.length -->
<img title="{posts.user.username}" class="img-rounded user-img" src="{posts.user.picture}"> <!-- IMPORT partials/posts_list.tpl -->
</a>
<a href="{relative_path}/user/{posts.user.userslug}">
<strong><span>{posts.user.username}</span></strong>
</a>
<div class="content">
{posts.content}
<p class="fade-out"></p>
</div>
<small>
<span class="pull-right post-preview-footer">
[[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] &bull;
<a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}">[[global:read_more]]</a>
</span>
</small>
</div>
<!-- END posts -->
</div>
</div> </div>
<div widget-area="right"></div> <div widget-area="right"></div>
</div> </div>

@ -0,0 +1,33 @@
<ul component="posts" class="posts-list" data-nextstart="{nextStart}">
<!-- BEGIN posts -->
<li component="post" class="posts-list-item" data-pid="{posts.pid}" data-uid="{posts.uid}">
<div class="panel panel-default">
<div class="panel-body">
<a href="{relative_path}/user/{posts.user.userslug}">
<img title="{posts.user.username}" class="img-rounded user-img" src="{posts.user.picture}">
</a>
<a href="{relative_path}/user/{posts.user.userslug}">
<strong><span>{posts.user.username}</span></strong>
</a>
<div component="post/content" class="content">
<p>{posts.content}</p>
<p class="fade-out"></p>
</div>
<small>
<span class="pull-right">
[[global:posted_in_ago, <a href="{relative_path}/category/{posts.category.slug}"><i class="fa {posts.category.icon}"></i> {posts.category.name}</a>, <span class="timeago" title="{posts.relativeTime}"></span>]] &bull;
<a href="{relative_path}/topic/{posts.topic.slug}/{posts.index}">[[global:read_more]]</a>
</span>
</small>
</div>
</div>
</li>
<!-- END posts -->
</ul>
<div component="posts/loading" class="loading-indicator text-center hidden">
<i class="fa fa-refresh fa-spin"></i>
</div>
Loading…
Cancel
Save