Skip to content

Commit

Permalink
Add PhD, update MS
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-56 committed Jul 23, 2020
1 parent d976c89 commit 43cda8a
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 76 deletions.
Binary file added assets/img/slides/itu-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 57 additions & 59 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
<li class="nav-item mx-0 mx-lg-1">
<a class="nav-link py-3 px-0 px-lg-3 rounded-sm js-scroll-trigger" href="#ms">MS</a>
</li>
<!-- <li class="nav-item mx-0 mx-lg-1">
<li class="nav-item mx-0 mx-lg-1">
<a class="nav-link py-3 px-0 px-lg-3 rounded-sm js-scroll-trigger" href="#phd">PhD</a>
</li> -->
</li>
<li class="nav-item mx-0 mx-lg-1">
<a class="nav-link py-3 px-0 px-lg-3 rounded-sm js-scroll-trigger" href="#help">HELP</a>
</li>
Expand All @@ -86,10 +86,10 @@
</nav>

<header id="bannerCarouselIndicators" class="mhead carousel slide" data-ride="carousel">
<!-- <ol class="carousel-indicators">
<ol class="carousel-indicators">
<li data-target="#bannerCarouselIndicators" data-slide-to="0" class="active"></li>
<li data-target="#bannerCarouselIndicators" data-slide-to="1"></li>
</ol> -->
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img
Expand All @@ -99,15 +99,23 @@
alt="Admissions open 2020"
/>
</div>
<div class="carousel-item">
<img
class="d-block w-100"
src="assets/img/slides/itu-1.jpg"
loading="lazy"
alt="Information Technology University of the Punjab (ITU)"
/>
</div>
</div>
<!-- <a class="carousel-control-prev" href="#bannerCarouselIndicators" role="button" data-slide="prev">
<a class="carousel-control-prev" href="#bannerCarouselIndicators" role="button" data-slide="prev">
<span class="mcarousel-control-icon carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#bannerCarouselIndicators" role="button" data-slide="next">
<span class="mcarousel-control-icon carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a> -->
</a>
</header>

<section class="page-section text-secondary mb-0">
Expand All @@ -125,7 +133,7 @@ <h2 class="page-section-heading d-inline-block text-secondary">ADMISSIONS CALEND

<div class="col-md-12 col-sm-12 col-xs-12">
<h3 class="text-center">Important Notice</h3>
<div class="table-responsive">
<div class="table-responsive" style="overflow: visible">
<div id="table-deadline">
<p style="font-size: 16px;">
<i
Expand Down Expand Up @@ -214,17 +222,17 @@ <h3 class="text-center">Important Notice</h3>
</div>
</section>

<section id="bs" class="page-section text-secondary mb-0">
<section id="bs" class="page-section bg-secondary text-white mb-0">
<div class="container">
<!-- About Section Heading-->
<div class="text-center">
<h2 class="page-section-heading d-inline-block text-secondary">BS Merit</h2>
<h2 class="page-section-heading d-inline-block text-white">BS Merit</h2>
</div>
<!-- Icon Divider-->
<div class="divider-custom divider-light">
<div class="divider-custom-line bg-secondary"></div>
<div class="divider-custom-icon"><i class="fas fa-star text-secondary"></i></div>
<div class="divider-custom-line bg-secondary"></div>
<div class="divider-custom-line"></div>
<div class="divider-custom-icon"><i class="fas fa-star"></i></div>
<div class="divider-custom-line"></div>
</div>

<div class="panel-group" role="tablist" aria-multiselectable="true">
Expand Down Expand Up @@ -452,14 +460,14 @@ <h4 class="faq-title">
</div>
</section>

<section id="ms" class="page-section bg-secondary text-white mb-0">
<section id="ms" class="page-section text-secondary mb-0">
<div class="container">
<!-- About Section Heading-->
<div class="text-center">
<h2 class="page-section-heading d-inline-block text-white">MS Merit</h2>
<h2 class="page-section-heading d-inline-block">MS Merit</h2>
</div>
<!-- Icon Divider-->
<div class="divider-custom divider-light">
<div class="divider-custom">
<div class="divider-custom-line"></div>
<div class="divider-custom-icon"><i class="fas fa-star"></i></div>
<div class="divider-custom-line"></div>
Expand All @@ -474,40 +482,13 @@ <h2 class="page-section-heading d-inline-block text-white">MS Merit</h2>
<input
aria-label="Undergraduate obtained GPA"
type="number"
id="undergrad"
id="ms-merit-undergrad"
class="form-control rounded-sm mb-1 p-4"
placeholder="Undergraduate CGPA (out of 4.0)"
required
min="0"
max="4.0"
max="4"
step="0.01"
/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-12 col-md-2 text-center align-self-center col-form-label font-weight-bold"
>ITU Test Marks</label
>
<div class="col-sm-12 col-md-5">
<input
aria-label="MS test obtained"
type="number"
id="MSTest"
class="form-control rounded-sm mb-1 p-4"
placeholder="Obtained Marks in ITU Test"
required
min="0"
/>
</div>
<div class="col-sm-12 col-md-5">
<input
aria-label="MS test total"
type="number"
id="MSTestTotal"
class="form-control rounded-sm mb-1 p-4"
placeholder="Total Marks in ITU Test"
required
min="0"
/>
</div>
</div>
Expand All @@ -519,7 +500,7 @@ <h2 class="page-section-heading d-inline-block text-white">MS Merit</h2>
<input
aria-label="Interview obtained"
type="number"
id="interview"
id="ms-merit-interview"
class="form-control rounded-sm mb-1 p-4"
placeholder="Obtained Marks in Interview"
required
Expand All @@ -531,7 +512,7 @@ <h2 class="page-section-heading d-inline-block text-white">MS Merit</h2>
<input
aria-label="Interview total"
type="number"
id="interviewTotal"
id="ms-merit-interviewTotal"
class="form-control rounded-sm mb-1 p-4"
placeholder="Total Marks in Interview"
required
Expand All @@ -552,11 +533,11 @@ <h2 class="page-section-heading d-inline-block text-white">MS Merit</h2>
</form>
<br />
<div class="font-italic">
Last Updated: June, 2019
Last Updated: July, 2020
</div>
</div>
</section>
<!--

<section id="phd" class="page-section bg-secondary text-white mb-0">
<div class="container">

Expand All @@ -579,7 +560,7 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
<input
aria-label="Undergraduate obtained GPA"
type="number"
id="undergrad"
id="phd-merit-undergrad"
class="form-control rounded-sm mb-1 p-4"
placeholder="Undergraduate CGPA (out of 4.0)"
required
Expand All @@ -589,15 +570,33 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-12 col-md-2 text-center align-self-center col-form-label font-weight-bold"
>Graduate CGPA</label
>
<div class="col-sm-12 col-md-10">
<input
aria-label="Graduate obtained GPA"
type="number"
id="phd-merit-grad"
class="form-control rounded-sm mb-1 p-4"
placeholder="Graduate CGPA (out of 4.0)"
required
min="0"
max="4.0"
step="0.01"
/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-12 col-md-2 text-center align-self-center col-form-label font-weight-bold"
>ITU Test Marks</label
>
<div class="col-sm-12 col-md-5">
<input
aria-label="MS test obtained"
aria-label="PhD test obtained"
type="number"
id="MSTest"
id="phd-merit-PhdTest"
class="form-control rounded-sm mb-1 p-4"
placeholder="Obtained Marks in ITU Test"
required
Expand All @@ -606,9 +605,9 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
</div>
<div class="col-sm-12 col-md-5">
<input
aria-label="MS test total"
aria-label="PhD test total"
type="number"
id="MSTestTotal"
id="phd-merit-PhdTestTotal"
class="form-control rounded-sm mb-1 p-4"
placeholder="Total Marks in ITU Test"
required
Expand All @@ -624,7 +623,7 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
<input
aria-label="Interview obtained"
type="number"
id="interview"
id="phd-merit-interview"
class="form-control rounded-sm mb-1 p-4"
placeholder="Obtained Marks in Interview"
required
Expand All @@ -636,15 +635,15 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
<input
aria-label="Interview total"
type="number"
id="interviewTotal"
id="phd-merit-interviewTotal"
class="form-control rounded-sm mb-1 p-4"
placeholder="Total Marks in Interview"
required
min="0"
/>
</div>
</div>
<div id="MSResult" class="text-center"></div>
<div id="PhDResult" class="text-center"></div>
<div class="m-5 text-center">
<button
type="submit"
Expand All @@ -657,12 +656,11 @@ <h2 class="page-section-heading d-inline-block text-white">PhD Merit</h2>
</form>
<br />
<div class="font-italic">
Last Updated: June, 2020
Last Updated: July, 2020
</div>
</div>
</section>
-->


<section class="page-section" id="help">
<div class="container">
<!-- Contact Section Heading-->
Expand Down
44 changes: 28 additions & 16 deletions js/aggregate.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,49 @@ function calculateBSMerit2(event) {
}

function calculateMSMerit(event) {
var undergrad = parseFloat(document.getElementById('undergrad').value);
var undergrad = parseFloat(document.getElementById('ms-merit-undergrad').value);
var undergradTotal = 4.0;
var interview = parseFloat(document.getElementById('interview').value);
var interviewTotal = parseFloat(document.getElementById('interviewTotal').value);
var MSTest = parseInt(document.getElementById('MSTest').value);
var MSTestTotal = parseInt(document.getElementById('MSTestTotal').value);
var interview = parseFloat(document.getElementById('ms-merit-interview').value);
var interviewTotal = parseFloat(document.getElementById('ms-merit-interviewTotal').value);

if (isNaN(undergrad) || isNaN(interview) || isNaN(interviewTotal) || isNaN(MSTest) || isNaN(MSTestTotal)) {
if (isNaN(undergrad) || isNaN(interview) || isNaN(interviewTotal)) {
console.log('something went wrong');
} else {
event.preventDefault();
var sum =
(0.4 * (undergrad / undergradTotal) + 0.2 * (interview / interviewTotal) + 0.4 * (MSTest / MSTestTotal)) * 100;
var sum = (0.8 * (undergrad / undergradTotal) + 0.2 * (interview / interviewTotal)) * 100;
$('#MSResult').html('<h3 class="mt-5 text-primary">Your Aggregate = ' + sum.toFixed(2) + '% </h3>');
$('html, body').animate({ scrollTop: $('#MSResult').offset().top - 150 }, 1000);
}
}

function calculatePhDMerit(event) {
var undergrad = parseFloat(document.getElementById('undergrad').value);
var undergrad = parseFloat(document.getElementById('phd-merit-undergrad').value);
var undergradTotal = 4.0;
var interview = parseFloat(document.getElementById('interview').value);
var interviewTotal = parseFloat(document.getElementById('interviewTotal').value);
var MSTest = parseInt(document.getElementById('MSTest').value);
var MSTestTotal = parseInt(document.getElementById('MSTestTotal').value);
var grad = parseFloat(document.getElementById('phd-merit-grad').value);
var gradTotal = 4.0;
var interview = parseFloat(document.getElementById('phd-merit-interview').value);
var interviewTotal = parseFloat(document.getElementById('phd-merit-interviewTotal').value);
var phdTest = parseInt(document.getElementById('phd-merit-PhdTest').value);
var phdTestTotal = parseInt(document.getElementById('phd-merit-PhdTestTotal').value);

if (isNaN(undergrad) || isNaN(interview) || isNaN(interviewTotal) || isNaN(MSTest) || isNaN(MSTestTotal)) {
if (
isNaN(undergrad) ||
isNaN(grad) ||
isNaN(interview) ||
isNaN(interviewTotal) ||
isNaN(phdTest) ||
isNaN(phdTestTotal)
) {
console.log('something went wrong');
} else {
event.preventDefault();
var sum =
(0.4 * (undergrad / undergradTotal) + 0.2 * (interview / interviewTotal) + 0.4 * (MSTest / MSTestTotal)) * 100;
$('#MSResult').html('<h3 class="mt-5 text-primary">Your Aggregate = ' + sum.toFixed(2) + '% </h3>');
(0.2 * (undergrad / undergradTotal) +
0.2 * (grad / gradTotal) +
0.2 * (interview / interviewTotal) +
0.4 * (phdTest / phdTestTotal)) *
100;
$('#PhDResult').html('<h3 class="mt-5 text-primary">Your Aggregate = ' + sum.toFixed(2) + '% </h3>');
$('html, body').animate({ scrollTop: $('#PhDResult').offset().top - 150 }, 1000);
}
}
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var APP_PREFIX = 'ITU_MERIT_CALCULATOR';
var VERSION = 'Version_2.0';
var VERSION = 'Version_2.1';
var CACHE_NAME = APP_PREFIX + '-' + VERSION;
var URLS = [
'/itu-merit-calculator/index.html',
Expand Down

0 comments on commit 43cda8a

Please sign in to comment.