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

@ -510,7 +510,31 @@ ul.language-select > li {
padding: 0;
}
.blog__post-item{
.blog__post-item {
list-style: none;
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,44 +1,53 @@
{% set description = "The Gitea Community is asking Gitea Owners to correct conflicts of interest and restore Community Trust." %}
{% set headline = "Restoring Trust in the Gitea Project" %}
{% set title = "Open Letter to Gitea" %}
{% set description = "The Gitea Community is asking Gitea Owners to correct
conflicts of interest and restore Community Trust." %} {% set headline =
"Restoring Trust in the Gitea Project" %} {% set title = "Open Letter to Gitea"
%}
<!DOCTYPE html>
<html lang="{% if lang %}{{ lang }}{% else %}en{% endif %}">
{% include "head.html" %}
<body>
<body>
<div class="container">
<header>
<h1><a href="{{ config.base_url }}">{{ title }}</a></h1>
<div class="nav__spacer"></div>
<nav>
{% block sidebar_nav %}
{% for menu_link in config.extra.anpu_menu_links %}
{% set link_url = menu_link.url | replace(from="$BASE_URL", to=config.base_url) %}
<a class="nav__link" href="{{ link_url }}">{{menu_link.name}}</a>
{% endfor %}
{% endblock sidebar_nav %}
</nav>
</header>
<main id="main" tabindex="-1">
{% block content %}
{% for page in section.pages %}
<article class="post">
<img class="header-img" height="300px" width="300px" src="/logo.png" alt="Gitea Open Letter logo">
<div class="content">
{{ page.content | safe }}
</div>
</article>
{% endfor %}
{% endblock content %}
<header>
<h1><a href="{{ config.base_url }}">{{ title }}</a></h1>
<div class="nav__spacer"></div>
<nav>
{% block sidebar_nav %} {% for menu_link in
config.extra.anpu_menu_links %} {% set link_url = menu_link.url |
replace(from="$BASE_URL", to=config.base_url) %}
<a class="nav__link" href="{{ link_url }}">{{menu_link.name}}</a>
{% endfor %} {% endblock sidebar_nav %}
</nav>
</header>
<main id="main" tabindex="-1">
{% block content %} {% for page in section.pages %}
<article class="post">
<img
class="header-img"
height="300px"
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>
</main>
<div class="content">{{ page.content | safe }}</div>
</article>
{% endfor %} {% endblock content %}
</main>
</div>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="updates/atom.xml", trailing_slash=false) }}">
{% include "footer.html" %}
</body>
<!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{
get_url(path="updates/atom.xml", trailing_slash=false) }}"> {% include
"footer.html" %}
</body>
<!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) -->
</html>