summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/static/yaksh/css/custom.css5
-rw-r--r--yaksh/templates/yaksh/course_forum.html3
-rw-r--r--yaksh/templates/yaksh/post_comments.html9
3 files changed, 11 insertions, 6 deletions
diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css
index 299f5d3..6687c4b 100644
--- a/yaksh/static/yaksh/css/custom.css
+++ b/yaksh/static/yaksh/css/custom.css
@@ -108,4 +108,9 @@ body, .dropdown-menu {
padding-right: 0.3em;
padding-top: 0.2em;
padding-bottom: 0.2em;
+}
+
+.post_image, .comment_image {
+ width: 50%;
+ height: 50%;
} \ No newline at end of file
diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html
index ef6dbf8..63e577b 100644
--- a/yaksh/templates/yaksh/course_forum.html
+++ b/yaksh/templates/yaksh/course_forum.html
@@ -42,12 +42,11 @@
<br>
<div>
{% if posts %}
- <h3>Posts:</h3>
{% for post in posts %}
<div class="card">
<div class="card-body">
<a href="{% url "yaksh:post_comments" course.id post.uid %}">{{post.title}}</a>
- <br>
+ <p>{{post.description|truncatewords:30}}</p>
<p class="pull-right"><small>{{post.get_comments_count}}{% if post.get_comments_count > 1 %} replies{% else %} reply{% endif %}</small></p>
</div>
<div class="card-footer">
diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html
index 110e11c..6fd5dd5 100644
--- a/yaksh/templates/yaksh/post_comments.html
+++ b/yaksh/templates/yaksh/post_comments.html
@@ -7,9 +7,11 @@
{% block content %}
<div class="container">
<a class="btn btn-primary" href="{% url "yaksh:course_forum" post.course.id %}">Back to Posts</a>
+ <br>
+ <br>
<div class="card">
<div class="card-header">
- {{post.title}}
+ <h3>{{post.title}}</h3>
<br>
<small>
<strong>{{post.creator.username}}</strong>
@@ -22,7 +24,7 @@
<p>{{post.description}}</p>
{% if post.image %}
<a href="{{post.image.url}}" target="_blank">
- <img src="{{post.image.url}}" class="img-fluid" alt="">
+ <img src="{{post.image.url}}" class="post_image" alt="">
</a>
{% endif %}
</div>
@@ -35,7 +37,7 @@
<div class="card-body">
{% if comment.image %}
<a href="{{comment.image.url}}" target="_blank">
- <img src="{{comment.image.url}}" class='img-fluid'>
+ <img src="{{comment.image.url}}" class='comment_image'>
</a>
{% endif %}
<p>{{comment.description}}</p>
@@ -44,7 +46,6 @@
{% if user.profile.is_moderator %}<a href="{% url "yaksh:hide_comment" post.course.id comment.uid %}">Delete</a>{% endif %}
</small>
</div>
- <hr>
{% endfor %}
{% else %}
No comments on this post.