Skip to content

Commit

Permalink
new styling
Browse files Browse the repository at this point in the history
  • Loading branch information
druf0 committed Jan 8, 2023
1 parent 23a7d92 commit b58b373
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
Binary file modified html/assets/images/idcard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/assets/images/license.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions html/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,33 @@ $(document).ready(function(){
$('#signature').text(userInfo.firstname + " " + userInfo.lastname);
$('#nationality').text(nationality);
$('#expires').text("02/09/2031");
$('#class').text('');

if (licenseType == 'driver') {
if (licenseData != null) {
Object.keys(licenseData).forEach(function(key) {
var licenseType = licenseData[key].type;

if (licenseType == 'drive_bike') {
$('#nationality').text('');
licenseType = 'motorcyclist';
classType = 'C';
} else if (licenseType == 'drive_truck') {
$('#nationality').text('');
licenseType = 'trucker';
classType = 'A';
} else if (licenseType == 'drive') {
$('#nationality').text('');
licenseType = 'driver';
classType = 'B';
}

if (licenseType == 'motorcyclist' || licenseType == 'trucker' || licenseType == 'driver') {
$('img').hide();
$('#licenses').append('<p class="licenseType">'+licenseType+'</p>');
$('#nationality').hide();
$('#class').append('<p class="classType">'+classType+'</p>');
$('#gender').text("");
$('#job').text("");
}
});
}
Expand All @@ -64,17 +69,12 @@ $(document).ready(function(){
}
} else if (licenseType == 'weapon') {
$('img').hide();
$('#lastname').css('color', '#c7c7c7');
$('#lastname').text(userInfo.lastname);
$('#firstname').css('color', '#c7c7c7');
$('#firstname').text(userInfo.firstname);
$('#dob').css('color', '#c7c7c7');
$('#dob').text(userInfo.dateofbirth);
$('#signature').hide();
$('#expires').css('color', '#c7c7c7');
$('#expires').text("06/01/2027");
$('#job').hide();

$('#job').text("");
$('#class').text("");
$('#identity-card').css('background', 'url(assets/images/weapon.png)');
}
$('#identity-card').show();
Expand Down
22 changes: 8 additions & 14 deletions html/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body, html {
p {
padding: 0;
margin: 0;
color: #000;
color: #c7c7c7;
font-size: 12px;
font-family: 'Poppins', sans-serif;
}
Expand Down Expand Up @@ -61,9 +61,9 @@ p {

.female {
position: absolute;
top: 63px;
top: 58px;
left: 30px;
width: 95px;
width: 100px;
display: none;
}

Expand All @@ -89,21 +89,13 @@ p {

#signature {
position: absolute;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
bottom: 40px;
left: 145px;
font-family: BetterYesterday;
font-size: 48px;
font-size: 44px;
color: white;
}

.signature {
position: absolute;
bottom: 50px;
left: 50%;
transform: translateX(-50%);
}

#licenses {
position: absolute;
top: 23px;
Expand All @@ -117,6 +109,7 @@ p {
text-transform: uppercase;
font-weight: bold;
text-align: center;
text-shadow: 1px 1px #000;
}

#class {
Expand All @@ -126,6 +119,7 @@ p {
}

.classType {
color: #d4d4d4;
margin-left: 5px;
float: left;
}
Expand Down

0 comments on commit b58b373

Please sign in to comment.