css addedon all_events, profil, detail and mainpage
This commit is contained in:
parent
71426225f5
commit
9d7a0c82c8
Binary file not shown.
@ -31,34 +31,49 @@
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<p>All {{ numofnews }} news</p>
|
||||
<br>
|
||||
|
||||
<section class="categories">
|
||||
<div class="container">
|
||||
{% for i in categories %}
|
||||
<a class="btn btn-list" href="category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
<p>Wyszukaj</p><br>
|
||||
<p>Kategorie</p><br>
|
||||
<p>Filtry</p><br>
|
||||
|
||||
{% block content %}
|
||||
<form method="GET" action="{% url 'events:search' %}">
|
||||
<input name="q" value="{{ request.GET.q }}" placeholder="search">
|
||||
<button type="submit">Search</button>
|
||||
<button class= 'btn' type="submit">Search</button>
|
||||
</form>
|
||||
|
||||
<p>All {{ numofnews }} news</p>
|
||||
|
||||
|
||||
|
||||
<nav>
|
||||
<p class="cat">Category:</p>
|
||||
{% for i in categories %}
|
||||
<a class="cat" href="category/{{ i.id }}/">{{ i.name }}</a><br>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
<br>
|
||||
{% endblock %}
|
||||
|
||||
<h1>Wydarzenia:</h1>
|
||||
<section class="showcase inc-events">
|
||||
<div class="container">
|
||||
<h1>Nadchodzące wydarzenia</h1>
|
||||
<div class="flex">
|
||||
{% for user in users %}
|
||||
<ul>
|
||||
<li><a href="{% url 'events:detail' user.id %}">{{ user.title }}</a></li>
|
||||
<div class="card"><li><a href="{% url 'events:detail' user.id %}">{{ user.title }}<img class="art3-img" src="../images/test1.jpg" alt="" /></a></li>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<br>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<nav aria-label="Page navigation">
|
||||
{% if users.has_other_pages %}
|
||||
<ul class="pagination">
|
||||
|
@ -3,41 +3,117 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Detail</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> -->
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'css/style.css' %}" type="text/css">
|
||||
|
||||
<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="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!--Navbar-->
|
||||
<div class="navbar">
|
||||
<div class="container flex">
|
||||
<h1 class="logo">HighNeed.pl Poznań</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{% url 'events:index' %}">Strona główna</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'profil' %}">Profil</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'account_login' %}">Log in</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url 'events' %}">Wyszukaj wydarzenia</a></li>
|
||||
<li><a href="calendar.html">Kalendarz</a></li>
|
||||
<li><a href="fanpage.html">Fanpage</a></li>{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<li>{{ user.username }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% load account %}
|
||||
{% user_display user as u %}
|
||||
|
||||
<h1 >{{ events.title }}</h1>
|
||||
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
|
||||
<p>{{ events.description}}</p>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p>{{ events.likes }} likes</p>
|
||||
{% if u %}
|
||||
<form method='POST' action="like/">
|
||||
{% csrf_token %}
|
||||
<p><input type='submit' value='Like it' /></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
<br>
|
||||
<p>Was published: {{ events.pub_date }}</p>
|
||||
<p>Kategoria: </p>
|
||||
{% for i in category %}
|
||||
{% if i == events.category %}
|
||||
<a class="cat" href="../category/{{ i.id }}/">{{ i.name }}</a><br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!--Article1-->
|
||||
<section class="showcase article1">
|
||||
<div class="container grid">
|
||||
<img class="art1-img" src="../images/img-article.jpg" alt="" />
|
||||
<div class="showcase-text">
|
||||
<h1>{{ events.title }}</h1>
|
||||
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
|
||||
<p><sub>Zostało opublikowane: {{ events.pub_date }}</sub></p>
|
||||
<p><b>Miejsce: {{events.place}}</b></p>
|
||||
<p><b>Czas: {{events.data}}</b></p>
|
||||
<p><b>Kategoria:</b>
|
||||
{% for i in category %}
|
||||
{% if i == events.category %}
|
||||
<a class="cat" href="../category/{{ i.id }}/">{{ i.name }}</a><br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ events.likes }} likes
|
||||
{% if u %}
|
||||
<form method='POST' action="like/">
|
||||
{% csrf_token %}
|
||||
<p><input type='submit' value='Like it' /></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
<p><input type='submit' value='Dodaj do "Zaplanowanych"'/></p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Galeria zdjęciowa -->
|
||||
<!-- <section class="showcase article2">
|
||||
<div class="container">
|
||||
<h1>Galeria</h1>
|
||||
<div class="flex">
|
||||
<img class="art3-img" src="../images/test1.jpg" alt="" />
|
||||
<img class="art3-img" src="../images/img-article.jpg" alt="" />
|
||||
<img class="art3-img" src="../images/img-article.jpg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</section> -->
|
||||
|
||||
<!--Google Map-->
|
||||
<section class="showcase article2">
|
||||
<div class="container grid">
|
||||
<div class="showcase-text">
|
||||
<h1>Opis wydarzenia</h1>
|
||||
<p>{{ events.description}}</p>
|
||||
</div>
|
||||
<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>
|
||||
</section>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
/**
|
||||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
|
||||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
|
||||
|
||||
var disqus_config = function () {
|
||||
this.page.url = "https://localhost:8000/profil/"; // Replace PAGE_URL with your page's canonical URL variable
|
||||
this.page.identifier = "comment"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
||||
};
|
||||
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://highneed.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<script id="dsq-count-scr" src="//highneed.disqus.com/count.js" async></script>
|
||||
|
||||
|
||||
|
||||
|
@ -42,11 +42,31 @@
|
||||
<!--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" />
|
||||
{% for i in categories %}
|
||||
{% if i.name == "Sport" %}
|
||||
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for i in categories %}
|
||||
{% if i.name == "Plastyka" %}
|
||||
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for i in categories %}
|
||||
{% if i.name == "Muzyka" %}
|
||||
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for i in categories %}
|
||||
{% if i.name == "Taniec" %}
|
||||
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for i in categories %}
|
||||
{% if i.name == "Edukacja" %}
|
||||
<a class="btn btn-list" href="../all_events/category/{{ i.id }}/">{{ i.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -3,65 +3,64 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Profil</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/style.css' %}" type="text/css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--Navbar-->
|
||||
<div class="navbar">
|
||||
<div class="container flex">
|
||||
<h1 class="logo">HighNeed.pl Poznań</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{% url 'events:index' %}">Strona główna</a></li>
|
||||
<li><a href="{% url 'events' %}">Wyszukaj wydarzenia</a></li>
|
||||
<li><a href="calendar.html">Kalendarz</a></li>
|
||||
<li><a href="fanpage.html">Fanpage</a></li>
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'profil' %}"><b>Hi {{ user.username }}!</b></a>
|
||||
<li><a href="{% url 'account_logout' %}" style="color:black">Log Out</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'account_login' %}" style="color:black">You are not logged in!</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Button-list-->
|
||||
<section class="categories">
|
||||
<div class="container">
|
||||
<a href="{% url 'events' %}"><div class="btn btn-list">Zobacz Wydarzenia</div></a>
|
||||
<a href="add_event/"><div class="btn btn-list">Stwórz Wydarzenie</div></a>
|
||||
<a href="add_category/"><div class="btn btn-list">Stwórz Kategorie</div></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% block title %}Home{% endblock %}
|
||||
<!--Article1-->
|
||||
<section class="showcase article2">
|
||||
<nav>
|
||||
<h1 class="cat">Zaplanowane Wydarzenia:</h1>
|
||||
<!-- {% for user in users %}
|
||||
<ul>
|
||||
<li><a href="{% url 'events:detail' user.id %}">{{ user.title }}</a></li>
|
||||
<br>
|
||||
</ul>
|
||||
{% endfor %} -->
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
Hi {{ user.username }}!
|
||||
<p><a href="{% url 'account_logout' %}">Log Out</a></p>
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'account_login' %}">Log In</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<p><a href="{% url 'events' %}">Zobacz Wydarzenia</a></p>
|
||||
|
||||
<p><a href="add_event/">Stwórz Wydarzenie</a></p>
|
||||
<br>
|
||||
<p><a href="add_category/">Stwórz Kategorie</a></p>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<nav>
|
||||
<h1 class="cat">Events:</h1>
|
||||
|
||||
{% for i in latest_news_list %}
|
||||
<p>Nazwa: {{ i.title }}</p><b></b>
|
||||
<p>Data: {{ i.data }}</p><b></b>
|
||||
<p>Miasto: {{ i.place }}</p><b></b>
|
||||
<p>Opublikowane: {{ i.pub_date }}</p><br>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
/**
|
||||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
|
||||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
|
||||
|
||||
var disqus_config = function () {
|
||||
this.page.url = "https://localhost:8000/profil/"; // Replace PAGE_URL with your page's canonical URL variable
|
||||
this.page.identifier = "comment"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
||||
};
|
||||
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://highneed.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<script id="dsq-count-scr" src="//highneed.disqus.com/count.js" async></script>
|
||||
{% for i in latest_news_list %}
|
||||
<p>Nazwa: {{ i.title }}</p><b></b>
|
||||
<p>Data: {{ i.data }}</p><b></b>
|
||||
<p>Miasto: {{ i.place }}</p><b></b>
|
||||
<p>Opublikowane: {{ i.pub_date }}</p><br>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
@ -16,7 +16,7 @@ def index(request):
|
||||
page = request.GET.get('page', 1)
|
||||
paginator = Paginator(latest_news_list, 10)
|
||||
numofnews = len(Event.objects.all())
|
||||
|
||||
categories = Category.objects.all()
|
||||
try:
|
||||
users = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
@ -30,6 +30,8 @@ def index(request):
|
||||
'Place': Event.place,
|
||||
'description': Event.description,
|
||||
'numofnews': numofnews,
|
||||
'category': Category.name,
|
||||
'categories': categories,
|
||||
}
|
||||
|
||||
return render(request, 'events/main_page.html', context)
|
||||
@ -40,7 +42,7 @@ def index2(request):
|
||||
page = request.GET.get('page', 1)
|
||||
paginator = Paginator(latest_news_list, 10)
|
||||
numofnews = len(Event.objects.all())
|
||||
|
||||
categories = Category.objects.all()
|
||||
try:
|
||||
users = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
@ -55,6 +57,8 @@ def index2(request):
|
||||
'description': Event.description,
|
||||
'numofnews': numofnews,
|
||||
'users': users,
|
||||
'category': Category.name,
|
||||
'categories': categories,
|
||||
}
|
||||
|
||||
return render(request, 'profil.html', context)
|
||||
|
Loading…
Reference in New Issue
Block a user