Skip to content

Commit

Permalink
Added sponsor banner to Trac.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahboyce committed Aug 22, 2023
1 parent 53c19ab commit 6e17432
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
51 changes: 51 additions & 0 deletions scss/trachacks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,46 @@ h1, h2, h3, h4, h5, h6, span {
}
}

// Sponsorship banner
div.sub-banner {
font-family: Arial, Verdana, sans-serif;
padding: 1px 10px;
display: flex;
flex-direction: row;
border-bottom: 2px;
border-color: $gray-line;
}
p.sub-banner-content {
width: 70%;
padding-right: 1em;
}
div.sub-banner-cta {
display: flex;
align-items: center;
border-radius: 0.3em;

a {
border: 1px solid $green-medium;
padding: 0.7em 1em;
font-size: 16px;
font-weight: normal;
border-radius: 0.3em;

i {
color: $red-medium;
}

&:hover,
&:focus,
&:active {
border: 1px solid $green-dark;
color: $green-dark;
outline: none;
background: $green-very-light;
}
}
}

div.trac-content {
border: 0;
}
Expand Down Expand Up @@ -417,4 +457,15 @@ div[role="main"]{
min-width: inherit;
overflow: scroll;
}
// Sponsorship banner
div.sub-banner {
display: block;
}
p.sub-banner-content {
width: 100%;
padding-right: 0;
}
div.sub-banner-cta {
padding-bottom: 10px;
}
}
8 changes: 8 additions & 0 deletions trac-env/templates/site.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ <h3>Useful links</h3>
</div>
</py:if>
<py:if test="req.environ['PATH_INFO'] != '/'">
<div class="sub-banner container">
<p class="sub-banner-content">Donate to support Django’s ongoing development!</p>
<div class="sub-banner-cta">
<a class="btn btn-lg btn-primary" href="https://www.djangoproject.com/fundraising/">
<i class="icon icon-heart"></i> Donate
</a>
</div>
</div>
<div class="container full-width">
<div role="main">
<py:if test="req.authname != 'anonymous' and not req.session.email">
Expand Down

0 comments on commit 6e17432

Please sign in to comment.