Skip to content

Commit

Permalink
Keynote speakers #103
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuspdf committed May 30, 2024
1 parent a274b68 commit 9b3d36b
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 37 deletions.
9 changes: 9 additions & 0 deletions eventex/core/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
19 changes: 1 addition & 18 deletions eventex/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,7 @@

<body>
<div class="header-frame row">
<header class="header header-inline min-h-3 row desktop-12 container" role="banner">

<div class="site-logo">
<h1><a href="{% url 'home' %}" rel="home">Eventex</h1>
<p class="site-description screen-reader-only">O maior encontro hacker do mundo!</p>
</div>

<nav class="nav-inline" role="navigation">
<a href="javascript:void(0);" class="nav-mobile"><i class="fa fa-bars"></i></a>
<ul>
<li><a data-scroll href="{% url 'home' %}#overview">Conferência</a></li>
<li><a data-scroll href="{% url 'home' %}#sponsors">Patrocinadores</a></li>
<li><a data-scroll href="{% url 'home' %}#register">Inscrição</a></li>
<li><a data-scroll href="{% url 'home' %}#venue">Local</a></li>
</ul>
</nav>

</header>
{% include 'nav.html' only %}
</div>

{% block content %}
Expand Down
31 changes: 13 additions & 18 deletions eventex/core/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,7 @@
<body>

<div class="header-frame header-frame-absolute row">
<header class="header header-inline min-h-3 row desktop-12 container" role="banner">

<div class="site-logo">
<h1><a href="{% url 'home' %}" rel="home">Eventex</a></h1>
<p class="site-description screen-reader-only">O maior encontro hacker do mundo!</p>
</div>

<nav class="nav-inline" role="navigation">
<a href="javascript:void(0);" class="nav-mobile"><i class="fa fa-bars"></i></a>
<ul>
<li><a data-scroll href="#overview">Conferência</a></li>
<li><a data-scroll href="#sponsors">Patrocinadores</a></li>
<li><a data-scroll href="#register">Inscrição</a></li>
<li><a data-scroll href="#venue">Local</a></li>
</ul>
</nav>

</header>
{% include 'nav.html' only%}
</div>

<!-- TOP -->
Expand All @@ -73,6 +56,18 @@ <h2>A Conferência</h2>
</div>
</section>

<section id="speakers">
<div class="speakers text-align-center row desktop-8 padding-bottom-2 container">
<h2>Palestrantes Convidados</h2>
{% for speaker in speakers %}
<div class="desktop-4">
<img src="{{ speaker.photo }}">
<h4>{{ speaker.name }}</h4>
</div>
{% endfor %}
</div>
</section>

<!-- SPONSORS -->
<section id="sponsors">
<div class="sponsors text-align-center row desktop-12 min-h-28 padding-bottom-2 container">
Expand Down
17 changes: 17 additions & 0 deletions eventex/core/templates/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<header class="header header-inline min-h-3 row desktop-12 container" role="banner">
<div class="site-logo">
<h1><a href="{% url 'home' %}" rel="home">Eventex</h1>
<p class="site-description screen-reader-only">O maior encontro hacker do mundo!</p>
</div>

<nav class="nav-inline" role="navigation">
<a href="javascript:void(0);" class="nav-mobile"><i class="fa fa-bars"></i></a>
<ul>
<li><a data-scroll href="{% url 'home' %}#overview">Conferência</a></li>
<li><a data-scroll href="{% url 'home' %}#speakers">Palestrantes</a></li>
<li><a data-scroll href="{% url 'home' %}#sponsors">Patrocinadores</a></li>
<li><a data-scroll href="{% url 'home' %}#register">Inscrição</a></li>
<li><a data-scroll href="{% url 'home' %}#venue">Local</a></li>
</ul>
</nav>
</header>
17 changes: 17 additions & 0 deletions eventex/core/tests/test_view_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 6 additions & 1 deletion eventex/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})

0 comments on commit 9b3d36b

Please sign in to comment.