From 53c19ab5e5acb916f2c23f366c15fb6eda6882ce Mon Sep 17 00:00:00 2001 From: sarahboyce <sarahvboyce95@gmail.com> Date: Fri, 11 Aug 2023 23:01:50 +0200 Subject: [PATCH 1/2] Added mobile support for Trac. --- scss/trachacks.scss | 38 ++++++++++++++++++++++++++++++++++-- trac-env/templates/site.html | 1 + 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/scss/trachacks.scss b/scss/trachacks.scss index c826f68..0aff315 100644 --- a/scss/trachacks.scss +++ b/scss/trachacks.scss @@ -108,8 +108,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 { @@ -384,3 +396,25 @@ 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; + } +} diff --git a/trac-env/templates/site.html b/trac-env/templates/site.html index a026866..50b6433 100644 --- a/trac-env/templates/site.html +++ b/trac-env/templates/site.html @@ -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. --> From 6e17432ebc34e4242564f3fbef382aa5c1bc82e0 Mon Sep 17 00:00:00 2001 From: sarahboyce <sarahvboyce95@gmail.com> Date: Fri, 11 Aug 2023 23:02:14 +0200 Subject: [PATCH 2/2] Added sponsor banner to Trac. --- scss/trachacks.scss | 51 ++++++++++++++++++++++++++++++++++++ trac-env/templates/site.html | 8 ++++++ 2 files changed, 59 insertions(+) diff --git a/scss/trachacks.scss b/scss/trachacks.scss index 0aff315..8dc521e 100644 --- a/scss/trachacks.scss +++ b/scss/trachacks.scss @@ -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; } @@ -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; + } } diff --git a/trac-env/templates/site.html b/trac-env/templates/site.html index 50b6433..82fbe67 100644 --- a/trac-env/templates/site.html +++ b/trac-env/templates/site.html @@ -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">