Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cwblog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
group20
cwblog
Commits
e66b3b48
Commit
e66b3b48
authored
2 years ago
by
Saravanan, Mukesh (PG/T - Comp Sci & Elec Eng)
Browse files
Options
Downloads
Patches
Plain Diff
Replace post.html
parent
3788bd76
No related branches found
Branches containing commit
No related tags found
1 merge request
!36
Updates frontend
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/application/templates/forum/post.html
+82
-85
82 additions, 85 deletions
frontend/application/templates/forum/post.html
with
82 additions
and
85 deletions
frontend/application/templates/forum/post.html
+
82
−
85
View file @
e66b3b48
...
@@ -21,91 +21,7 @@
...
@@ -21,91 +21,7 @@
.tile__author
{
.tile__author
{
font-size
:
16px
;
font-size
:
16px
;
}
}
</style>
.latest
{
<title>
POST PAGE
</title>
<a
class=
"home-btn"
href=
"{{ url_for('frontend.get_posts') }}"
>
Home
</a>
{% from 'macros.html' import displayField %}
{% include '_messages.html' %}
<br>
<!-- START posts -->
<div
class=
"col-md-8"
>
<div
class=
"post-container"
style=
"height: 400px; width: 100%; overflow: auto;
word-wrap: break-word; white-space: normal"
>
<div
class=
"tile__author"
>
<img
class=
"profile-image"
src=
"images/users/{{ owner_image }}"
>
<h2
><a
href=
"{{ url_for('frontend.display_user', user_id=post.user_id) }}"
>
{{ post['user_name'] }}
</a></h2>
</div>
<div
class=
"tile__header"
>
{{ post['title'] }}
</div>
<div
class=
"tile__text"
>
<p>
{{ post['content'] | safe }}
</p>
</div>
{% if post['image_url'] != '' %}
<img
class=
"post-image"
src=
"images/{{ post['image_url'] }}"
>
{% endif %}
<p
class=
"tile__date"
>
{{ post['date_added'] }}
</p>
{% if current_user_id == post['user_id'] %}
<div
class=
"tile__buttons"
>
<a
class=
"tile__btn"
href=
"{{ url_for('frontend.delete_post', post_id=post.id) }}"
>
Delete Post
</a>
</div>
{% endif %}
</div>
</div>
<!-- END posts -->
<!-- START comments -->
<div
class=
"comment-container"
style=
"overflow-y: auto; height: 600px; width: 100%"
>
<h3
class=
"comment__title"
>
COMMENTS
</h3>
{% if comments %}
{% for comment, image in comments %}
<div
class=
"comment__box{% if current_user_id == comment['user_id'] %} comment__box--self{% else %} comment__box--other{% endif %}"
>
<div
class=
"comment__author"
>
<div
class=
"comment__bubble{% if current_user_id == comment['user_id'] %} comment__bubble--self{% endif %}"
>
<div
class=
"comment__avatar{% if current_user_id == comment['user_id'] %} comment__avatar--self{% endif %}"
>
{% if current_user_id != comment['user_id'] %}
<img
class=
"user-image"
src=
"images/users/{{ image }}"
>
{% endif %}
</div>
{% if current_user_id != comment['user_id'] %}
<p
class=
"comment__name"
>
{{ comment['user_name']}}
</p>
{% endif %}
<p
class=
"comment__text"
>
{{ comment['content'] | safe }}
</p>
<div
class=
"comment__date"
>
<span>
{{ comment['date_added'] }}
</span>
{% if current_user_id == comment['user_id'] %}
<a
class=
"comment__btn"
href=
"{{ url_for('frontend.delete_comment', post_id=post.id, comment_id=comment.id) }}"
>
Delete Comment
</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
<div
class=
"comment__form-container"
>
<form
class=
"comment__form"
action=
""
method=
"POST"
>
{{ form.csrf_token }}
{{ displayField(form.content, 'Type comment here...') }}
<button
class=
"btn btn--solid post-btn"
type=
"submit"
>
SUBMIT
</button>
</form>
{{ ckeditor.load(pkg_type="basic") }}
{{ ckeditor.config(name='content') }}
</div>
</div>
</div>
</div>
<!-- END comments -->
</div>
<style>
.latest
{
padding
:
40px
0
;
padding
:
40px
0
;
}
}
...
@@ -230,3 +146,84 @@
...
@@ -230,3 +146,84 @@
font-size
:
16px
;
font-size
:
16px
;
cursor
:
pointer
;
cursor
:
pointer
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
</style>
<title>
POST PAGE
</title>
<a
class=
"home-btn"
href=
"{{ url_for('frontend.get_posts') }}"
>
Home
</a>
{% from 'macros.html' import displayField %}
{% include '_messages.html' %}
<br>
<!-- START posts -->
<div
class=
"col-md-8"
>
<div
class=
"post-container"
style=
"height: 400px; width: 100%; overflow: auto;
word-wrap: break-word; white-space: normal"
>
<div
class=
"tile__author"
>
<img
class=
"profile-image"
src=
"images/users/{{ owner_image }}"
>
<h2
><a
href=
"{{ url_for('frontend.display_user', user_id=post.user_id) }}"
>
{{ post['user_name'] }}
</a></h2>
</div>
<div
class=
"tile__header"
>
{{ post['title'] }}
</div>
<div
class=
"tile__text"
>
<p>
{{ post['content'] | safe }}
</p>
</div>
{% if post['image_url'] != '' %}
<img
class=
"post-image"
src=
"images/{{ post['image_url'] }}"
>
{% endif %}
<p
class=
"tile__date"
>
{{ post['date_added'] }}
</p>
{% if current_user_id == post['user_id'] %}
<div
class=
"tile__buttons"
>
<a
class=
"tile__btn"
href=
"{{ url_for('frontend.delete_post', post_id=post.id) }}"
>
Delete Post
</a>
</div>
{% endif %}
</div>
</div>
<!-- END posts -->
<!-- START comments -->
<div
class=
"comment-container"
style=
"overflow-y: auto; height: 600px; width: 100%"
>
<h3
class=
"comment__title"
>
COMMENTS
</h3>
{% if comments %}
{% for comment, image in comments %}
<div
class=
"comment__box{% if current_user_id == comment['user_id'] %} comment__box--self{% else %} comment__box--other{% endif %}"
>
<div
class=
"comment__author"
>
<div
class=
"comment__bubble{% if current_user_id == comment['user_id'] %} comment__bubble--self{% endif %}"
>
<div
class=
"comment__avatar{% if current_user_id == comment['user_id'] %} comment__avatar--self{% endif %}"
>
{% if current_user_id != comment['user_id'] %}
<img
class=
"user-image"
src=
"images/users/{{ image }}"
>
{% endif %}
</div>
{% if current_user_id != comment['user_id'] %}
<p
class=
"comment__name"
>
{{ comment['user_name']}}
</p>
{% endif %}
<p
class=
"comment__text"
>
{{ comment['content'] | safe }}
</p>
<div
class=
"comment__date"
>
<span>
{{ comment['date_added'] }}
</span>
{% if current_user_id == comment['user_id'] %}
<a
class=
"comment__btn"
href=
"{{ url_for('frontend.delete_comment', post_id=post.id, comment_id=comment.id) }}"
>
Delete Comment
</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
<div
class=
"comment__form-container"
>
<form
class=
"comment__form"
action=
""
method=
"POST"
>
{{ form.csrf_token }}
{{ displayField(form.content, 'Type comment here...') }}
<button
class=
"btn btn--solid post-btn"
type=
"submit"
>
SUBMIT
</button>
</form>
{{ ckeditor.load(pkg_type="basic") }}
{{ ckeditor.config(name='content') }}
</div>
</div>
</div>
</div>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment