Resolved merging issues

parent 8e98ab70
...@@ -3,7 +3,48 @@ ...@@ -3,7 +3,48 @@
{% block page-title %}Add Announcement:{% endblock %} {% block page-title %}Add Announcement:{% endblock %}
{% block heading %}<h1>Add a new announcement:</h1>{% endblock %} {% block heading %}
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
</style>
</head>
<body>
<ul>
<li><a class="active" href="/announcement_board/">Back</a></li>
<li><a href="/dashboard/">Dashboard</a></li>
<li><a href="/forum/">Forum</a></li>
</ul>
</body>
</html>
<h2>Add a new announcement:</h2>
{% endblock %}
{% block content %} {% block content %}
<form method="POST"> <form method="POST">
......
...@@ -2,11 +2,57 @@ ...@@ -2,11 +2,57 @@
{% load static %} {% load static %}
{% block page-title %}{{ announcement.title }}{% endblock %} {% block page-title %}{{ announcement.title }}{% endblock %}
{% block heading %}
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
</style>
</head>
<body>
<ul>
<li><a class="active" href="/announcement_board/">Back</a></li>
<li><a href="/dashboard/">Dashboard</a></li>
<li><a href="/forum/">Forum</a></li>
</ul>
</body>
</html>
{% endblock %}
{% block content %} {% block content %}
<h1> <link href='https://fonts.googleapis.com/css?family=Dancing Script' rel='stylesheet'>
<section>
<span>{{ announcement.title }}</span>
</section>
<h2>
{{ announcement.title }} {{ announcement.title }}
</h1> </h2>
<p> <p>
by {{ announcement.author.first_name }} {{ announcement.author.last_name }}<br> by {{ announcement.author.first_name }} {{ announcement.author.last_name }}<br>
...@@ -17,7 +63,7 @@ ...@@ -17,7 +63,7 @@
<p> <p>
Like: {{ announcement.getLike }}<br> Like: {{ announcement.getLike }}<br>
Love: {{ announcement.getLove }}<br> Love: {{ announcement.getLove }}<br>
Angry: {{ announcement.getAngry}} <br> Angry: {{ announcement.getAngry}} <br><br>
</p> </p>
<p> <p>
......
...@@ -3,7 +3,48 @@ ...@@ -3,7 +3,48 @@
{% block page-title %}Edit Announcement{% endblock %} {% block page-title %}Edit Announcement{% endblock %}
{% block heading %}<h1>Edit announcement:</h1>{% endblock %} {% block heading %}
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
</style>
</head>
<body>
<ul>
<li><a class="active" href="/announcement_board/">Announcements</a></li>
<li><a href="/dashboard/">Dashboard</a></li>
<li><a href="/forum/">Forum</a></li>
</ul>
</body>
</html>
<h2>Edit announcement:</h2>
{% endblock %}
{% block content %} {% block content %}
<form method="post"> <form method="post">
......
...@@ -3,15 +3,61 @@ ...@@ -3,15 +3,61 @@
{% block page-title %} Widget's Announcement Board {% endblock %} {% block page-title %} Widget's Announcement Board {% endblock %}
{% block heading %} <h1> Welcome to Widget's Announcement Board! </h1> {% endblock %} {% block heading %}
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
</style>
</head>
<body>
<ul>
<li><a class="active" href="/dashboard/">Dashboard</a></li>
<li><a href="/forum/">Forum</a></li>
</ul>
</body>
</html>
<header>
<link href='https://fonts.googleapis.com/css?family=Dancing Script' rel='stylesheet'>
<div class="overlay">
<h> Welcome to Widget's Announcement Board! </h>
</div>
</header>
{% endblock %}
{% block content %} {% block content %}
<p> Announcements:<br><br> <h3>Announcements: </h3>
{% for a in announcements_list %} <p>{% for a in announcements_list %}
<a href="{% url 'announcement_board:announcement-details' a.pk %}"> <a href="{% url 'announcement_board:announcement-details' a.pk %}">
{{a.title}} by {{ a.author.first_name }} {{ a.author.last_name }} {{a.title}} by {{ a.author.first_name }} {{ a.author.last_name }}
</a><br> </a><br>
{% endfor %} {% endfor %}
<br>
</p> </p>
{% endblock %} {% endblock %}
...@@ -21,9 +67,4 @@ ...@@ -21,9 +67,4 @@
<button class="btn add">New Announcement</button> <button class="btn add">New Announcement</button>
</a> </a>
</p> </p>
<p>
<a href="/dashboard/" class="link">Dashboard</a><br>
<a href="/forum/" class="link">Forum</a><br>
</p>
{% endblock %} {% endblock %}
# Generated by Django 4.2.1 on 2023-05-15 12:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('forum', '0002_auto_20230306_0546'),
('forum', '0003_alter_reply_pub_datetime'),
]
operations = [
]
p{ /* basic styles */
color: black;
font-family: monaco;
font-size:30px;
text-align: center;
}
h1 { h1 {
position: sticky; position: sticky;
text-align: center; text-align: left;
color: black; color: White;
font-size: 55px; font-size: 35px;
font-family: papyrus; font-family: arial;
} }
h2 { h2 {
position: sticky; position: sticky;
text-align: center; text-align: left;
color: black; color: Black;
font-size: 30px; font-size: 35px;
font-family: monaco; font-family: arial;
} }
body { body {
/* background-image: url("/static/bookshelf/books.jpg"); */
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-attachment: fixed; background-attachment: fixed;
} }
p{
color: black;
font-family: monaco;
font-size:20x;
text-align: left;
}
/* announcements page style */
header {
text-align: center;
width: 100%;
height: auto;
background-size: cover;
background-attachment: fixed;
position: relative;
overflow: hidden;
border-radius: 0 0 85% 85% / 30%;
}
header .overlay{
width: 100%;
height: 100%;
padding: 50px;
color: #FFF;
text-shadow: 1px 1px 1px #333;
background-image: linear-gradient( 135deg, #076585 10%, #fff 100%);
opacity: 0.7;
}
h {
font-family: 'Dancing Script', cursive;
font-size: 60px;
margin-bottom: 30px;
}
h3, p {
font-family: 'Open Sans', sans-serif;
}
button {
border: none;
outline: none;
padding: 10px 20px;
border-radius: 50px;
color: #333;
background: #fff;
margin-bottom: 50px;
box-shadow: 0 3px 20px 0 #0000003b;
}
button:hover{
cursor: pointer;
}
/* for links */
a{ a{
color: black; color: black;
font-family: monaco; font-family: 'Open Sans', sans-serif;;
font-weight: bold; font-size:15px;
font-size:25px;
} }
/* for ordered list */
ol { ol {
font-size:40px; font-size:40px;
font-family: monaco; font-family: monaco;
...@@ -44,30 +87,28 @@ ol { ...@@ -44,30 +87,28 @@ ol {
text-align: left; text-align: left;
} }
.flex-parent {
display: flex;
}
.jc-center {
justify-content: center;
}
button.margin-right {
margin-right: 30px;
}
button.margin-left { /* extra styles */
margin-left: 30px; .b {
text-align: left;
font-weight: bold;
font-size: 40px;
text-shadow: 3px 3px 6px black;
} }
.blue {
background-color: #74b4ec;
}
.pink { /* announcement details heading */
background-color: #eb73ad; section {
height: 100vh;
background: lightblue;
}
section span {
margin: 0;
font-size: 400%;
text-align: center;
line-height: 1;
padding-top: calc(50vh - 20pt);
display: block;
font-weight: 700;
font-family: 'Dancing Script', cursive;
} }
.green {
background-color: #2de684;
}
\ No newline at end of file
...@@ -123,6 +123,7 @@ USE_TZ = True ...@@ -123,6 +123,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/ # https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = 'static/' STATIC_URL = 'static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment