feat: add subscription banner in homepage

This commit is contained in:
Aravinth Manivannan 2022-10-30 15:46:27 +05:30 committed by Gitea
parent c229600c33
commit af07d636bf
2 changed files with 69 additions and 36 deletions

View file

@ -514,3 +514,27 @@ ul.language-select > li {
list-style: none; list-style: none;
background-attachment: yellow; background-attachment: yellow;
} }
.banner {
background: #609926;
color: #fff;
padding: 10px;
text-align: center;
}
.banner > a:hover {
text-decoration: none;
}
.banner__btn {
border: none;
background: white;
color: #609926;
border-radius: 2px;
font-size: 18px;
}
.banner__btn:hover {
cursor: pointer;
background: lightgrey;
}

View file

@ -1,6 +1,7 @@
{% set description = "The Gitea Community is asking Gitea Owners to correct conflicts of interest and restore Community Trust." %} {% set description = "The Gitea Community is asking Gitea Owners to correct
{% set headline = "Restoring Trust in the Gitea Project" %} conflicts of interest and restore Community Trust." %} {% set headline =
{% set title = "Open Letter to Gitea" %} "Restoring Trust in the Gitea Project" %} {% set title = "Open Letter to Gitea"
%}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{% if lang %}{{ lang }}{% else %}en{% endif %}"> <html lang="{% if lang %}{{ lang }}{% else %}en{% endif %}">
{% include "head.html" %} {% include "head.html" %}
@ -11,34 +12,42 @@
<h1><a href="{{ config.base_url }}">{{ title }}</a></h1> <h1><a href="{{ config.base_url }}">{{ title }}</a></h1>
<div class="nav__spacer"></div> <div class="nav__spacer"></div>
<nav> <nav>
{% block sidebar_nav %} {% block sidebar_nav %} {% for menu_link in
{% for menu_link in config.extra.anpu_menu_links %} config.extra.anpu_menu_links %} {% set link_url = menu_link.url |
{% set link_url = menu_link.url | replace(from="$BASE_URL", to=config.base_url) %} replace(from="$BASE_URL", to=config.base_url) %}
<a class="nav__link" href="{{ link_url }}">{{menu_link.name}}</a> <a class="nav__link" href="{{ link_url }}">{{menu_link.name}}</a>
{% endfor %} {% endfor %} {% endblock sidebar_nav %}
{% endblock sidebar_nav %}
</nav> </nav>
</header> </header>
<main id="main" tabindex="-1"> <main id="main" tabindex="-1">
{% block content %} {% block content %} {% for page in section.pages %}
{% for page in section.pages %}
<article class="post"> <article class="post">
<img class="header-img" height="300px" width="300px" src="/logo.png" alt="Gitea Open Letter logo"> <img
<div class="content"> class="header-img"
{{ page.content | safe }} height="300px"
</div> width="300px"
src="/logo.png"
alt="Gitea Open Letter logo"
/>
<p class="banner">
Click
<a
href="{{ get_url(path='updates/atom.xml', trailing_slash=false) }}"
><button class="banner__btn" >here</button>
</a
>
to subscribe for daily updates!
</p>
<div class="content">{{ page.content | safe }}</div>
</article> </article>
{% endfor %} {% endfor %} {% endblock content %}
{% endblock content %}
</main> </main>
</div> </div>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="updates/atom.xml", trailing_slash=false) }}"> get_url(path="updates/atom.xml", trailing_slash=false) }}"> {% include
"footer.html" %}
{% include "footer.html" %}
</body> </body>
<!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) --> <!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) -->
</html> </html>