Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_someone here is possessed by an owl
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laetitia de Castro
widget_someone here is possessed by an owl
Commits
ac905af1
Commit
ac905af1
authored
May 23, 2022
by
Titia de Castro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added styles to announcement details page
parent
bf3f54b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
10 deletions
+50
-10
announcement_detail.html
...ncements/templates/announcements/announcement_detail.html
+12
-10
announcements.css
static/announcements.css
+38
-0
No files found.
announcements/templates/announcements/announcement_detail.html
View file @
ac905af1
...
...
@@ -11,20 +11,22 @@
<h1
class=
"announcement-heading"
>
{{ announcement.announcement_title }}
</h1>
<h2
class=
"announcement-subtitle"
>
by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:'d/m/Y' }}
</h2>
<p>
{{ announcement.announcement_body }}
</p>
{% load static %}
{% if announcement.id == 1 %}
<img
src=
"{% static 'announcement1.jpg' %}"
alt=
"Leni Robredo"
>
<img
src=
"{% static 'announcement1.jpg' %}"
class=
"announcement-image"
alt=
"Leni Robredo"
>
{% elif announcement.id == 2 %}
<img
src=
"{% static 'announcement2.jpg' %}"
alt=
"Lady Gaga in her meat dress"
>
<img
src=
"{% static 'announcement2.jpg' %}"
class=
"announcement-image"
alt=
"Lady Gaga in her meat dress"
>
{% else %}
<img
src=
"{% static 'announcement3.jpg' %}"
alt=
"Taylor Swift handing an award to Bruno Mars"
>
<img
src=
"{% static 'announcement3.jpg' %}"
class=
"announcement-image"
alt=
"Taylor Swift handing an award to Bruno Mars"
>
{% endif %}
<p>
{{ announcement.announcement_body }}
</p>
{% for reaction in announcement.reactions.all %}
<p>
{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}
</p>
{% endfor %}
<div
class=
"announcement-reactions"
>
{% for reaction in announcement.reactions.all %}
<p>
{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}
</p>
{% endfor %}
</div>
{% endblock %}
\ No newline at end of file
static/announcements.css
View file @
ac905af1
...
...
@@ -15,6 +15,44 @@
font-weight
:
500
;
}
.announcement-subtitle
{
text-align
:
center
;
font-weight
:
500
;
font-size
:
18px
;
}
.announcement-list
{
margin-left
:
24px
;
}
.announcement-image
{
width
:
20%
;
}
.announcement-body
{
display
:
flex
;
flex-direction
:
column
;
}
.announcement-reactions
{
display
:
flex
;
margin
:
8px
0
0
0
;
padding
:
0
;
}
.announcement-reactions
p
{
border
:
1px
solid
#e6e6e6
;
padding
:
6px
12px
;
}
.announcement-reactions
p
:nth-child
(
1
)
{
color
:
#118AB2
;
}
.announcement-reactions
p
:nth-child
(
2
)
{
color
:
#FB898D
;
}
.announcement-reactions
p
:last-child
{
color
:
#B72A3F
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment