Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ac-4) - made ac-4 leave module responsive #1154

Merged
merged 9 commits into from
Mar 28, 2023
127 changes: 79 additions & 48 deletions FusionIIIT/templates/globals/usercard.html
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
{% load static %}

{% block usercard %}

{% comment %}
TODO: Something!
{% endcomment %}

{% comment %}The Employee Image Card starts here!{% endcomment %}
<div class="ui large fluid raised card"
style="max-width: 320px;">

<style>
.name {
font-size: 24px;
padding: 0.25rem;
}
.dep {
padding: 0.25rem;
}
@media screen and (max-width: 1300px) {
.name {
font-size: 16px;
}
.dep {
font-size: 16px !important;
}
}

@media screen and (max-width: 768px) {
.name{
font-size: 20px;
}
.dep {
font-size: 20px !important;
}
}
</style>

<div class="ui large fluid raised card" style="max-width: 25rem;">
<div class="image">
<img src="{% static 'globals/img/zlatan.jpg' %}">
</div>
Expand All @@ -18,61 +44,66 @@
TODO: Add a If-Else here!
{% endcomment %}
{% if user %}
<div class="ui large header" href="">
{{ user.first_name}}
{{ user.last_name}}
<span class="right floated meta">
{{ user.extrainfo.department.name}}

</span>
<span class="left floated meta">
<div style="display:flex;flex-direction: column;justify-content:space-between;" class="ui large header">
<div class="name">
{{ user.first_name }}
{{ user.last_name }}
</div>

<div class="meta dep">
{{ user.extrainfo.department.name }}
</div>
</div>

<div class="ui large header">
{% if user.extrainfo.user_type == 'student' %}
{{user.extrainfo.student.programme}}
{{ user.extrainfo.student.batch}}
<br/>
Sem - {{user.extrainfo.student.curr_semester_no}}
{{ user.extrainfo.student.programme }}
{{ user.extrainfo.student.batch }}
<br/>
Sem - {{ user.extrainfo.student.curr_semester_no }}
{% endif %}
</span>

</div>
</div>
{% else %}
<div class="ui large header" href="">
{{ request.user.first_name}}
{{ request.user.last_name}}
<span class="right floated meta">
{{ request.user.extrainfo.department.name}}
<span class="right floated meta">
{% if request.user.extrainfo.user_type == 'student' %}
{{request.user.extrainfo.student.programme}}
{{ request.user.extrainfo.student.batch}}
<br/>
Sem - {{request.user.extrainfo.student.curr_semester_no}}
<div style="display:flex;flex-wrap:wrap;justify-content:space-between;" class="ui large header">
<div>
{{ request.user.first_name }}
{{ request.user.last_name }}
</div>

<div class="meta">
{{ request.user.extrainfo.department.name }}
</div>
</div>

<div class="ui large header">
{% if user.extrainfo.user_type == 'student' %}
{{ request.user.extrainfo.student.programme }}
{{ request.user.extrainfo.student.batch }}
<br/>
{% endif %}
</span>
Sem - {{ request.user.extrainfo.student.curr_semester_no }}
{% endif %}
</div>

<span class="right floated meta">
{{user.extrainfo.student.programme}}
{{ user.extrainfo.student.batch}}
{{user.extrainfo.student.curr_semester_no}}
{{ user.extrainfo.student.programme }}
{{ user.extrainfo.student.batch }}
{{ user.extrainfo.student.curr_semester_no }}
</span>
</div>
{% endif %}
<br/>
<div class="meta">
<div class="ui large header">
{% for i in Curr_desig %}
<span> {% comment %}Should this be inside if else?{% endcomment %}
{% if i == "co-ordinator" or i == "co co-ordinator" %}
{{ i }} of {{ club_details }} club
{% else %}
{{ i }}
{% endif %}
</span>
<br>
{% comment %} Should this be inside if else? {% endcomment %}
<span class="meta" style="text-transform: uppercase;">
{% if i == "co-ordinator" or i == "co co-ordinator" %}
{{ i }} of {{ club_details }} club
{% else %}
{{ i }}
{% endif %}
</span>
<br>
{% endfor %}
</div>
</div>
</div>
{% comment %}The Employee Image Card ends here!{% endcomment %}


{% comment %} The Employee Image Card ends here! {% endcomment %}
{% endblock %}
9 changes: 7 additions & 2 deletions FusionIIIT/templates/leaveModule/leave.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ <h4 class="ui dividing header">Please Add a remark</h4>
</div>


<style>
.ui.stackable.doubling.grid {
width: 100%;
}
</style>

{% comment %}The grid starts here!{% endcomment %}
<div class="ui stackable doubling grid">
Expand All @@ -120,7 +125,7 @@ <h4 class="ui dividing header">Please Add a remark</h4>
<div class="column"></div>

{% comment %}The left-rail segment starts here!{% endcomment %}
<div class="three wide column">
<div class="four wide column">

{% comment %}ROW #1 starts here!{% endcomment %}
<div class="row">
Expand Down Expand Up @@ -172,7 +177,7 @@ <h4 class="ui dividing header">Please Add a remark</h4>
{% comment %}The left-rail segment endss here!{% endcomment %}

{% comment %}The central-rail segment starts here!{% endcomment %}
<div class="eight wide column">
<div class="ten wide column">
<div class="row">

{% comment %}The Leave Application Form starts here!{% endcomment %}
Expand Down