Skip to content

Commit 2a5d761

Browse files
authored
Merge pull request #9 from darjeeling/main
add template
2 parents 05a7a88 + e1b703e commit 2a5d761

14 files changed

+233
-0
lines changed
Loading
Loading
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{% load static %}
2+
{% load wagtailcore_tags %}
3+
{% load wagtailimages_tags %}
4+
{% wagtail_site as current_site %}
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
<head>
8+
<meta charset="UTF-8">
9+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
10+
<title>{% block title %}Python Asia{% endblock title %}</title>
11+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css">
12+
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.13.5/cdn.min.js"></script>
13+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js"></script>
14+
<style>
15+
html, body {
16+
height: 100%;
17+
margin: 0;
18+
}
19+
body {
20+
padding-top: 40px;
21+
display: flex;
22+
flex-direction: column;
23+
}
24+
main {
25+
flex: 1;
26+
}
27+
footer {
28+
background-color: #f8f9fa;
29+
margin-bottom: 20px;
30+
}
31+
</style>
32+
</head>
33+
<body>
34+
<!-- Navigation -->
35+
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
36+
<div class="container">
37+
<a class="navbar-brand" href="{% pageurl current_site.root_page %}">
38+
<img src="{% static 'pao/01-Main2.png' %}" alt="Python Asia Organization Logo"
39+
height="80"/>
40+
</a>
41+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
42+
<span class="navbar-toggler-icon"></span>
43+
</button>
44+
<div class="collapse navbar-collapse" id="navbarNav">
45+
<ul class="navbar-nav ms-auto">
46+
{% for menu_page in current_site.root_page.get_children.live.in_menu %}
47+
<li class="nav-item"><a class="nav-link" href="{% pageurl menu_page %}">{{menu_page.title}}</a></li>
48+
{% endfor %}
49+
</ul>
50+
</div>
51+
</div>
52+
</nav>
53+
54+
<!-- Main Content -->
55+
<main class="container mt-5 pt-5">
56+
{% block content %}{% endblock content %}
57+
</main>
58+
59+
<!-- Footer -->
60+
<footer class="sponsor-footer mt-5">
61+
<div class="container text-center">
62+
<h4 class="text-center mb-4">Our Sponsors</h4>
63+
<div class="row justify-content-center">
64+
{% for sponsor in sponsors %}
65+
<div class="col-md-3 col-6 text-center mb-3">
66+
<img src="{{ sponsor.logo }}" alt="{{ sponsor.name }}" class="img-fluid" style="max-height: 60px;">
67+
</div>
68+
{% endfor %}
69+
</div>
70+
</div>
71+
{% if looking_for_sponsors %}
72+
<h4 class="text-center mb-4">looking for sponsors!</h4>
73+
{% endif %}
74+
</footer>
75+
</body>
76+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
<div>
8+
<h2 class="mb-4">{{ page.title }} of Python Asia</h2>
9+
{% for community in page.get_children.live %}
10+
<a href="{% pageurl community %}" class="list-group-item list-group-item-action">
11+
<div class="d-flex w-100 justify-content-between">
12+
<h5 class="mb-1">{{ community.title }}</h5>
13+
<small class="text-muted">{{ community.country }}</small>
14+
</div>
15+
<p class="mb-1">{{ community.content | richtext }}</p>
16+
<small class="text-muted">details</small>
17+
</a>
18+
{% empty %}
19+
Sorry there is no {{ page.title }}
20+
{% endfor %}
21+
</div>
22+
{% endblock %}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.title }}
8+
{{ page.event_date }}
9+
{{ page.content|richtext }}
10+
{% endblock %}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
<div class="container my-5">
8+
<h1 class="mb-4">Python Asia Events</h1>
9+
<div class="list-group">
10+
{% for event in page.get_children.live %}
11+
<a href="{% pageurl event %}" class="list-group-item list-group-item-action">
12+
<div class="d-flex w-100 justify-content-between">
13+
<h5 class="mb-1">{{ event.title }}</h5>
14+
<small class="text-muted">{{ event.event_date }}</small>
15+
</div>
16+
<p class="mb-1">{{ event.content | richtext }}</p>
17+
<small class="text-muted">details</small>
18+
</a>
19+
{% empty %}
20+
Sorry there is no Events
21+
{% endfor %}
22+
</div>
23+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.body|richtext }}
8+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.body|richtext }}
8+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.content|richtext }}
8+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.body|richtext }}
8+
{% endblock %}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
<h2 class="mb-4">People of Python Asia</h2>
8+
{% for person in page.get_children.live %}
9+
<a href="{% pageurl person %}" class="list-group-item list-group-item-action">
10+
<div class="d-flex w-100 justify-content-between">
11+
<h5 class="mb-1">{{ person.title }}</h5>
12+
<small class="text-muted">{{ person.country }}</small>
13+
</div>
14+
<p class="mb-1">{{ person.content | richtext }}</p>
15+
<small class="text-muted">details</small>
16+
</a>
17+
{% empty %}
18+
Sorry there is no People
19+
{% endfor %}
20+
</div>
21+
{% endblock %}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
4+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
5+
6+
{% block content %}
7+
{{ page.name }}
8+
{{ page.year }}
9+
{{ page.position }}
10+
{{ page.country }}
11+
{% endblock %}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
{% load wagtailimages_tags %}
4+
5+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock title %}
6+
7+
{% block content %}
8+
{{ page.body|richtext }}
9+
10+
{{ page.title }}
11+
{% image page.image original %}
12+
{{ page.year }}
13+
{{ page.sponsor_type }}
14+
{{ page.description }}
15+
{% endblock %}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% extends 'pao/pao_base.html' %}
2+
{% load wagtailcore_tags %}
3+
{% load wagtailimages_tags %}
4+
5+
{% block title %}Home - Python Asia - {{ page.title }}{% endblock %}
6+
7+
{% block content %}
8+
<h2 class="mb-4">Sponsors of Python Asia</h2>
9+
{% for sponsor in page.get_children.live %}
10+
<div class="row">
11+
<div class="col-md-4 mb-4">
12+
<div class="card">
13+
<div class="card-body">
14+
<h5 class="card-title" x-text="sponsior.name">{{ sponsor.title }}</h5>
15+
{% image sponsor.image original %}
16+
</div>
17+
</div>
18+
</div>
19+
{% empty %}
20+
Sorry there is no Sponsors
21+
{% endfor %}
22+
</div>
23+
{% endblock %}

0 commit comments

Comments
 (0)