Skip to content

Commit

Permalink
added color field for projects background in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
wryonik committed Jan 10, 2020
1 parent 8056859 commit e9a62fe
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
list_display = ('title', 'permalink', 'url', 'is_visible',)
list_display = ('title', 'permalink', 'url', 'color', 'is_visible',)
list_filter = ('is_visible',)
search_fields = ('title',)
18 changes: 18 additions & 0 deletions apps/projects/migrations/0002_project_color.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.4 on 2020-01-10 18:50

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='project',
name='color',
field=models.CharField(blank=True, max_length=15),
),
]
1 change: 1 addition & 0 deletions apps/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Project(models.Model):
description = models.CharField(max_length=500)
url = models.URLField(max_length=200)
image = models.ImageField(upload_to='projects')
color = models.CharField(max_length=15, blank=True)
is_visible = models.BooleanField(default=False)

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion apps/projects/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class ProjectSerializer(serializers.ModelSerializer):

class Meta:
model = Project
fields = ('permalink', 'title', 'description', 'url', 'image')
fields = ('permalink', 'title', 'description', 'url', 'image', 'color')
2 changes: 1 addition & 1 deletion frontend/src/components/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="project-wrapper sm:w-5/6 flex flex-col-reverse sm:flex-row justify-center sm:items-center"
>
<div class="mt-20 sm:mt-0 sm:w-4/10 sm:pr-16">
<h2 class="uppercase font-bold text-3xl leading-170 pb-12">
<h2 class="uppercase font-black text-3xl leading-170 pb-12">
{{ title }}
</h2>
<p class="text-1.5xl sm:text-base leading-160">{{ desc }}</p>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Update.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col sm:flex-row mt-16 mb-32">
<div class="sm:w-feed flex flex-col sm:ml-60 mt-16">
<div class="sm:w-feed flex flex-col mt-16">
<div class="font-extrabold text-xl leading-180">
{{ title.toUpperCase() }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
{{ events.event[0].fullDescription }}
</div>
</div>
<div class="flex flex-col" v-if="events.event_update.length != 0">
<div class="mt-40 sm:ml-60 font-extrabold text-lg leading-170">
<div class="flex flex-col border-border border-t-feed sm:ml-60 sm:mr-36" v-if="events.event_update.length != 0">
<div class="mt-40 font-extrabold text-lg leading-170">
{{ events.event_update.length }} Updates
</div>
<div>
Expand Down

0 comments on commit e9a62fe

Please sign in to comment.