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; padding: 0;
} }
.blog__post-item{ .blog__post-item {
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,44 +1,53 @@
{% 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" %}
<body> <body>
<div class="container"> <div class="container">
<header> <header>
<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 %} {% for page in section.pages %}
{% block content %} <article class="post">
{% for page in section.pages %} <img
<article class="post"> class="header-img"
<img class="header-img" height="300px" width="300px" src="/logo.png" alt="Gitea Open Letter logo"> height="300px"
<div class="content"> width="300px"
{{ page.content | safe }} src="/logo.png"
</div> alt="Gitea Open Letter logo"
</article> />
{% endfor %} <p class="banner">
{% endblock content %} 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>
</main> </article>
{% endfor %} {% endblock content %}
</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>