-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a homepage for the resources hub
- Loading branch information
Showing
16 changed files
with
613 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from django.contrib.flatpages.models import FlatPage | ||
from django.shortcuts import render | ||
from django.utils.translation import gettext_lazy as _ | ||
from styles.models import Style | ||
from geopackages.models import Geopackage | ||
from layerdefinitions.models import LayerDefinition | ||
from wavefronts.models import Wavefront | ||
from models.models import Model | ||
|
||
|
||
|
||
def homepage(request): | ||
""" | ||
Renders the home page | ||
""" | ||
latest_styles = Style.objects.filter(approved=True).order_by("-upload_date")[:3] | ||
latest_geopackages = Geopackage.objects.filter(approved=True).order_by("-upload_date")[:3] | ||
latest_layerdefinitions = LayerDefinition.objects.filter(approved=True).order_by("-upload_date")[:3] | ||
latest_wavefronts = Wavefront.objects.filter(approved=True).order_by("-upload_date")[:3] | ||
latest_models = Model.objects.filter(approved=True).order_by("-upload_date")[:3] | ||
|
||
return render( | ||
request, | ||
"flatpages/homepage.html", | ||
{ | ||
"latest_styles": latest_styles, | ||
"latest_geopackages": latest_geopackages, | ||
"latest_layerdefinitions": latest_layerdefinitions, | ||
"latest_wavefronts": latest_wavefronts, | ||
"latest_models": latest_models, | ||
"title": "QGIS resources hub web portal" | ||
}, | ||
) |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
@import "hero" | ||
@import "section" | ||
@import "footer" | ||
@import "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,297 @@ | ||
.news-text | ||
padding-right: 3em | ||
font-size: 14px | ||
padding-top: 0.3em | ||
padding-bottom: 0.3em | ||
letter-spacing: 1px | ||
font-weight: 500 | ||
|
||
.img-grid-1-columns-0 | ||
.img-grid-1-column-0 | ||
display: flex | ||
justify-content: flex-end | ||
align-items: end | ||
padding-right: 0 | ||
img | ||
height: 80% | ||
.img-grid-1-column-1 | ||
align-items: end | ||
display: flex | ||
|
||
.img-grid-1-columns-1 | ||
margin-top: -1.5em | ||
padding-right: 50px | ||
.img-grid-1-column-2 | ||
display: flex | ||
justify-content: flex-end | ||
padding-right: 0 | ||
img | ||
height: 60% | ||
|
||
.box-section-footer | ||
.gradient-row | ||
margin-top: -1em | ||
|
||
.mkdown | ||
strong, h1, h2, h3 | ||
color: inherit | ||
li | ||
margin: 20px 0 | ||
|
||
.bottom-bar | ||
border-bottom: 1.5em solid $complementary2 | ||
|
||
.pb-7 | ||
padding-bottom: 4rem !important | ||
|
||
.feature | ||
position: relative | ||
padding: 5% | ||
margin-top: 5rem | ||
margin-bottom: 5rem | ||
p:not(.has-text-weight-bold) | ||
color: #4D6370 | ||
|
||
.deco-arrow | ||
&:before | ||
position: absolute | ||
width: 34px | ||
content: url("../../images/gis-arrow.svg") | ||
margin-top: -30px | ||
margin-left: -30px | ||
|
||
+until-tablet | ||
display: none | ||
|
||
.add-text | ||
padding-top: 3rem | ||
font-size: 1.125rem | ||
.empty | ||
+until-fullhd | ||
display: none | ||
|
||
+touch | ||
padding-top: 0rem | ||
.col-text | ||
display: none | ||
|
||
+until-tablet | ||
flex-direction: column | ||
padding-top: 0 | ||
|
||
@for $i from 1 through 4 | ||
.left-deco-#{$i}:before | ||
position: absolute | ||
top: 0 | ||
left: 0 | ||
margin-left: if($i % 2 == 0, -210px, -110px) | ||
margin-top: if($i % 2 == 0, 0, 4rem) | ||
width: if($i % 2 == 0, 170px, 70px) | ||
height: if($i % 2 == 0, 100%, 40%) | ||
content: "" | ||
background: repeat-y fixed | ||
background-image: url("../../images/blue_green_bg.svg") | ||
background-color: nth($primary3 $primary2 $primary5 $primary1, $i) | ||
|
||
+until-fullhd | ||
display: none | ||
|
||
+touch | ||
.main-cols | ||
flex-direction: column | ||
.main-image | ||
order: 1 | ||
width: 100% | ||
.main-text | ||
order: 2 | ||
width: 100% | ||
|
||
.deco-block-#{$i} | ||
img | ||
position: relative | ||
z-index: 2 | ||
border-radius: 20px | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) | ||
|
||
+touch | ||
width: 100% | ||
|
||
&:after | ||
position: absolute | ||
width: 330px | ||
margin-left: -240px | ||
top: if($i % 2 == 0, 30%, 0) | ||
height: if($i % 2 == 0, 40%, 100%) | ||
content: "" | ||
z-index: 1 | ||
background: repeat fixed | ||
background-image: url("../../images/blue_green_bg.svg") | ||
background-color: nth($primary3 $primary2 $primary5 $primary1, $i) | ||
|
||
+until-fullhd | ||
margin-left: 0 | ||
top: 0 | ||
right: 0 | ||
height: 40% | ||
|
||
+touch | ||
@if $i % 2 == 1 | ||
left: 0 | ||
@else | ||
right: 0 | ||
|
||
+until-tablet | ||
width: 60% | ||
height: 20% | ||
|
||
// .explore | ||
// +until-fullhd | ||
// max-width: none | ||
// align-items: center | ||
// position: relative | ||
// p | ||
// color: #4D6370 | ||
// .photo | ||
// padding: 0 | ||
// +touch | ||
// display: none | ||
// &:after | ||
// z-index: 1 | ||
// position: absolute | ||
// width: 50% | ||
// height: 50% | ||
// top: 0 | ||
// left: 0 | ||
// content: "" | ||
// background: #fff | ||
// +until-fullhd | ||
// display: none | ||
// +touch | ||
// display: unset | ||
// width: 100% | ||
// height: 40% | ||
// background-image: url("../../images/community-wide.png") | ||
// background-position: center | ||
// &.container | ||
// background: repeat fixed | ||
// background-image: url("../../images/community.svg") | ||
// background-color: $primary4 | ||
// padding: 4rem | ||
// display: flex | ||
// flex-direction: column | ||
// +until-tablet | ||
// padding: 2rem | ||
// .columns | ||
// z-index: 2 | ||
// background-color: #fff | ||
// border-radius: 20px | ||
// overflow: hidden | ||
// +until-fullhd | ||
// border-radius: 10px | ||
// max-width: 960px | ||
// +touch | ||
// margin-top: 30% | ||
// img | ||
// object-fit: cover | ||
// object-position: left | ||
// height: 100% | ||
// figure | ||
// height: 100% | ||
// li | ||
// margin-top: 24px | ||
// margin-bottom: 24px | ||
// .text | ||
// padding: 4rem | ||
// margin: auto 0 | ||
// .button | ||
// background-color: #F1903B | ||
// color: #fff | ||
.arrow-ul | ||
margin-left: 44px | ||
list-style-position: outside | ||
list-style-image: url("../../images/gis-arrow.svg") | ||
|
||
#light-blue-block | ||
margin-top: 7rem | ||
background-attachment: fixed | ||
background-image: url("../../images/light_blue_bg.svg") | ||
background-color: #ECF1F4 | ||
padding-top: 7rem | ||
padding-bottom: 13rem | ||
p:not(.has-text-weight-bold) | ||
color: #4D6370 | ||
+until-fullhd | ||
margin: 0 | ||
|
||
+until-tablet | ||
padding: 1rem | ||
|
||
.content | ||
+until-fullhd | ||
max-width: 960px | ||
padding: 16px | ||
|
||
.grayscale | ||
filter: grayscale(100%) | ||
|
||
.mobile-bg | ||
+until-tablet | ||
background: #fff !important | ||
border-radius: 10px !important | ||
padding: 5% | ||
|
||
#start-using-qgis | ||
padding: 5rem | ||
+until-tablet | ||
background-image: url("../../images/light_blue_bg.svg") | ||
background-color: #ECF1F4 | ||
padding: 1rem | ||
|
||
.container | ||
padding: 4rem | ||
background-color: #fff | ||
border-radius: 30px | ||
margin-top: -12rem | ||
+until-fullhd | ||
flex-direction: column | ||
background: none | ||
margin-top: -17rem | ||
+until-tablet | ||
margin-top: 0 | ||
padding: 0rem | ||
|
||
|
||
.youtube | ||
border-radius: 20px | ||
width: 560px | ||
height: 315px | ||
background-size: cover | ||
background-position: center center | ||
position: relative | ||
cursor: pointer | ||
overflow: hidden | ||
|
||
+until-fullhd | ||
height: 400px | ||
width: 100% | ||
|
||
// .play-button | ||
// width: 85px | ||
// height: 60px | ||
// background: url('../../images/youtube.svg') no-repeat | ||
// background-size: cover | ||
// position: absolute | ||
// top: 50% | ||
// left: 50% | ||
// transform: translate(-50%, -50%) | ||
.is-vertical | ||
+until-fullhd | ||
order: 2 | ||
align-items: center | ||
.video | ||
+until-fullhd | ||
order: 1 | ||
li | ||
padding-top: 0.4rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,9 +228,6 @@ p { | |
border: none; | ||
} | ||
} | ||
.container { | ||
max-width: unset; | ||
} | ||
} | ||
|
||
a.is-active > span { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.