Skip to content

Instantly share code, notes, and snippets.

@mebaysan
Created November 11, 2024 15:53
Show Gist options
  • Save mebaysan/3941494003ee15fd57622460d6c7c437 to your computer and use it in GitHub Desktop.
Save mebaysan/3941494003ee15fd57622460d6c7c437 to your computer and use it in GitHub Desktop.
Board Members UI | Django implementation
.board-of-directors h4 {
text-align: center;
color: #1f4d6a;
}
.board-of-directors .bd-items {
position: relative;
}
.board-of-directors .bd-items::before {
content: "";
position: absolute;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
width: 2px;
background: #ccc;
height: 100%;
top: 0;
}
.board-of-directors .bd-items .title {
font-size: 36px;
color: #000;
text-align: center;
background: #fff;
position: relative;
z-index: 1;
margin-bottom: 50px;
}
.board-of-directors .bd-items .items {
background: #fff;
position: relative;
z-index: 1;
margin-bottom: 50px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
border-top: 2px solid #ccc;
overflow: hidden;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.board-of-directors .bd-items .items .item {
max-width: 300px;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
background-color: #f7f7f7;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin: 40px 15px 0;
position: relative;
}
.board-of-directors .bd-items .items .item::before {
content: "";
position: absolute;
height: 40px;
width: 2px;
top: -40px;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
z-index: 3;
background-color: #ccc;
}
.board-of-directors .bd-items .items .item .image img {
width: 100px;
height: 100px;
-o-object-fit: cover;
object-fit: cover;
}
.board-of-directors .bd-items .items .item .content {
text-align: center;
width: 100%;
}
.board-of-directors .bd-items .items .item .content h5 {
font-size: 20px;
color: #1f4d6a;
}
.board-of-directors .bd-items .items .item .content strong {
font-size: 16px;
}
.board-of-directors .bd-items .items.first {
border-top: none;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.board-of-directors .bd-items .items.first .item {
max-width: 500px;
width: 100%;
}
.board-of-directors .bd-items .items.first .item .image img {
width: 140px;
height: 140px;
}
.board-of-directors .bd-items .items.first .item .content {
text-align: center;
width: 100%;
}
.board-of-directors .bd-items .items.first .item .content h5 {
font-size: 30px;
color: #1f4d6a;
}
.board-of-directors .bd-items .items.first .item .content strong {
font-size: 18px;
}
<div class="board-of-directors">
<h4>İhya Vakfı</h4>
<div class="bd-items">
<div class="first title">{{ baskan.isim }}</div>
<div class="items first">
{% for uye in baskan.uyeler.all %}
<div class="item">
<div class="image"><img src="{{ uye.resim.url }}" alt=""/></div>
<div class="content">
<h5>{{ uye.isim }}</h5>
{% if uye.sifat %}
<strong>{{ uye.sifat }}</strong>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% for grup in gruplar %}
<div class="title">{{ grup.isim }}</div>
<div class="items">
{% for uye in grup.uyeler.all %}
<div class="item">
<div class="image"><img src="{{ uye.resim.url }}" alt=""/></div>
<div class="content">
<h5>{{ uye.isim }}</h5>
{% if uye.sifat %}
<strong>{{ uye.sifat }}</strong>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
def yonetim_kurulu(request):
baskan = YonetimGrup.objects.get(numara="1")
gruplar = YonetimGrup.objects.exclude(numara="1").order_by("numara")
context = {"baskan": baskan, "gruplar": gruplar}
return render(request, "web/yonetim_kurulumuz.html", context=context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment