diff --git a/eventex/core/static/css/main.css b/eventex/core/static/css/main.css index 48612e2..31ae91b 100755 --- a/eventex/core/static/css/main.css +++ b/eventex/core/static/css/main.css @@ -360,4 +360,13 @@ section header h2 { border-color: #d0e9c6; } +.speakers h2{ + text-transform: uppercase +} + +.speakers img{ + width: 200px; + border-radius: 100%; +} + /* Fim Customização */ diff --git a/eventex/core/templates/base.html b/eventex/core/templates/base.html index e323f25..f877a8b 100644 --- a/eventex/core/templates/base.html +++ b/eventex/core/templates/base.html @@ -23,24 +23,7 @@
- + {% include 'nav.html' only %}
{% block content %} diff --git a/eventex/core/templates/index.html b/eventex/core/templates/index.html index b4620ce..015ebf6 100755 --- a/eventex/core/templates/index.html +++ b/eventex/core/templates/index.html @@ -35,24 +35,7 @@
- + {% include 'nav.html' only%}
@@ -73,6 +56,18 @@

A Conferência

+
+
+

Palestrantes Convidados

+ {% for speaker in speakers %} +
+ +

{{ speaker.name }}

+
+ {% endfor %} +
+
+
diff --git a/eventex/core/templates/nav.html b/eventex/core/templates/nav.html new file mode 100644 index 0000000..9ec3ccc --- /dev/null +++ b/eventex/core/templates/nav.html @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/eventex/core/tests/test_view_home.py b/eventex/core/tests/test_view_home.py index b52db3a..620c3e8 100644 --- a/eventex/core/tests/test_view_home.py +++ b/eventex/core/tests/test_view_home.py @@ -23,3 +23,20 @@ def test_template(self): def test_subscription_link(self): expected = f'href="{r("subscriptions:new")}"' self.assertContains(self.response, expected) + + def test_speakers(self): + """Must show keynote speakers""" + contents = [ + 'Grace Hopper', + 'https://www.timeforkids.com/wp-content/uploads/2020/08/Grace_003.jpg?w=926', + 'Alan Turing', + 'https://cdn.britannica.com/81/191581-050-8C0A8CD3/Alan-Turing.jpg', + ] + + for expected in contents: + with self.subTest(): + self.assertContains(self.response, expected) + + def test_speakers_link(self): + expected = 'href="{}#speakers"'.format(r('home')) + self.assertContains(self.response, expected) diff --git a/eventex/core/views.py b/eventex/core/views.py index ff509c5..3873d2d 100644 --- a/eventex/core/views.py +++ b/eventex/core/views.py @@ -2,4 +2,9 @@ def home(request): - return render(request, 'index.html') + speakers = [ + {'name': 'Grace Hopper', 'photo': 'https://www.timeforkids.com/wp-content/uploads/2020/08/Grace_003.jpg?w=926'}, + {'name': 'Alan Turing', 'photo': 'https://cdn.britannica.com/81/191581-050-8C0A8CD3/Alan-Turing.jpg'}, + + ] + return render(request, 'index.html', {'speakers': speakers})