posts stuff! gettin places
This commit is contained in:
parent
b6e6adb039
commit
5364bcac78
6 changed files with 104 additions and 14 deletions
65
assets/less/mio/classes/forum/post.less
Normal file
65
assets/less/mio/classes/forum/post.less
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
.forum__post {
|
||||||
|
display: flex;
|
||||||
|
border: 1px solid #9475b2;
|
||||||
|
box-shadow: 0 1px 2px #9475b2;
|
||||||
|
background-color: #fbeeff;
|
||||||
|
margin: 2px 0;
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 1;
|
||||||
|
|
||||||
|
&__text {
|
||||||
|
margin: 2px;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__info {
|
||||||
|
font-size: .9em;
|
||||||
|
line-height: 1.7em;
|
||||||
|
padding: 0 2px;
|
||||||
|
border-bottom: 1px solid #9475b2;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&__link {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__author {
|
||||||
|
border-right: 1px solid #9475b2;
|
||||||
|
padding: 5px;
|
||||||
|
text-align: center;
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&__link {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__avatar {
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
box-shadow: 0 1px 2px #9475b2;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__username {
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: 1.7em;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
&__author {
|
&__author {
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
line-height: 1.3em;
|
line-height: 1em;
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
&__stat {
|
&__stat {
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
min-width: 50px;
|
min-width: 70px;
|
||||||
|
|
||||||
&--posts {
|
&--posts {
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@mio-navigation-mobile: 1000px;
|
@mio-navigation-mobile: 1000px;
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
margin: 5px 0;
|
margin: 2px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
|
|
|
@ -72,5 +72,6 @@ body {
|
||||||
|
|
||||||
// Forums
|
// Forums
|
||||||
@import "classes/forum/actions";
|
@import "classes/forum/actions";
|
||||||
@import "classes/forum/topics";
|
|
||||||
@import "classes/forum/listing";
|
@import "classes/forum/listing";
|
||||||
|
@import "classes/forum/post";
|
||||||
|
@import "classes/forum/topics";
|
||||||
|
|
|
@ -45,7 +45,8 @@ if (!$topic) {
|
||||||
|
|
||||||
$getPosts = $db->prepare('
|
$getPosts = $db->prepare('
|
||||||
SELECT
|
SELECT
|
||||||
`post_id`, `post_text`, `post_created`
|
`post_id`, `post_text`, `post_created`,
|
||||||
|
`topic_id`
|
||||||
FROM `msz_forum_posts`
|
FROM `msz_forum_posts`
|
||||||
WHERE `topic_id` = :topic_id
|
WHERE `topic_id` = :topic_id
|
||||||
AND `post_deleted` IS NULL
|
AND `post_deleted` IS NULL
|
||||||
|
|
|
@ -60,8 +60,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="forum__listing__entry__stats">
|
<div class="forum__listing__entry__stats">
|
||||||
<div class="forum__listing__entry__topics">{{ forum.forum_topic_count|number_format }}</div>
|
<div class="forum__listing__entry__topics" title="Topics">{{ forum.forum_topic_count|number_format }}</div>
|
||||||
<div class="forum__listing__entry__posts">{{ forum.forum_post_count|number_format }}</div>
|
<div class="forum__listing__entry__posts" title="Posts">{{ forum.forum_post_count|number_format }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="forum__listing__entry__activity">
|
<div class="forum__listing__entry__activity">
|
||||||
|
@ -129,11 +129,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="forum__topics__entry__stats">
|
<div class="forum__topics__entry__stats">
|
||||||
<div class="forum__topics__entry__stat forum__topics__entry__stat--posts">
|
<div class="forum__topics__entry__stat forum__topics__entry__stat--posts" title="Posts">
|
||||||
{{ topic.topic_post_count }}
|
{{ topic.topic_post_count|number_format }}
|
||||||
</div>
|
</div>
|
||||||
<div class="forum__topics__entry__stat forum__topics__entry__stat--views">
|
<div class="forum__topics__entry__stat forum__topics__entry__stat--views" title="Views">
|
||||||
{{ topic.topic_view_count }}
|
{{ topic.topic_view_count|number_format }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -174,9 +174,32 @@
|
||||||
{% macro forum_post_entry(post, is_opening_post) %}
|
{% macro forum_post_entry(post, is_opening_post) %}
|
||||||
{% set is_opening_post = is_opening_post|default(false) %}
|
{% set is_opening_post = is_opening_post|default(false) %}
|
||||||
|
|
||||||
<div class="container" id="p{{ post.post_id }}">
|
<div class="forum__post" id="p{{ post.post_id }}">
|
||||||
<div class="container__content">
|
<div class="forum__post__author">
|
||||||
|
<a class="forum__post__author__link" href="/profile.php?u=1">
|
||||||
|
<div
|
||||||
|
class="avatar forum__post__author__avatar"
|
||||||
|
style="background-image:url('/profile.php?u=1&m=avatar');">
|
||||||
|
</div>
|
||||||
|
<div class="forum__post__author__username">me</div>
|
||||||
|
</a>
|
||||||
|
<div class="forum__post__author__joined">
|
||||||
|
joined ages ago
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="forum__post__content">
|
||||||
|
<div class="forum__post__content__info">
|
||||||
|
<a class="forum__post__content__info__link" href="/forum/topic.php?t={{ post.topic_id }}#p{{ post.post_id }}">
|
||||||
|
{{ post.post_created }}
|
||||||
|
</a>
|
||||||
|
<a class="forum__post__content__info__link" href="/forum/topic.php?p={{ post.post_id }}#p{{ post.post_id }}">
|
||||||
|
#{{ post.post_id }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="forum__post__content__text">
|
||||||
{{ post.post_text }}
|
{{ post.post_text }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue