Skip to content

Commit

Permalink
CSS update
Browse files Browse the repository at this point in the history
Had to update some of the CSS styling. Also added a footer with the version number and a link to the Github page.
  • Loading branch information
fireshaper authored Aug 3, 2020
1 parent 393c1c8 commit 9d1d1ae
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
37 changes: 33 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
<div class="package-view">
<div class="package-container">
<?php

/*Get an API Token from my.trackinghive.com and put it here */
$bearerToken = '';


$version = "0.2.1";
$comment = "No title";

$now = new DateTime();
Expand Down Expand Up @@ -59,6 +60,7 @@ function deleteParcel($_id, $bearerToken){
$carrier = $_POST["carrier"];
$comment = $_POST["comment"];


//----begin trackhive code to add a parcel to your account
try {
$ch = curl_init();
Expand Down Expand Up @@ -236,14 +238,31 @@ function deleteParcel($_id, $bearerToken){
$carrier = $carriers->title;
}
}

/*
switch ($carrier_slug){
case 'usps':
$carrier = 'USPS';
break;
case 'ups':
$carrier = 'UPS';
break;
case 'fedex':
$carrier = 'FedEx';
break;
case 'dhl':
$carrier = 'DHL';
break;
}
*/

$trackingNum = $mydata->tracking_number;

$modTS = $mydata->modified;
$modTime = strtotime($modTS);
$nowTS = $now->getTimestamp();
$modifiedTime = "About " . date('g', $nowTS - $modTime) . " hours ago";

//echo "About " . date('g', $nowTS - $modTime) . " hours ago";

?>
<div class="parcel-item">
Expand Down Expand Up @@ -296,6 +315,9 @@ function deleteParcel($_id, $bearerToken){
} else if ($infoStatus == "OutForDelivery") {
$statusStyle = 'style="background-color: #f7d418 !important;border-color: #f7d418 !important;"';
$trackStatus = "Out for Delivery";
} else if ($infoStatus == "Pending") {
$statusStyle = 'style="background-color: #858585 !important;border-color: #858585 !important;"';
$trackStatus = "Pending";
} else {
$statusStyle = 'style="background-color: #000 !important;border-color: #000 !important;"';
$trackStatus = "N/A";
Expand All @@ -313,6 +335,8 @@ function deleteParcel($_id, $bearerToken){
$statusStyle = 'style="border-color: #3fb00b !important;"';
} else if ($infoStatus == "OutForDelivery") {
$statusStyle = 'style="border-color: #f7d418 !important;"';
} else if ($infoStatus == "Pending") {
$statusStyle = 'style="border-color: #858585 !important;"';
} else {
$statusStyle = 'style="border-color: #000 !important;"';
}
Expand Down Expand Up @@ -340,7 +364,8 @@ function deleteParcel($_id, $bearerToken){
<div class="media-right">
<div class="last-update"> <?php echo $modifiedTime; ?> </div>
<div class="delete-button">

<!--<i class="fa fa-trash"></i>
<span>Delete Parcel</span> -->
<form method="post" action="index.php">
<input type="submit" name="action" value="Delete"/>
<input type="hidden" name="id" value="<?php echo $parcelID; ?>"/>
Expand All @@ -356,6 +381,10 @@ function deleteParcel($_id, $bearerToken){
</div>
</div>
</div>
<div class="footer">
<?php echo "Version " . $version . " | "; ?>
<a href="https://github.com/fireshaper/parcelpony">Github</a> | made by fireshaper
</div>
</div>
</div>
</div>
Expand Down
30 changes: 29 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ a {
box-sizing: border-box;
position: relative;
}

.package-inbox-view {
box-sizing: border-box;
}
Expand Down Expand Up @@ -52,6 +53,18 @@ a {
border-bottom: 10px solid #f2f2f2;
}

.footer {
min-width: 100%;
float: left;
position: relative;
min-height: 1px;
box-sizing: border-box;
background: #f2f2f2;
border-bottom: 10px solid #f2f2f2;
text-align: center;
color: #adadad;
}

.package-container {
position: relative;
min-height: 100%;
Expand Down Expand Up @@ -388,9 +401,24 @@ a {
position: fixed;
min-height: 1px;
box-sizing: border-box;
height: 100%;
overflow-y: scroll;
overflow-x: scroll;
position: relative;
min-height: 1px;
background: #f2f2f2;
border-bottom: 10px solid #f2f2f2;
}

.footer {
min-width: 100%;
float: left;
position: relative;
min-height: 1px;
box-sizing: border-box;
background: #f2f2f2;
border-bottom: 10px solid #f2f2f2;
text-align: center;
color: #adadad;
}

.package-container {
Expand Down

0 comments on commit 9d1d1ae

Please sign in to comment.