This commit is contained in:
Mikhail Ronchyk 2021-12-23 18:30:07 +03:00
parent 404ec59e69
commit e2a22a972f
27 changed files with 570 additions and 13 deletions

View File

@ -42,8 +42,6 @@
</nav>
{% endblock %}
<a href="../events/">Powrót do strony głównej</a>
<nav aria-label="Page navigation">
{% if users.has_other_pages %}
<ul class="pagination">
@ -68,7 +66,7 @@
{% endif %}
</nav>
<br>
<a href="../events/">Powrót do strony głównej</a>
<br>
<br>
</body>

View File

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
<title>HighNeed.pl</title>
</head>
<body>
<!--Navbar-->
<div class="navbar">
<div class="container flex">
<h1 class="logo">HighNeed.pl Poznań</h1>
<nav>
<ul>
<li><a href="main_page.html">Strona główna</a></li>
<li><a href="login.html">Logowanie</a></li>
<li><a href="events.html">Wyszukaj wydarzenia</a></li>
<li><a href="calendar.html">Kalendarz</a></li>
<li><a href="fanpage.html">Fanpage</a></li>
</ul>
</nav>
</div>
</div>
<!--Login panel-->
<div class="showcase-form">
<h1> Logowanie </h1>
<form>
<div class="form-control">
<input type="email" name="email" placeholder="Email" required />
</div>
<div class="form-control">
<input type="password" name="password" placeholder="Hasło" required />
</div>
<div class="two-btn">
<input type="submit" value="Zaloguj się" class="btn marg" />
<input type="submit" value="Zaloguj się przez Facebooka" class="btn marg" />
</div>
<div class="container grid-2">
<div class="showcase-text">
<p>Pierwszy raz na stronie?</p>
<a href="register.html" class="btn">
<p>Zarejestruj się</p>
</a>
</div>
<div class="showcase-text">
<p>Nie pamiętasz hasła?</p>
<a href="reset-pwd.html" class="btn">
<p>Zresetuj hasło</p>
</a>
</div>
</div>
</form>
</div>
</body>
</html>

View File

@ -0,0 +1,160 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
<title>HighNeed.pl</title>
</head>
<body>
<!--Navbar-->
<div class="navbar">
<div class="container flex">
<h1 class="logo">HighNeed.pl Poznań</h1>
<nav>
<ul>
<li><a href="main_page.html">Strona główna</a></li>
<li><a href="login.html">Logowanie</a></li>
<li><a href="events.html">Wyszukaj wydarzenia</a></li>
<li><a href="calendar.html">Kalendarz</a></li>
<li><a href="fanpage.html">Fanpage</a></li>
</ul>
</nav>
</div>
</div>
<!--Button-list-->
<section class="categories">
<div class="container">
<input type="submit" value="Sport" class="btn btn-list" />
<input type="submit" value="Plastyka" class="btn btn-list" />
<input type="submit" value="Muzyka" class="btn btn-list"/>
<input type="submit" value="Taniec" class="btn btn-list" />
<input type="submit" value="Edukacja" class="btn btn-list" />
</div>
</section>
<!--Article1-->
<section class="showcase article1">
<div class="container grid">
<img class="art1-img" src="../images/img-article.jpg" alt="" />
<div class="showcase-text">
<h1>Witamy na stronie HighNeed</h1>
<p>HighNeed.pl jest portalem do planowania aktywności dla rodzin z dziećmi w Poznaniu. Tu znajdziesz wydarzenia odpowiadające zainteresowaniom dzieci odbywające się w Poznaniu.</p>
</div>
</div>
<div class="divider-bottom">
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
<path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" class="shape-fill"></path>
</svg>
</div>
</section>
<!--Article2-->
<section class="showcase article2">
<div class="container grid">
<div class="showcase-text">
<h1>Wyszukiwanie wydarzeń w twojej okolicy</h1>
<p> Znajdź grupy i wydarzenia na terenie Poznania, dzięki którym Twoje dziecko rozwinie swoje zainteresowanie oraz zawrze nowe znajomości.</p>
<a href="events.html" class="btn ">
<div class="icon-text">
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9325 15.7562C18.969 13.1408 18.785 9.35694 16.3807 6.95262C13.7772 4.34913 9.55612 4.34913 6.95262 6.95262C4.34913 9.55612 4.34913 13.7772 6.95262 16.3807C9.35694 18.785 13.1408 18.969 15.7562 16.9325C15.7675 16.9453 15.7793 16.9578 15.7915 16.97L19.327 20.5055C19.6524 20.8309 20.1801 20.8309 20.5055 20.5055C20.8309 20.1801 20.8309 19.6524 20.5055 19.327L16.97 15.7915C16.9578 15.7793 16.9453 15.7675 16.9325 15.7562ZM15.2022 8.13113C17.1548 10.0838 17.1548 13.2496 15.2022 15.2022C13.2496 17.1548 10.0838 17.1548 8.13113 15.2022C6.17851 13.2496 6.17851 10.0838 8.13113 8.13113C10.0838 6.17851 13.2496 6.17851 15.2022 8.13113Z" fill="white" />
</svg>
<p>Wyszukaj wydarzenia</p>
</div>
</a>
</div>
<img class="art2-img" src="../images/img-article2.jpg" alt="" />
</div>
</section>
<!--Google Map-->
<section class="showcase maps">
<div class="container grid">
<div class="map-responsive">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d155797.26090085393!2d16.761583054596013!3d52.40065525305756!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470444d2ece10ab7%3A0xa4ea31980334bfd1!2zUG96bmHFhA!5e0!3m2!1spl!2spl!4v1640198590651!5m2!1spl!2spl" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
</div>
<div class="showcase-text">
<h1>Interaktywna mapa</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tristique porta risus, ac condimentum ex. Ut interdum dui ac dui pretium efficitur. Sed tempor, leo quis blandit sagittis, augue nulla malesuada urna, quis cursus ligula ante at urna. Etiam ligula est, bibendum at urna quis, pellentesque semper eros</p>
</div>
</div>
</section>
<!--Nadchodzace wydarzenia-->
<section class="showcase inc-events">
<div class="container">
<h1>Nadchodzące wydarzenia</h1>
<div class="flex">
<div class="card">
<a href="events.html">
<img class="art3-img" src="../images/test1.jpg" alt="" />
<h3>Wydarzenie nr. 1</h3>
<p>Data</p>
</a>
</div>
<div class="card">
<a href="events.html">
<img class="art3-img" src="../images/test1.jpg" alt="" />
<h3>Wydarzenie nr. 1</h3>
<p>Data</p>
</a>
</div>
<div class="card">
<a href="events.html">
<img class="art3-img" src="../images/test1.jpg" alt="" />
<h3>Wydarzenie nr. 1</h3>
<p>Data</p>
</a>
</div>
<div class="card">
<a href="events.html">
<img class="art3-img" src="../images/test1.jpg" alt="" />
<h3>Wydarzenie nr. 1</h3>
<p>Data</p>
</a>
</div>
<div class="card">
<a href="events.html">
<img class="art3-img" src="../images/test1.jpg" alt="" />
<h3>Wydarzenie nr. 1</h3>
<p>Data</p>
</a>
</div>
</div>
</div>
</section>
<!--Footer-->
<div class="footer">
<div class="container">
<h2>Kontakt</h2>
<div class="icon-text">
<svg width="22" height="18" viewBox="0 0 22 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="2.19995" y="2.26282" width="17.6" height="13.5771" fill="white" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.011941 1.22869C0.011941 0.550109 0.559142 0 1.23416 0H20.7778C21.4528 0 22 0.550109 22 1.22869V15.1426C22 16.4998 20.9056 17.6 19.5556 17.6H2.44444C1.09441 17.6 0 16.4998 0 15.1426V1.62705C0 1.56854 0.0040699 1.51099 0.011941 1.45466V1.22869ZM2.44444 3.961V15.1426H19.5556V3.96142L13.5929 9.95559C12.161 11.3951 9.83938 11.3951 8.40748 9.95559L2.44444 3.961ZM4.36617 2.41763H17.6342L11.8645 8.21798C11.3872 8.69778 10.6133 8.69778 10.136 8.21798L4.36617 2.41763Z" fill="#FF0000" />
</svg>
<p>testowymail@mail.com</p>
</div>
<div class="icon-text">
<svg width="22" height="23" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22 11.3492C22 5.08071 17.0756 0 11 0C4.92438 0 0 5.08071 0 11.3492C0 17.0145 4.02027 21.7096 9.28219 22.5616V14.6327H6.49151V11.3492H9.28219V8.84927C9.28219 6.00731 10.9216 4.43396 13.4351 4.43396C14.6405 4.43396 15.9003 4.65784 15.9003 4.65784V7.45005H14.514C13.1458 7.45005 12.7238 8.3269 12.7238 9.2224V11.3492H15.7737L15.2855 14.6327H12.7238V22.5616C17.9797 21.7096 22 17.0145 22 11.3492Z" fill="#1877F2" />
<path d="M15.2794 14.6327L15.7677 11.3492H12.7178V9.22239C12.7178 8.32689 13.1457 7.45005 14.5079 7.45005H15.8942V4.65783C15.8942 4.65783 14.6345 4.43396 13.429 4.43396C10.9156 4.43396 9.27616 6.0073 9.27616 8.84927V11.3492H6.48547V14.6327H9.27616V22.5616C9.83671 22.6549 10.4093 22.6984 10.994 22.6984C11.5786 22.6984 12.1512 22.6487 12.7118 22.5616V14.6327H15.2794Z" fill="white" />
</svg>
<p2>Facebook fanpage</p2>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,306 @@
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap');
:root {
--background-green: #64BE7B;
--background-dark-green: #347945;
--background-light-green: #D7FBDF;
}
* {
box-sizing:border-box;
padding:0;
margin:0;
}
body{
font-family: 'Lato', sans-serif;
color: black;
line-height:1.6;
}
ul{
list-style-type: none;
}
a{
text-decoration:none;
color: #333;
}
h1, h2{
font-weight: 600;
line-height: 1.2;
margin: 10px 0;
}
p{
margin: 10px 0;
}
img{
width:100%;
}
/* Navbar */
.navbar {
background-color: var(--background-green);
border-bottom: 5px solid var(--background-dark-green);
color: white;
height: 70px;
}
.navbar ul{
display: flex;
}
.navbar a {
color: white;
padding: 10px;
margin: 0 5px;
}
.navbar a:hover{
border-bottom: 3px #fff solid;
}
.navbar .flex {
justify-content: space-between;
}
/* Showcase*/
.showcase {
background-color: var(--background-green);
color: var(--background-dark-green);
position: relative;
padding: 20px 0;
}
.article1 {
/*background-image: url("../images/background.jpg");*/
color: white;
}
.article2 {
background-color:var(--background-light-green);
}
.maps {
background-color: var(--background-green);
color: white;
}
.map-responsive {
overflow: hidden;
padding-bottom: 75%;
position: relative;
height: 0;
}
.map-responsive iframe {
left: auto;
left: auto;
top: 0;
height: 100%;
width: 100%;
position: absolute;
}
.art1-img {
border-radius: 5%;
}
.art2-img {
border-radius: 100%;
padding: 20px;
margin: 10px;
position: relative;
}
.showcase h1 {
font-size: 40px;
}
.showcase p{
margin: 20px 0;
font-size: 20px;
}
.showcase .grid{
overflow: visible;
grid-template-columns: 55% 45%;
gap: 30px;
}
.showcase-form {
background-color: var(--background-light-green);
color: var(--background-dark-green);
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
padding: 20px;
margin: 10px 250px;
display:grid;
justify-content:center;
align-items:center;
}
/* change inside showcase */
.showcase-form .form-control{
margin: 20px 0;
}
.showcase-form input[type='text'],
.showcase-form input[type='email'],
.showcase-form input[type='password']{
border:0;
background-color:var(--background-light-green);
border-bottom: 2px solid var(--background-green);
width:100%;
padding:3px;
font-size: 16px;
}
.showcase-form input:focus{
outline:none;
}
.divider-bottom {
position: relative;
bottom: -20px;
left: 0;
width: 100%;
overflow: hidden;
line-height: 0;
transform: rotate(180deg);
}
.divider-bottom svg {
position: relative;
display: block;
width: calc(130% + 1.3px);
height: 90px;
}
.divider-bottom .shape-fill {
fill: var(--background-light-green)
}
/* Utilities */
.container {
max-width: 1500px;
margin: 0 auto;
overflow:auto;
padding: 0 30px;
}
.card {
background-color: white;
color: var(--background-dark-green);
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
padding: 20px;
margin: 10px;
width:220px;
}
.btn {
display:inline-block;
padding: 10px 30px;
cursor: pointer;
background: var(--background-green);
color:white;
border:none;
border-radius:40px;
}
.btn:hover{
background-color:var(--background-dark-green);
}
.icon-text {
display: flex;
justify-content: left;
align-items: center;
grid-gap: 10px;
height: 30px;
}
.flex {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.grid {
display:grid;
grid-template-columns: 2fr 1fr;
grid-gap: 20px;
justify-content: center;
align-items: center;
height: 100%;
}
.inc-events{
background-color:var(--background-light-green);
}
.inc-events .flex {
flex-wrap: wrap;
}
.inc-events .card{
text-align:center;
margin:15px 10px 40px;
transition: transform 0.2s ease-in;
}
.inc-events .card h3{
font-size:20px;
margin-bottom:10px;
}
.inc-events .card:hover {
transform:translateY(-10px);
}
.footer {
height: 120px;
background-color: var(--background-green);
border-top: 5px solid var(--background-dark-green);
color: white;
}
.two-btn{
display:grid;
justify-content:center;
padding: 20px;
}
.marg{
margin:20px;
}
.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}
.categories{
display:flex;
justify-content:center;
align-items:center;
padding:20px 0;
border-bottom:5px solid var(--background-dark-green);
}
.btn-list{
margin: 0 20px;
width: 150px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -2,7 +2,8 @@ from django.urls import path
from django.views.generic import TemplateView
from . import views
from django.conf import settings
from django.conf.urls.static import static
app_name = 'events'
urlpatterns = [
path('', views.index, name='events'),
@ -11,5 +12,9 @@ urlpatterns = [
path('search/', views.search, name='search'),
path('category/<int:pk>/', views.listofcategories, name='listofcategories'),
path('all_events/', views.events, name='events'),
#path('events/', TemplateView.as_view(template_name='events/index.html'), name='events'),
]
path('style/', TemplateView.as_view(
template_name='events/style.css',
content_type='text/css')
),
#path('events/', TemplateView.as_view(template_name='events/main_page.html'), name='main'),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -8,6 +8,8 @@ from .forms import EventForm, CategoryForm
from django.shortcuts import render, get_object_or_404, redirect
from django.db.models import Q
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
def index(request):
latest_news_list = Event.objects.order_by('-pub_date')
@ -30,7 +32,7 @@ def index(request):
'numofnews': numofnews,
}
return render(request, 'profil.html', context)
return render(request, 'events/main_page.html', context)
def events(request):

View File

@ -12,6 +12,9 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
import os
from pathlib import Path
from django.urls import path
from django.views.generic import TemplateView
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@ -61,7 +64,8 @@ ROOT_URLCONF = 'highneed.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'events/highneed_react/build'), ],
#'DIRS': [os.path.join(BASE_DIR, 'events/highneed_react/build'), ],
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@ -144,6 +148,18 @@ STATIC_URL = '/static/'
LOGIN_REDIRECT_URL = '../../events'
LOGOUT_REDIRECT_URL = '../../events/'
SESSION_COOKIE_SECURE = False
#STATICFILES_DIRS = [
# os.path.join(BASE_DIR, 'events/highneed_react/build/static'),
#]
MEDIA_URL = '/images/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'events/highneed_react/build/static'),
]
os.path.join(BASE_DIR, 'static')
]
MEDIA_ROOT = os.path.join(
BASE_DIR, 'static/images'
)

View File

@ -17,11 +17,12 @@ from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from events import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
#path('events/', include('events.urls')),
#path('events/', TemplateView.as_view(template_name='events/index.html'), name='events'),
path('events/', include('events.urls')),
#path('events/', views.index, name='events'),
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('profil/', views.index, name='profil'),
@ -29,6 +30,10 @@ urlpatterns = [
path('profil/add_category/', views.createCategory),
path('all_events/category/<int:pk>/', views.listofcategories, name='listofcategories'),
path('all_events/', views.events, name='events'),
path('style/', TemplateView.as_view(
template_name='events/style.css',
content_type='text/css')
),
#path('profil/add_event/', TemplateView.as_view(template_name='add_event.html')),
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)