Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2914642
add CSS cleanup and modifications
skyflaren Sep 19, 2020
67f2a3d
Merge branch 'master' of https://github.com/KuriusMTL/stratus
skyflaren Sep 19, 2020
47579d8
cleanup/organize/change CSS
skyflaren Sep 19, 2020
0db3d33
change Stratus to HackItForward
skyflaren Sep 19, 2020
96f7544
Merge branch 'master' of https://github.com/KuriusMTL/stratus into CS…
skyflaren Sep 19, 2020
b1e0437
Add additional CSS cleanup, reorder links in base.html
skyflaren Sep 19, 2020
52bb659
Add an extra newline at the end of each file
skyflaren Sep 19, 2020
55c21ef
save for merge
aavaSapkota Sep 20, 2020
d251ee3
merge fixes
aavaSapkota Sep 20, 2020
a823428
attempt to resolve issues
skyflaren Sep 20, 2020
44fabf1
Merge branch 'master' into CSS-cleanup
skyflaren Sep 20, 2020
01c5474
merge fixes
aavaSapkota Sep 20, 2020
330c3d6
Fix merge conflict
skyflaren Sep 22, 2020
73ff119
Small fixes to the merging, remove !important tags due to having swap…
skyflaren Sep 22, 2020
48756a7
Remove app/migrations/0014
skyflaren Sep 22, 2020
5a68ea1
Change Hack It Forward to HackItForward on explore.html, remove app/m…
skyflaren Sep 22, 2020
ef9629a
Remove duplicate icon link in base.html, shorten size of logo from 60…
skyflaren Sep 22, 2020
23f1756
merge fixes
aavaSapkota Sep 23, 2020
bd27d66
merge-conflicts
aavaSapkota Sep 23, 2020
eeb4c2f
Merge branch 'master' of https://github.com/KuriusMTL/stratus into CS…
aavaSapkota Sep 23, 2020
54f5ec3
Merge branch 'master' of https://github.com/KuriusMTL/stratus into CS…
aavaSapkota Sep 24, 2020
778ed33
Merge branch 'master' of https://github.com/KuriusMTL/stratus into CS…
aavaSapkota Sep 25, 2020
fbc51dc
Edit-profile map removed
aavaSapkota Sep 27, 2020
85847cd
country and city fields added for Profile
aavaSapkota Sep 27, 2020
8565f71
oneliner displays added
aavaSapkota Sep 30, 2020
0a5cdb9
remove map from front-end
aavaSapkota Oct 1, 2020
a6975c6
remove map from front-end 2
aavaSapkota Oct 1, 2020
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
2 changes: 1 addition & 1 deletion app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ProfileUpdateForm(ModelForm):
class Meta:
model = Profile
fields = ["description", "tags"]
fields = ["description", "tags", "country", "city"]
hidden_fields = ["longitude", "latitude"]

def __init__(self, *args, **kwargs):
Expand Down
23 changes: 23 additions & 0 deletions app/migrations/0014_auto_20200927_1620.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.1 on 2020-09-27 20:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('app', '0013_auto_20200919_0144'),
]

operations = [
migrations.AddField(
model_name='profile',
name='city',
field=models.CharField(blank=True, help_text='City of origin of user', max_length=30, null=True, verbose_name='city'),
),
migrations.AddField(
model_name='profile',
name='country',
field=models.CharField(blank=True, help_text='Country of origin of user', max_length=30, null=True, verbose_name='country'),
),
]
3 changes: 2 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class Profile(models.Model):
description = models.TextField(
blank=True, verbose_name="Description", help_text="User description."
)
country = models.CharField(blank=True, null=True, max_length=30, verbose_name="country", help_text="Country of origin of user")
city = models.CharField(blank=True, null=True,max_length=30, verbose_name="city", help_text="City of origin of user")
badges = models.ManyToManyField(
Badge,
blank=True,
Expand All @@ -109,7 +111,6 @@ def username(self):
def __str__(self):
return self.user.username


class Challenge(models.Model):
name = models.CharField(
max_length=100, verbose_name="Name", help_text="Name of this challenge."
Expand Down
16 changes: 15 additions & 1 deletion app/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,22 @@ footer {
justify-items: center;
}

#geocoder {
position: relative;
z-index: 1;
width: 50%;
left: 50%;
margin-left: -25%;
top: 10px;
}

.mapboxgl-ctrl-geocoder {
min-width: 100%;
margin-left:10%;
}

#map {
height: 50vh;
margin-top: 75px;
}

.form-section > label {
Expand Down
23 changes: 0 additions & 23 deletions app/static/js/map.js

This file was deleted.

6 changes: 6 additions & 0 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<script src="https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.css" rel="stylesheet" />

<script src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.5.1/mapbox-gl-geocoder.min.js"></script>
<link rel="stylesheet"href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.5.1/mapbox-gl-geocoder.css"type="text/css"/>
<!-- Promise polyfill script required to use Mapbox GL Geocoder in IE 11 -->
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>

{% block head %}
{% endblock %}

Expand Down
6 changes: 3 additions & 3 deletions app/templates/challenge.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<h3>Heat map</h3>
<p>Contributions by region</p>

<div class="map-container frame w-100 h-50" id="challenge-frame">
<!-- <div class="map-container frame w-100 h-50" id="challenge-frame">
<div id="map"></div>
<script src="{{ static('js/heatmap.js') }}"></script>
</div>
<br>
<br> -->

<br>
<h3>Projects posted to this challenge</h3>
Expand All @@ -43,7 +43,7 @@ <h3>Projects posted to this challenge</h3>
</div>
</div>
<div class="card-body content">
<p>{{ project.description|truncatechars(80) }}</p>
<p>{{ project.one_liner|truncatechars(80) }}</p>
</div>
<div class="card-footer content">
{% for tag in project.tags.all()[:3] %}
Expand Down
15 changes: 10 additions & 5 deletions app/templates/edit_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,25 @@
<span class="text-primary info">{{ error }}</span>
{% endfor %}
</div>
<div class="form-section">
<!-- <div class="form-section">
<label>Where are you from?</label>
<p>Click and drag the marker. </p>
<div class="map-container w-100 h-50">
<div id="map">Map should be here</div>
<small>Country:</small>
<div class="input-control">
{{ form.country }}
</div>
<small>City:</small>
<div class="input-control">
{{ form.city }}
</div>
</div>
</div>
</div> -->
<br>
<input type="submit" class="btn-primary u-pull-right animated" value="Save all">
</div>
</form>
</div>
</div>
<script src="{{ static('js/map.js') }}"></script>
<script>
var simplemde = new SimpleMDE({ element: document.getElementById("id_description") });
</script>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h1 class="header-margin">{{ name|title }}s</h1>
</div>
</div>
<div class="card-body content">
<p>{{ object.description|truncatechars(48) }}</p>
<p>{{ object.one_liner|truncatechars(48) }}</p>
</div>
<div class="card-footer content">
{% for tag in object.tags.all()[:3] %}
Expand Down