Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Add sponsor Django banner to Trac #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 87 additions & 2 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 @@ -108,8 +148,20 @@ pre.wiki {
white-space: pre-wrap;
}

#content.ticket {
width: auto;
#content {
margin-top: 1em;

.ticket {
width: auto;
}

.report-result {
margin-top: 1em;
}

.paging {
margin: 0;
}
}

.foldable {
Expand Down Expand Up @@ -384,3 +436,36 @@ div[role="main"]{
}
}
}

/* Mobile */

@media (max-width: 767px) {
#metanav {
ul {
li {
padding: 1em 0.5em !important;
}
}
}

#filters {
min-width: inherit;
overflow: scroll;
}

div:has(.listing.tickets) {
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;
}
}
9 changes: 9 additions & 0 deletions trac-env/templates/site.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head py:match="head" py:attrs="select('@*')">
${select('*|comment()|text()')}

<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="${href.chrome('site/css/output.css')}" />
<link rel="stylesheet" href="${href.chrome('site/css/trachacks.css')}" />
<!--! uncomment for local version of webfont loader if desired. -->
Expand Down Expand Up @@ -95,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