Working OK - prior to rehashing WEB_DIR

This commit is contained in:
John Pateman 2017-08-21 15:35:46 +01:00
parent 087815616e
commit db2ab46be8
3 changed files with 29 additions and 25 deletions

View File

@ -38,8 +38,8 @@ mkdir $OUTPUT_DIR
# looked at using a graphical diff viewer like p4merge.
# Set directory for web backend
WEB_DIR=$OUTPUT_DIR"/web"
mkdir $WEB_DIR
WEB_DIR="/web"
mkdir $OUTPUT_DIR/$WEB_DIR
cp ~/Kicad/KiCad-Diff/style.css $WEB_DIR/
# TODO Might need to use a more complex strategy to cope with spaces in filename
@ -300,18 +300,20 @@ cat >> $OUTPUT_DIR/index.html <<HEAD
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="web/style.css" media="screen" />
</head>
<body>
<div class="title">
PCBnew Graphical Diff</div>
<div class="box green"></div><div class="subtitle">ADDED i.e. in <b>$DIFF_1</b> and not in <b>$DIFF_2</b></div>
<div class="box red"></div><div class="subtitle">REMOVED i.e. in <b>$DIFF_2</b> and not in <b>$DIFF_1</b></div>
<div class="box green"></div><div class="subtitle"><b>ADDED</b> i.e. in <b>$DIFF_1</b> and not in <b>$DIFF_2</b></div>
<div class="box red"></div><div class="subtitle"><b>REMOVED</b> i.e. in <b>$DIFF_2</b> and not in <b>$DIFF_1</b></div>
HEAD
for g in $OUTPUT_DIR/diff-$DIFF_1-$DIFF_2/*.png; do
convert -resize 300 $g ./plots/thumbs/th_$(basename $g)
convert $g -resize 300x245 ./plots/thumbs/th_$(basename $g)
#cp $g ./plots/thumbs/th_$(basename $g)
# Attempt toforce to same size to prevent gaps in page.
route=$g
file=${route##*/}
@ -336,8 +338,14 @@ cat >> $OUTPUT_DIR/tryptych/$(basename $g).html <<HTML
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../web/style.css" media="screen" />
<style>
div.responsive {
padding: 0 6px;
float: left;
width: 33.332%;
}
</style>
</head>
<div class="title">$base</div>
<body>

View File

@ -21,7 +21,7 @@ plotDir = filePath
popt.SetOutputDirectory(plotDir)
popt.SetPlotFrameRef(False)
popt.SetLineWidth(pcbnew.FromMM(0.1))
popt.SetLineWidth(pcbnew.FromMM(0.15))
popt.SetAutoScale(False)
popt.SetScale(2)
popt.SetMirror(False)

View File

@ -6,49 +6,44 @@ TODO Need to differentiate the .responsive tag between the index and tryptych vi
body {
background-color: #a2b1c6;
}
div.gallery {
.gallery {
border: 1px solid #ccc;
}
div.gallery:hover {
.gallery:hover {
border: 1px solid #777;
}
div.gallery img {
.gallery img {
width: 100%;
height: auto;
}
/*
.gallery img {
width: 100%;
height: auto;
}
*/
.desc {
padding: 15px;
text-align: center;
font: 15px arial, sans-serif;
}
div.desc1 {
padding: 15px;
text-align: center;
font: 15px arial, sans-serif;
background: #43FF01;
}
div.desc2 {
padding: 15px;
text-align: center;
font: 15px arial, sans-serif;
background: #F40008;
}
div.title {
.title {
padding: 15px;
text-align: left;
font: 30px arial, sans-serif;
color: #496075;
}
div.subtitle {
.subtitle {
padding: 15px;
text-align: left;
font: 15px arial, sans-serif;
color: #000000;
}
* {
box-sizing: border-box;
}
@ -70,6 +65,7 @@ Block for Tryptych
width: 24.99999%;
}
@media only screen and (max-width: 700px){
.responsive {
width: 49.99999%;