Skip to content

Commit

Permalink
Added some social media buttons to the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
frasanz committed Sep 29, 2024
1 parent 7ed5ed3 commit bfe7eed
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 26 deletions.
12 changes: 8 additions & 4 deletions frontend/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ li.completed {

.small-logos {
max-width: 40%; /* Adjust as needed */
margin: 0 auto; /* Center the logos */
margin: 0 auto !important; /* Center the logos */
}
.developed {
color: #333;
Expand Down Expand Up @@ -235,11 +235,15 @@ li.completed {
cursor: grabbing !important;
}
#social-media {

display: flex;
justify-content: center;
margin-left: 20% !important;
margin-right: 20% !important;
margin-top: 0.5em;
text-align: center;
}

.social-media-content{
margin: auto !important;
text-align: center !important;
}
a.social {
text-decoration: none;
Expand Down
73 changes: 51 additions & 22 deletions frontend/templates/gettask.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ <h5 class="modal-title" id="exampleModalLabel"></h5>
...
</div>
<div class="modal-footer">
<button type="button" id="modalClose" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" id="modalClose" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -95,36 +96,64 @@ <h5 class="modal-title" id="exampleModalLabel">Georeferencing!</h5>
<button id="Submit" class="btn btn-primary mb-2 disabled">Submit</button>
<button id="Skip" class="btn btn-primary mb-2">Skip</button>
</div>

<div id="small-logos-container">
<img src="{% static 'img/fundedbyEU.png'%}" alt="EU flag" class="small-logos">
<img src="{% static 'img/plan-b-logo.png'%}" alt="Plan-b logo" class="small-logos" />
</div>
</div>
<div id="social-media">
<!-- Youtube -->
<a href="https://www.youtube.com/watch?v=CrxuuCsPzU4" target="_blank" class="text-dark social">
<i class="fab fa-youtube"></i>
</a>
<!-- Twitter -->
<a href="https://twitter.com/Planb_team" target="_blank" class="text-dark social">
<i class="fa-brands fa-x-twitter"></i>
</a>
<!-- Wordpress -->
<a href="https://plan-b-project.eu" target="_blank" class="text-dark social">
<i class="fa-brands fa-wordpress-simple"></i>
</a>
<!-- Linkdin -->
<a href="https://www.linkedin.com/company/plan-b-project-eu/" target="_blank" class="text-dark social">
<i class="fa-brands fa-linkedin"></i>
</a>
<div id="social-media row" class="row">
<div class="col-6 social-media-content">
<!-- Twitter lost at night-->
<a href="https://twitter.com/cities4tnight" target="_blank" class="text-dark social">
<i class="fa-brands fa-x-twitter"></i>
</a>
<!-- Youtube -->
<a href="https://www.youtube.com/watch?v=CrxuuCsPzU4" target="_blank" class="text-dark social">
<i class="fab fa-youtube"></i>
</a>
<!-- Newsletter -->
<a href="https://citiesatnight.us19.list-manage.com/subscribe?u=777a5063c074ee154eaaf851e&id=036e3689d9"
target="_blank" class="text-dark social">
<i class="fa-solid fa-envelope"></i>
</a>
<br />
<span class="small">Cities at Night</span>
</div>

<div class="col-6 social-media-content">
<!-- Twitter -->
<a href="https://twitter.com/Planb_team" target="_blank" class="text-dark social">
<i class="fa-brands fa-x-twitter"></i>
</a>
<!-- Wordpress -->
<a href="https://plan-b-project.eu" target="_blank" class="text-dark social">
<i class="fa-brands fa-wordpress-simple"></i>
</a>
<!-- Linkdin -->
<a href="https://www.linkedin.com/company/plan-b-project-eu/" target="_blank"
class="text-dark social">
<i class="fa-brands fa-linkedin"></i>
</a>
<br />
<span class="small">Plan-B project</span>
</div>
<div class="col-12 text-center">
<a href="https://github.com/Ibercivis/gdalface" target="_blank" class="developed">Developed by
<b>Ibercivis</b>
</a>

</div>

</div>
<a href="https://ibercivis.es" target="_blank" class="developed">Developed by <b>Ibercivis</b></a>

</div>

</div>



</div>
<div>
</body>

</html>
</html>
41 changes: 41 additions & 0 deletions georeferencing/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ class Meta:
read_only_fields = ['created']

class GeoAttemptSerializer(serializers.ModelSerializer):
"""
GeoAttemptSerializer is a Django REST framework serializer for the GeoAttempt model.
It serializes the following fields: 'id', 'created', 'image', 'image_name',
'photo_center_by_machine_learning', 'status', 'hash', 'skipped', 'controlPoints',
'photo_taken', and 'focal_length'. The 'created' and 'hash' fields are read-only.
Attributes:
image_name (str): The name of the image associated with the GeoAttempt.
photo_center_by_machine_learning (str): The photo center determined by machine learning.
photo_taken (datetime): The date and time when the photo was taken.
focal_length (float): The focal length of the camera used to take the photo.
Methods:
get_image_name(obj): Returns the name of the image associated with the GeoAttempt.
get_photo_center_by_machine_learning(obj): Returns the photo center determined by machine learning.
get_photo_taken(obj): Returns the date and time when the photo was taken.
get_focal_length(obj): Returns the focal length of the camera used to take the photo.
"""
image_name = serializers.SerializerMethodField()
photo_center_by_machine_learning = serializers.SerializerMethodField()
photo_taken = serializers.SerializerMethodField()
Expand Down Expand Up @@ -41,12 +57,37 @@ def get_focal_length(self, obj):
return obj.image.focalLength

class MiniGeoAttemptSerializer(serializers.ModelSerializer):
"""
Serializer for the GeoAttempt model, providing a minimal set of fields.
This serializer includes the following fields:
- id: The unique identifier for the GeoAttempt instance.
- created: The timestamp when the GeoAttempt instance was created. This field is read-only.
- image: The image associated with the GeoAttempt instance.
- status: The current status of the GeoAttempt instance.
Meta:
model: The model class that this serializer is based on (GeoAttempt).
fields: The list of fields to include in the serialized representation.
read_only_fields: The list of fields that should be read-only.
"""
class Meta:
model = GeoAttempt
fields = ['id', 'created', 'image', 'status']
read_only_fields = ['created']

class ImageSerializer(serializers.ModelSerializer):
"""
Serializer for the Image model.
This serializer converts Image model instances into JSON format and vice versa.
It includes all fields of the Image model.
Attributes:
Meta (class): A nested class that defines the metadata options for the serializer.
model (Image): The model that this serializer is associated with.
fields (str): Specifies that all fields of the model should be included in the serialization.
"""
class Meta:
model = Image
fields = '__all__'

0 comments on commit bfe7eed

Please sign in to comment.