Update link component
This commit is contained in:
@ -6,6 +6,9 @@
|
||||
{% if page %}
|
||||
<input type="hidden" name="page" value="{{ page }}">
|
||||
{% endif %}
|
||||
{% if id %}
|
||||
<input type="hidden" name="id" value="{{ id }}">
|
||||
{% endif %}
|
||||
{# Button #}
|
||||
<button class="link__button" type="button" hx-ws="send" hx-trigger="click">{{ text }}</button>
|
||||
<a class="link__button" type="button" hx-ws="send" hx-trigger="click">{{ children }}</a>
|
||||
</form>
|
@ -30,15 +30,15 @@
|
||||
<ul>
|
||||
<li>
|
||||
{# To page Talks #}
|
||||
{% #link text="Talks" action="page" value="talks" scroll-up="true" %}{% /link %}
|
||||
{% #link action="page" value="talks" scroll-up="true" %}Talks{% /link %}
|
||||
</li>
|
||||
<li>
|
||||
{# To page Profiles #}
|
||||
{% #link text="Profiles" action="page" value="profiles" scroll-up="true" %}{% /link %}
|
||||
{% #link action="page" value="profiles" scroll-up="true" %}Profiles{% /link %}
|
||||
</li>
|
||||
<li>
|
||||
{# To page About #}
|
||||
{% #link text="About" action="page" value="about" scroll-up="true" %}{% /link %}
|
||||
{% #link action="page" value="about" scroll-up="true" %}About{% /link %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% load static %}
|
||||
{% load slippers %}
|
||||
<main id="main" data-scroll-to-top="true">
|
||||
{# List Profiles #}
|
||||
<div style="display: flex; flex-wrap: wrap; justify-content: space-between; ">
|
||||
@ -9,14 +10,15 @@
|
||||
{{ profile.full_name }}
|
||||
</h2>
|
||||
<p>
|
||||
{# <img src="{{ profile.avatar.url }}" alt="{{ profile.full_name }}"> #}
|
||||
<img src="{{ profile.avatar.url }}" alt="{{ profile.full_name }}">
|
||||
</p>
|
||||
</header>
|
||||
<h3>Talks</h3>
|
||||
<ul>
|
||||
{% for talk in profile.talkspeaker.all %}
|
||||
<li>
|
||||
{{ talk.title }}
|
||||
|
||||
{% #link action="page" value="single-talk" id=talk.id scroll-up="true" %}{{ talk.title }}{% /link %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -13,6 +13,6 @@
|
||||
<footer>Author {{ talk.author.full_name }} - {{ talk.category.name }}</footer>
|
||||
</article>
|
||||
<p>
|
||||
{% #link text="Back" action="page" value="talks" page=1 %}{% /link %}
|
||||
{% #link action="page" value="talks" page=1 %}More talks{% /link %}
|
||||
</p>
|
||||
</main>
|
@ -23,10 +23,7 @@
|
||||
{% if talks %}
|
||||
{% for talk in talks %}
|
||||
<form>
|
||||
<input type="hidden" name="action" value="page">
|
||||
<input type="hidden" name="value" value="single-talk">
|
||||
<input type="hidden" name="id" value="{{ talk.id }}">
|
||||
<a href="#" hx-ws="send" hx-trigger="click">
|
||||
{% #link action="page" value="single-talk" id=talk.id %}
|
||||
<article>
|
||||
<header>
|
||||
<div class="grid">
|
||||
@ -41,7 +38,7 @@
|
||||
</p>
|
||||
<footer>Author {{ talk.author.full_name }} - {{ talk.category.name }}</footer>
|
||||
</article>
|
||||
</a>
|
||||
{% /link %}
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
Reference in New Issue
Block a user