diff --git a/takwimu/context_processors.py b/takwimu/context_processors.py index 3a65cfe1..005152fe 100644 --- a/takwimu/context_processors.py +++ b/takwimu/context_processors.py @@ -35,13 +35,9 @@ def takwimu_stories(request): stories_trending = [] try: - if settings.HURUMAP.get('url') != 'https://takwimu.africa': - with open('data/articles.json') as f: - stories = json.load(f) - else: - client = Medium() - stories = client.get_publication_posts('takwimu-africa', - count=20) + client = Medium() + stories = client.get_publication_posts('takwimu-africa', + count=20) stories_latest = stories[0:3] stories_dict = [i.__dict__ for i in stories] diff --git a/takwimu/settings.py b/takwimu/settings.py index bc07a1b0..c130261f 100644 --- a/takwimu/settings.py +++ b/takwimu/settings.py @@ -28,7 +28,7 @@ 'context_processors'] + [ 'takwimu.context_processors.takwimu_countries', 'takwimu.context_processors.takwimu_stories', - 'takwimu.context_processors.sdgs',] + 'takwimu.context_processors.sdgs'] # ------------------------------------------------------------------------------------- # HURUmap / Wazimap Config diff --git a/takwimu/static/css/takwimu.scss b/takwimu/static/css/takwimu.scss index a3336081..b6b18da8 100644 --- a/takwimu/static/css/takwimu.scss +++ b/takwimu/static/css/takwimu.scss @@ -5,13 +5,13 @@ * * NOTE: Please don't make edits here unless super necessary. */ -@import url('https://fonts.googleapis.com/css?family=Montserrat:300,400,600,700,800,900'); +@import url('https://fonts.googleapis.com/css?family=Lora:400,700|Muli:400,700,900'); -$brand-color-primary: #1f6cc6; -$brand-color-primary-alt: #074c9c; -$brand-color-primary-light: #7ab1f2; -$brand-color-secondary: #1e4a7e; -$brand-color-dark-alt: #46648c; +$brand-color-primary: #29a87c; +$brand-color-primary-alt: #4abc70; +$brand-color-primary-light: #f6fbfa; +$brand-color-secondary: #4abc70; +$brand-color-dark-alt: #8ed3a5; $brand-extend-white: #ffffff; $brand-extend-light: #f8f9fa; $brand-extend-jumbotron: #fafafa; @@ -19,17 +19,54 @@ $brand-extend-black: #000000; $brand-extend-muted: #6c757d; $brand-extend-disabled: #ededec; -html, body, h1, h2, h3, h4, h5, h6, p, * { - font-family: 'Montserrat', sans-serif; +html, body, p, * { + font-family: 'Muli', sans-serif; word-break: break-word; + line-height: initial; +} +h1, h2, h3, h4, h5, h6 { + font-family: 'Lora', serif; + line-height: initial; +} +.font-heading { + font-family: 'Lora', serif; +} +.font-paragraph { + font-family: 'Muli', sans-serif; } -img { - max-width: 100%; +p, .rich-text { + font-size: 20px; + line-height: 41px; +} +a, .breadcrumb-item { + font-size: 18px; + line-height: 43px; +} +.line-height-md { + &, a, .breadcrumb-item, p, .rich-text, * { + line-height: 31px; + } +} +.line-height-sm { + &, a, .breadcrumb-item, p, .rich-text, * { + line-height: 22px; + } +} +.line-height-initial { + &, a, .breadcrumb-item, p, .rich-text, * { + line-height: initial; + } +} +.display-1, .display-2, .display-3, .display-4 { + line-height: initial; +} +.anchorjs-link { + font-size: inherit; } -h1, h2, h3, h4, h5, h6 { - font-weight: bold; +img { + max-width: 100%; } @@ -76,6 +113,12 @@ a { .bg-info { background-color: #2da4c7 !important; } +.bg-black { + background-color: #000; +} +.bg-light { + background-color: #f6fbfa; +} // Text Colours .text-primary { color: $brand-color-primary !important; @@ -92,15 +135,13 @@ a { // Button .btn { - border-radius: 24px; + border-radius: 12px; padding: .375rem 1.25rem; max-width: 100%; text-overflow: ellipsis; overflow: hidden; } -.btn-lg { - padding: .5rem 1.5rem; -} + // Button - colours .btn-primary { background-color: $brand-color-primary; @@ -134,17 +175,22 @@ a { } } } +.btn-link { + color: $brand-color-primary-alt; + &:hover { + color: $brand-color-primary; + } +} .nav-pills.nav-pills-alt .nav-link { - color: #929292; + color: #4a4a4a; } .nav-pills.nav-pills-alt .nav-link.active, .nav-pills.nav-pills-alt .show>.nav-link { background-color: transparent; color: $brand-color-primary; border-bottom: 3px $brand-color-primary solid; border-radius: 0; - color: #4a4a4a; - font-weight: 900; + color: $brand-extend-black; } @@ -164,6 +210,28 @@ body { background-color: $brand-color-secondary !important; border-color: $brand-color-secondary !important; } +.leaflet-container a { + font-size: 11px; + line-height: initial; + color: $brand-color-primary; +} +.leaflet-bar a, .leaflet-control-layers-toggle { + font-size: initial; + line-height: initial; +} + +// Profile + +.caption { + font-size: inherit; + line-height: inherit; + margin: 0; padding: 0; + margin-bottom: 15px; + a { + font-size: inherit; + line-height: inherit; + } +} @@ -253,12 +321,13 @@ body { border-bottom: 5px solid transparent; cursor: pointer; text-decoration: none; - .border-left { - border-left: 1px solid rgba(255, 255, 255, 0.25)!important; + &.border-left, .border-left { + border-left: 1px solid rgba(255, 255, 255, 0.3)!important; } &:hover, &.active { background: $brand-color-dark-alt; border-bottom: 5px solid $brand-extend-white; + color: $brand-extend-white !important; + a div { border-left: 1px solid transparent !important; } @@ -267,11 +336,47 @@ body { } } &.active { - background: $brand-color-primary; - border-bottom: 5px solid transparent; + border-bottom: 5px solid $brand-extend-white; } } +// Support Services Button + +.support-services-button:hover { + background-color: $brand-color-primary-alt !important; +} + .support-services-button a:hover { + text-decoration: none !important; + color: $brand-extend-white !important; + } +.support-services-button u { + text-decoration: none; + border-bottom: 2px solid #fff; + display: inline-block; +} + + +// Updates section + +.updates a { + font-weight: bold; + color: $brand-color-primary; + text-decoration: underline; +} + +.updates .col-md-6:hover { + background-color: #e8e8e8;; +} +.updates .col-md-6:hover + .col div { + border-left: 2px dashed transparent!important; +} + +// Country Map SVG +.country-map.svg { + path { + fill: $brand-color-primary; + } +} /* ----------------------------------------- * Main Navbar @@ -297,8 +402,11 @@ body { } .nav-link { white-space: nowrap; + font-size: 18px; svg { margin-left: .255em; + margin-right: .255em; + margin-bottom: -2px; } } @@ -317,7 +425,7 @@ body { position: relative; top: -10px; margin-bottom: -10px; span { - border-bottom: 10px solid $brand-color-primary-alt; + border-bottom: 10px solid $brand-color-primary; border-left: 10px solid transparent; border-right: 10px solid transparent; } @@ -328,7 +436,7 @@ body { display: none; position: absolute; left: 0; width: 100vw; z-index: 3000; - background-color: $brand-color-primary-alt; + background-color: $brand-color-primary; a { color: $brand-extend-light; @@ -368,6 +476,62 @@ body { } +/* ----------------------------------------------- + * PAGE: Homepage + * ----------------------------------------------- */ + +// Carousel + +#carousel-homepage-hero { + line-height: 31px; +} +#carousel-homepage-hero .icon-wrap { + border-radius: 999px; + height: 50px; width: 50px; + text-align: center; + text-align: center; + overflow: hidden; +} + #carousel-homepage-hero .country-flag.svg { + height: 50px; + width: 50px; + opacity: 0.76; + mix-blend-mode: screen; + filter: saturate(0%); + } + #carousel-homepage-hero svg#beta { + padding: 10px; + opacity: 1.0; + filter: none; + mix-blend-mode: normal; + background: #fff; + } + +#carousel-homepage-hero .carousel-item .btn { + background-color: rgba(255, 255, 255, 0.28); +} +#carousel-homepage-hero .carousel-item .btn:hover { + background-color: rgba(255, 255, 255, 0.6); + border-color: transparent; +} +.carousel-indicators li { + position: relative; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 10px; + height: 10px; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + border-radius:10px; + background-color:white; +} +.carousel-indicators .active { + background-color: $brand-color-primary-alt; +} + + /* ----------------------------------------------- * PAGE: Profile Page * ----------------------------------------------- */ @@ -414,20 +578,22 @@ body { .dataindicators-nav { .nav-pills { - background-color: #1f6cc6; + background-color: $brand-color-primary; .nav-link.active, .show > .nav-link { - background-color: transparent; + background-color: rgba($color: $brand-extend-light, $alpha: 0.1); font-weight: bold; } } .nav-link { color: #f0f0f0; + line-height: 2; &:hover { - color: #f0f0f0;; + color: #fff; + background-color: rgba($color: $brand-extend-light, $alpha: 0.1); } .fa-eye { display: none; - margin-left: -2em; + margin-left: -35px; position: absolute; } &[aria-selected=true] .fa-eye { @@ -441,6 +607,7 @@ body { .nav-item { .nav-link { font-size: 14px; + line-height: 2; border-radius: 0; &.active { font-weight: bold; @@ -456,6 +623,11 @@ body { } } +.dataview-entities { + font-size: 80%; + line-height: 2; +} + // Profile Page > Sections List .profile.page .profilesections-list .sections-list { @@ -503,9 +675,9 @@ body { } &:hover,&:focus { - color: $brand-color-secondary; + color: $brand-color-primary; svg { - filter: $brand-color-secondary; /* IE6-9 */ + filter: $brand-color-primary; /* IE6-9 */ -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */ } @@ -615,6 +787,9 @@ body { } + + + // Extra small devices (portrait phones, less than 576px) // No media query for `xs` since this is the default in Bootstrap @@ -658,4 +833,9 @@ body { * during development */ // body { background: grey;} + + // Container fluid max-width: + .container { + max-width: 1249px; + } } diff --git a/takwimu/static/img/bg/africanparliament-detail.jpg b/takwimu/static/img/bg/africanparliament-detail.jpg new file mode 100644 index 00000000..f3b9b74d Binary files /dev/null and b/takwimu/static/img/bg/africanparliament-detail.jpg differ diff --git a/takwimu/static/img/bg/africanparliament-homepage.jpg b/takwimu/static/img/bg/africanparliament-homepage.jpg new file mode 100644 index 00000000..29b9a6d8 Binary files /dev/null and b/takwimu/static/img/bg/africanparliament-homepage.jpg differ diff --git a/takwimu/static/img/bg/globe-icon.jpg b/takwimu/static/img/bg/globe-icon.jpg new file mode 100644 index 00000000..0f9d9eba Binary files /dev/null and b/takwimu/static/img/bg/globe-icon.jpg differ diff --git a/takwimu/static/img/bg/parliament.jpg b/takwimu/static/img/bg/parliament.jpg new file mode 100644 index 00000000..73b11def Binary files /dev/null and b/takwimu/static/img/bg/parliament.jpg differ diff --git a/takwimu/static/img/bg/profile-hero-line.png b/takwimu/static/img/bg/profile-hero-line.png new file mode 100644 index 00000000..db631eeb Binary files /dev/null and b/takwimu/static/img/bg/profile-hero-line.png differ diff --git a/takwimu/static/img/icons/a-chart.png b/takwimu/static/img/icons/a-chart.png new file mode 100644 index 00000000..22cb66ad Binary files /dev/null and b/takwimu/static/img/icons/a-chart.png differ diff --git a/takwimu/static/img/icons/a-chart.svg b/takwimu/static/img/icons/a-chart.svg new file mode 100644 index 00000000..88e0e3a8 --- /dev/null +++ b/takwimu/static/img/icons/a-chart.svg @@ -0,0 +1,5 @@ + diff --git a/takwimu/static/img/icons/a-chart@2x.png b/takwimu/static/img/icons/a-chart@2x.png new file mode 100644 index 00000000..26badc89 Binary files /dev/null and b/takwimu/static/img/icons/a-chart@2x.png differ diff --git a/takwimu/static/img/icons/a-chart@3x.png b/takwimu/static/img/icons/a-chart@3x.png new file mode 100644 index 00000000..82eb6e37 Binary files /dev/null and b/takwimu/static/img/icons/a-chart@3x.png differ diff --git a/takwimu/static/img/icons/file-paragraph.png b/takwimu/static/img/icons/file-paragraph.png new file mode 100644 index 00000000..ad412289 Binary files /dev/null and b/takwimu/static/img/icons/file-paragraph.png differ diff --git a/takwimu/static/img/icons/file-paragraph.svg b/takwimu/static/img/icons/file-paragraph.svg new file mode 100644 index 00000000..30151607 --- /dev/null +++ b/takwimu/static/img/icons/file-paragraph.svg @@ -0,0 +1,6 @@ + diff --git a/takwimu/static/img/icons/file-paragraph@2x.png b/takwimu/static/img/icons/file-paragraph@2x.png new file mode 100644 index 00000000..f3e8a10b Binary files /dev/null and b/takwimu/static/img/icons/file-paragraph@2x.png differ diff --git a/takwimu/static/img/icons/file-paragraph@3x.png b/takwimu/static/img/icons/file-paragraph@3x.png new file mode 100644 index 00000000..caafd02b Binary files /dev/null and b/takwimu/static/img/icons/file-paragraph@3x.png differ diff --git a/takwimu/templates/404.html b/takwimu/templates/404.html index 9baf9c4a..4ae8468d 100644 --- a/takwimu/templates/404.html +++ b/takwimu/templates/404.html @@ -11,8 +11,7 @@
Why not try one of the following instead?
-+
All Takwimu data comes with analysis from our expert team, providing you with the insights you need.
Browse by Map
-The data view on pages shown by navigating with this map are still work in progress. Please treat them as a sneak peak of what to expect in future releases. We'd though still want your feedback on them though.
- -