Skip to content

Commit

Permalink
New certificates section and changes in experience section
Browse files Browse the repository at this point in the history
  • Loading branch information
FredMagas committed Aug 16, 2024
1 parent 11ab278 commit afb87dd
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 11 deletions.
Binary file modified db.sqlite3
Binary file not shown.
7 changes: 5 additions & 2 deletions fredmagaweb/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib import admin
from .models import PortfolioItem, Curriculo
from .models import PortfolioItem, Curriculo, Certificate

def make_unpublished(modeladmin, request, queryset):
queryset.update(publicado=False)
Expand All @@ -14,4 +14,7 @@ class PortfolioItemAdmin(admin.ModelAdmin):
list_display = ('title', 'publicado')

admin.site.register(PortfolioItem, PortfolioItemAdmin)
admin.site.register(Curriculo)
admin.site.register(Curriculo)
@admin.register(Certificate)
class CertificateAdmin(admin.ModelAdmin):
list_display = ('title',)
27 changes: 27 additions & 0 deletions fredmagaweb/migrations/0006_certificate_alter_curriculo_arquivo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.3 on 2024-08-15 20:39

import cloudinary_storage.storage
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('fredmagaweb', '0005_curriculo_alter_contato_empresa_alter_contato_nome'),
]

operations = [
migrations.CreateModel(
name='Certificate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('image', models.ImageField(upload_to='certificates/')),
],
),
migrations.AlterField(
model_name='curriculo',
name='arquivo',
field=models.FileField(storage=cloudinary_storage.storage.RawMediaCloudinaryStorage(), upload_to='curriculos/'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.2.3 on 2024-08-15 21:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('fredmagaweb', '0006_certificate_alter_curriculo_arquivo'),
]

operations = [
migrations.RemoveField(
model_name='certificate',
name='image',
),
migrations.AddField(
model_name='certificate',
name='file',
field=models.FileField(default='', upload_to='certificates/'),
),
migrations.AddField(
model_name='certificate',
name='thumbnail',
field=models.ImageField(blank=True, null=True, upload_to='certificates/thumbnails/'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.3 on 2024-08-15 21:36

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('fredmagaweb', '0007_remove_certificate_image_certificate_file_and_more'),
]

operations = [
migrations.RemoveField(
model_name='certificate',
name='file',
),
migrations.RemoveField(
model_name='certificate',
name='thumbnail',
),
migrations.AddField(
model_name='certificate',
name='image',
field=models.ImageField(default='', upload_to='certificates/'),
),
]
9 changes: 8 additions & 1 deletion fredmagaweb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@ def __str__(self):

class Meta:
verbose_name = "Currículo"
verbose_name_plural = "Currículos"
verbose_name_plural = "Currículos"

class Certificate(models.Model):
title = models.CharField(max_length=255)
image = models.ImageField(upload_to='certificates/', default='')

def __str__(self):
return self.title
62 changes: 58 additions & 4 deletions fredmagaweb/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<link rel="stylesheet" href="{% static 'css/index.css' %}">
<link rel="shortcut icon" href="{% static 'images/favicon.png' %}">
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/owl.carousel.min.css' %}">
<link rel="stylesheet" href="{% static 'css/owl.theme.default.min.css' %}">

</head>
<body>
Expand All @@ -29,6 +31,7 @@ <h1>Frederico Magalhães</h1>
<li><a href="#sobre-mim">Sobre Mim</a></li>
<li><a href="#experiencia">Experiência</a></li>
<li><a href="#soft-skills">Skills</a></li>
<li><a href="#certificados">Certificados</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contato">Contato</a></li>
<li><a href="#links">Links</a></li>
Expand Down Expand Up @@ -98,8 +101,7 @@ <h4>
{% endif %}
</div>
</div>
</section>
<section id="experiencia">

<div class="timeline">
<ul>
<li data-aos="fade-left" data-aos-delay="300">
Expand All @@ -119,11 +121,41 @@ <h4>

<li data-aos="fade-right" data-aos-delay="300">
<div class="data">Até o Momento</div>
<div class="evento">Em busca da minha primeira vaga na área de Tecnologia.</div>
<div class="evento">Em busca da minha primeira vaga na área de Tecnologia e trabalhando como freelancer.</div>
</li>
</ul>
</div>
</section>

<section id="experiencia">
<div class="habilities">
<h2 data-aos="fade-right" data-aos-delay="100">
Experiência:
</h2>

<div class="timeline">
<ul>
<li data-aos="fade-left" data-aos-delay="300">
<div class="data">2023</div>
</li>
<li data-aos="fade-right" data-aos-delay="300">
<div class="data">FY EQUIPAMENTOS</div>
<div class="evento">- Desenvolvimento Site Institucional</div>
</li>
<li data-aos="fade-left" data-aos-delay="300">
<div class="data">2024</div>
</li>
<li data-aos="fade-right" data-aos-delay="300">
<div class="data">FY EQUIPAMENTOS</div>
<div class="evento">- Inicio Desenvolvimento de um software para criação de orçamentos.</div>
</li>
<li data-aos="fade-left" data-aos-delay="300">
<div class="data">ECO TREES</div>
<div class="evento">- Inicio Desenvolvimento de uma plataforma de vendas.</div>
</li>
</ul>
</div>
</section>

<section id="soft-skills">
<div class="habilities">
Expand All @@ -138,6 +170,26 @@ <h4 data-aos="fade-right" data-aos-delay="300">
</div>
</div>
</section>

<section id="certificados">
<div class="certifications">
<div>
<h2 data-aos="fade-right" data-aos-delay="100">
Certificados:
</h2>

<div class="owl-carousel owl-theme">
{% for certificate in certificates %}
<div class="item">
<a href="{{ certificate.image.url }}" target="_blank">
<img src="{{ certificate.image.url }}" alt="{{ certificate.title }}" style="border-radius: 15px;">
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</section>

<section id="portfolio">
<div class="portfolio">
Expand Down Expand Up @@ -289,9 +341,11 @@ <h3>&copy; Frederico Magalhaes. Todos os direitos reservados.</h3>
</div>
</footer>

<script src="{% static 'js/index.js' %}"></script>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<script src="{% static 'assets/owl.carousel.min.js' %}"></script>
<script src="{% static 'js/index.js' %}"></script>
<script>
AOS.init({
once: true,
Expand Down
5 changes: 3 additions & 2 deletions fredmagaweb/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.urls import reverse
from django.core.mail import EmailMessage
from .forms import ContatoForm
from .models import PortfolioItem, Curriculo
from .models import PortfolioItem, Curriculo, Certificate
from django.contrib import messages
from decouple import config
from django.shortcuts import get_object_or_404
Expand All @@ -14,6 +14,7 @@
def index(request):
portfolio_items = PortfolioItem.objects.filter(publicado=True)
curriculo = Curriculo.objects.last() # Obtém o currículo mais recente
certificates = Certificate.objects.all()

curriculo_message = None
if not curriculo:
Expand Down Expand Up @@ -77,7 +78,7 @@ def index(request):
else:
form = ContatoForm()

return render(request, 'index.html', {'portfolio_items': portfolio_items,'curriculo': curriculo, 'form': form, 'curriculo_message': curriculo_message})
return render(request, 'index.html', {'portfolio_items': portfolio_items,'curriculo': curriculo, 'form': form, 'curriculo_message': curriculo_message, 'certificates': certificates})

def download_curriculo(request, curriculo_id):
curriculo = get_object_or_404(Curriculo, id=curriculo_id)
Expand Down
10 changes: 9 additions & 1 deletion static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ul {
margin-right: auto;
box-sizing: border-box;
position: fixed;
z-index: 1;
z-index: 1000;
border-radius: 2vh;
padding: 1vh;
width: 100%;
Expand Down Expand Up @@ -374,6 +374,10 @@ ul ul {
color: white;
}

.certifications {
padding-top: 15vh;
}

.portfolio {
padding-top: 15vh;
}
Expand Down Expand Up @@ -575,6 +579,10 @@ footer {
padding: 4vh;
}

.owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
background: #33db96 !important;
}

/* Responsividade */
@media screen and (max-width: 976px) {
.grid-container {
Expand Down
23 changes: 22 additions & 1 deletion static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,25 @@ function menu() {
x.className = "";
icon.className = "fa-solid fa-bars fa-xl";
}
}
}

$(document).ready(function(){
$(".owl-carousel").owlCarousel({
loop:true,
margin:10,
autoPlay:true,
autoplayTimeout:1000,
autoplayHoverPause:true,
responsive:{
0:{
items:1
},
600:{
items:2
},
1000:{
items:3
}
}
});
});

0 comments on commit afb87dd

Please sign in to comment.