forked from Alsan/Post_finder
final app with css
This commit is contained in:
parent
bd16e51d31
commit
eca55b1d1a
6
App.py
6
App.py
@ -62,7 +62,7 @@ def search_tracking():
|
||||
adjusted_row_idx = row_idx + 1
|
||||
adjusted_col_idx = col_idx + 1
|
||||
result_html += f"<h3>Tracking No: {tracking_no} found in sheet '{sheet_name}'</h3>"
|
||||
#result_html += f"<p><strong>Row {adjusted_row_idx}, Column {adjusted_col_idx}:</strong> {cell_str}</p>"
|
||||
##result_html += f"<p><strong>Row {adjusted_row_idx}, Column {adjusted_col_idx}:</strong> {cell_str}</p>"##
|
||||
|
||||
try:
|
||||
mail_bag_no_parts = [
|
||||
@ -87,12 +87,12 @@ def search_tracking():
|
||||
break
|
||||
|
||||
if tracking_found and mail_bag_no:
|
||||
result_html += f"<p ><strong>Mail Bag No:</strong> {mail_bag_no}</p>"
|
||||
result_html += f"<p ><strong>Mail Bag No:</strong> { mail_bag_no}</p>"
|
||||
elif tracking_found:
|
||||
result_html += f"<p><strong>Mail Bag No:</strong> Not found</p>"
|
||||
|
||||
if tracking_found and hash_value:
|
||||
result_html += f"<p><strong>Number:</strong> {hash_value}</p>"
|
||||
result_html += f"<p><strong>Number:</strong> { hash_value}</p>"
|
||||
elif tracking_found:
|
||||
result_html += f"<p><strong>#:</strong> Not found</p>"
|
||||
|
||||
|
BIN
static/App.png
Normal file
BIN
static/App.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
@ -1,25 +1,158 @@
|
||||
/* styles.scss */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
color: #333;
|
||||
background-color: rgb(225.2719665272, 239.9163179916, 249.7280334728);
|
||||
background-color: #1b1b1b;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.top-left-logo {
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
width: 80px;
|
||||
height: fit-content;
|
||||
}
|
||||
.top-left-logo img {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #ffa31a;
|
||||
}
|
||||
.top-left-logo h5 {
|
||||
color: #ffa31a;
|
||||
margin-top: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #ffa31a;
|
||||
margin-left: 6%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #3498db;
|
||||
color: #ffa31a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form input[type=text],
|
||||
form input[type=file],
|
||||
form input[type=submit] {
|
||||
margin: 10px 0;
|
||||
.upload {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: #808080;
|
||||
border-radius: 15px;
|
||||
color: #000000;
|
||||
padding: 10px;
|
||||
border: 1px solid rgb(33.1380753138, 125.1882845188, 186.8619246862);
|
||||
border-radius: 5px;
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
}
|
||||
|
||||
p {
|
||||
input[type=file]::file-selector-button {
|
||||
width: fit-content;
|
||||
margin-right: 20px;
|
||||
border: none;
|
||||
background: #ffa31a;
|
||||
padding: 10px 20px;
|
||||
border-radius: 10px;
|
||||
color: #000000;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
input[type=file]::file-selector-button:hover {
|
||||
background: #808080;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px 15px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
color: #000000;
|
||||
background-color: #ffa31a;
|
||||
border: none;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
margin-right: 10%;
|
||||
width: 100px;
|
||||
font-size: medium;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #808080;
|
||||
}
|
||||
|
||||
#tracking_no {
|
||||
width: 50%;
|
||||
margin: 10px;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.con {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.tracking_number .up_file {
|
||||
width: 50%; /* change this to desired width */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tracking_number {
|
||||
width: 550px;
|
||||
}
|
||||
|
||||
.up_file, .search {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.strong, .search {
|
||||
color: #ffa31a;
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.all {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 600;
|
||||
font-size: 25px;
|
||||
}
|
||||
.all strong {
|
||||
color: #ffa31a;
|
||||
font-size: 25px;
|
||||
}
|
||||
.all .result-container {
|
||||
padding: 15px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
background-color: #555353;
|
||||
width: fit-content;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.all .result-container h3 {
|
||||
color: #ffa31a;
|
||||
}
|
||||
.all .result-container p {
|
||||
margin: 5px 0;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.all .result-container p.error {
|
||||
color: red;
|
||||
}
|
||||
.all .result-container p.success {
|
||||
color: green;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../scss/style.scss"],"names":[],"mappings":"AAGA;EACI;EACA,OAJS;EAKT;;;AAGJ;EACI,OAVY;;;AAcZ;AAAA;AAAA;EAGI;EACA;EACA;EACA;;;AAIR;EACI;EACA","file":"style.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../scss/style.scss"],"names":[],"mappings":"AAAA;AASA;EACE;EACA,kBALQ;EAMR;;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE,OAzBQ;EA0BV;EACA;;;AAMF;EACE,OAlCU;EAmCV;;;AAIF;EACE,OAxCU;EAyCV;;;AAIF;EACA;;;AAIA;EACA;EACE;;;AAIF;EACE,kBA1De;EA2Df;EACA;EACA;EACA;EACA;;;AAKF;EACE;EACA;EACA;EACA,YAvEU;EAwEV;EACA;EACA;EACA;EACA;;;AAGF;EACE,YAjFe;;;AAqFjB;EACE;EACA;EACA;EACA;EACA,kBAzFU;EA0FV;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,kBAnGa;;;AA2GjB;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGA;EACA,OApIU;;;AAuIV;EACE;;;AAIJ;EACE;EACA;EACA;EACF;EACA;;AACA;EACE,OAnJU;EAoJV;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,OAlKQ;;AAqKV;EACE;EACA;EACA;EACA;;AAMA;EACE;;AAGF;EACE","file":"style.css"}
|
BIN
static/icon.png
Normal file
BIN
static/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 430 KiB |
@ -1,28 +1,192 @@
|
||||
$primary-color: #3498db;
|
||||
$text-color: #333;
|
||||
/* styles.scss */
|
||||
|
||||
// Variables
|
||||
$primary-color:radial-gradient(circle, rgba(250,212,163,1) 0%, rgba(253,187,92,1) 50%, rgba(255,163,26,1) 100%);
|
||||
$secondary-color:#808080;
|
||||
$text-color:#ffa31a;
|
||||
$bg-color:#1b1b1b ;
|
||||
|
||||
// Global styles
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
color: $text-color;
|
||||
background-color: lighten($primary-color, 40%);
|
||||
font-family: Arial, sans-serif;
|
||||
background-color:$bg-color;
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Style for the top-left logo
|
||||
.top-left-logo {
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
width: 80px;
|
||||
height: fit-content;
|
||||
|
||||
img {
|
||||
width: 80px; // Adjust the size as needed
|
||||
height: auto; // Maintain aspect ratio
|
||||
border-radius: 50%; // Optional: Make it circular
|
||||
border: 2px solid $text-color; // Optional: Add a border
|
||||
}
|
||||
|
||||
h5{
|
||||
color:$text-color;
|
||||
margin-top: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1{
|
||||
color: $text-color;
|
||||
margin-left:6%;
|
||||
}
|
||||
|
||||
// Header styles
|
||||
h2 {
|
||||
color: $primary-color;
|
||||
color: $text-color;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form {
|
||||
input[type="text"],
|
||||
input[type="file"],
|
||||
input[type="submit"] {
|
||||
margin: 10px 0;
|
||||
padding: 10px;
|
||||
border: 1px solid darken($primary-color, 10%);
|
||||
border-radius: 5px;
|
||||
}
|
||||
//maga CONTAINER
|
||||
.upload{
|
||||
color:black;
|
||||
}
|
||||
|
||||
p {
|
||||
//form
|
||||
.container{
|
||||
display:flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
//input (file upload)
|
||||
input{
|
||||
background-color: $secondary-color;
|
||||
border-radius: 15px;
|
||||
color: #000000;
|
||||
padding: 10px;
|
||||
width: 80%;
|
||||
margin-left:10%;
|
||||
}
|
||||
|
||||
|
||||
// Browse file butt
|
||||
input[type="file"]::file-selector-button {
|
||||
width: fit-content;
|
||||
margin-right: 20px;
|
||||
border: none;
|
||||
background: $text-color;
|
||||
padding: 10px 20px;
|
||||
border-radius: 10px;
|
||||
color: #000000;
|
||||
cursor: pointer;
|
||||
transition: background .2s ease-in-out;
|
||||
}
|
||||
|
||||
input[type="file"]::file-selector-button:hover {
|
||||
background:$secondary-color;
|
||||
}
|
||||
|
||||
// Button styles
|
||||
button {
|
||||
padding:10px 15px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
color: #000000;
|
||||
background-color: $text-color;
|
||||
border: none;
|
||||
border-radius:15px;
|
||||
cursor: pointer;
|
||||
margin-right:10%;
|
||||
width: 100px;
|
||||
font-size: medium;
|
||||
|
||||
&:hover {
|
||||
background-color: $secondary-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// search container styles
|
||||
#tracking_no{
|
||||
width:50%;
|
||||
margin: 10px;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.con{
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width:100%;
|
||||
height:fit-content;
|
||||
}
|
||||
.tracking_number .up_file{
|
||||
width: 50%; /* change this to desired width */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tracking_number{
|
||||
width:550px;
|
||||
}
|
||||
|
||||
.up_file, .search{
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.strong, .search{
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.search_btn{
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
// Result container styles
|
||||
.all {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 600;
|
||||
font-size:25px;
|
||||
strong{
|
||||
color: $text-color;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.result-container {
|
||||
padding: 15px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
background-color:#555353;
|
||||
width: fit-content;
|
||||
display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
h3{
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 5px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
p,strong{
|
||||
|
||||
}
|
||||
|
||||
&.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
&.success {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
7
templates/result.html
Normal file
7
templates/result.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!-- result.html -->
|
||||
<div class="all">
|
||||
<div class="result-container">
|
||||
{{ result_html|safe }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,17 +4,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Search Tracking</title>
|
||||
<link rel="stylesheet" href="../static/css/style.css">
|
||||
<link rel="icon" href="../static/icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<div class="top-left-logo">
|
||||
<img src="../static/App.png" alt="Logo">
|
||||
<h5> <strong>SAR</strong> Link </h5>
|
||||
</div>
|
||||
<h1>📬 Mail Tracking Lookup System</h1>
|
||||
<h2>Search Tracking Number</h2>
|
||||
<p><strong>Uploaded File:</strong> {{ uploaded_file_name }}</p>
|
||||
<form action="/search" method="post">
|
||||
<label for="tracking_no">Enter Tracking No:</label>
|
||||
<div class="con">
|
||||
<p class="up_file"><strong class="strong">Uploaded File:</strong> {{ uploaded_file_name }}</p>
|
||||
<form class="tracking_number" action="/search" method="post">
|
||||
<label class="search" for="tracking_no"> <strong>Enter Tracking No:</strong></label>
|
||||
<input type="text" name="tracking_no" id="tracking_no" required>
|
||||
<br><br>
|
||||
<button type="submit">Search</button>
|
||||
<button class="search_btn" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
{{ result_html|safe }}
|
||||
<!-- Include the result.html file -->
|
||||
{% include 'result.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -4,15 +4,24 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Upload File</title>
|
||||
<link rel="stylesheet" href="../static/css/style.css">
|
||||
<link rel="icon" href="../static/icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<div class="top-left-logo">
|
||||
<img src="../static/App.png" alt="Logo">
|
||||
<h5> <strong>SAR</strong> Link </h5>
|
||||
</div>
|
||||
<h1>📬 Mail Tracking Lookup System</h1>
|
||||
<h2>Upload Excel File</h2>
|
||||
<form action="/" method="post" enctype="multipart/form-data">
|
||||
<label for="file">Choose file:</label>
|
||||
<div class="upload">
|
||||
<form class="container" action="/" method="post" enctype="multipart/form-data">
|
||||
|
||||
<input type="file" name="file" id="file" required>
|
||||
<br><br>
|
||||
<button type="submit">Upload</button>
|
||||
<button class="upload" type="submit">Upload</button>
|
||||
</form>
|
||||
</div>
|
||||
{% if error %}
|
||||
<p style="color: red;">{{ error }}</p>
|
||||
{% endif %}
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user