Skip to content

Commit

Permalink
Merge pull request #665 from Relkci/style-css
Browse files Browse the repository at this point in the history
move stylesheet to file
  • Loading branch information
Relkci authored Jun 7, 2024
2 parents c01ba41 + 15a3406 commit 1f489e0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 42 deletions.
44 changes: 44 additions & 0 deletions Python/bin/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
img {
max-width: 100%;
height: auto;
}

#screenshot {
max-width: 850px;
max-height: 550px;
display: inline-block;
width: 850px;
overflow: scroll;
}

.hide {
display: none;
}

.uabold {
font-weight: bold;
cursor: pointer;
background-color: green;
}

.uared {
font-weight: bold;
cursor: pointer;
background-color: red;
}

table.toc_table {
border-collapse: collapse;
border: 1px solid black;
}

table.toc_table td {
border: 1px solid black;
padding: 3px 8px 3px 8px;
}

table.toc_table th {
border: 1px solid black;
text-align: left;
padding: 3px 8px 3px 8px;
}
47 changes: 5 additions & 42 deletions Python/modules/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,44 +677,6 @@ def create_folders_css(cli_parsed):
Args:
cli_parsed (ArgumentParser): CLI Object
"""
css_page = """img {
max-width:100%;
height:auto;
}
#screenshot{
max-width: 850px;
max-height: 550px;
display: inline-block;
width: 850px;
overflow:scroll;
}
.hide{
display:none;
}
.uabold{
font-weight:bold;
cursor:pointer;
background-color:green;
}
.uared{
font-weight:bold;
cursor:pointer;
background-color:red;
}
table.toc_table{
border-collapse: collapse;
border: 1px solid black;
}
table.toc_table td{
border: 1px solid black;
padding: 3px 8px 3px 8px;
}
table.toc_table th{
border: 1px solid black;
text-align: left;
padding: 3px 8px 3px 8px;
}
"""

# Create output directories
if os.path.exists(cli_parsed.d):
Expand All @@ -723,16 +685,17 @@ def create_folders_css(cli_parsed):
os.makedirs(os.path.join(cli_parsed.d, 'screens'))
os.makedirs(os.path.join(cli_parsed.d, 'source'))
local_path = os.path.dirname(os.path.realpath(__file__))
# Move our jquery and bootstrap file to the local directory

# Move our jquery & css files to the local directory
shutil.copy2(
os.path.join(local_path, '..', 'bin', 'jquery-3.7.1.min.js'), cli_parsed.d)

shutil.copy2(
os.path.join(local_path, '..', 'bin', 'bootstrap.min.css'), cli_parsed.d)

# Write our stylesheet to disk
with open(os.path.join(cli_parsed.d, 'style.css'), 'w') as f:
f.write(css_page)
shutil.copy2(
os.path.join(local_path, '..', 'bin', 'style.css'), cli_parsed.d)



def default_creds_category(http_object):
Expand Down
1 change: 1 addition & 0 deletions Python/modules/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def create_web_index_head(date, time):
return ("""<html>
<head>
<link rel=\"stylesheet\" href=\"bootstrap.min.css\" type=\"text/css\"/>
<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\"/>
<title>EyeWitness Report</title>
<script src="jquery-3.7.1.min.js"></script>
<script type="text/javascript">
Expand Down

0 comments on commit 1f489e0

Please sign in to comment.