Commit 9b152a72 authored by King Alex's avatar King Alex

Update GallerieImagesHTTP.sh

parent 629595f1
......@@ -89,27 +89,34 @@ case $UPDATE in
Y)
echo "Creating html..."
# Create html
echo "<html>">$DIR"/index.html"
echo "<head>">>$DIR"/index.html"
echo '<title>'$TITLE'</title>'>>$DIR"/index.html"
echo '<link rel="stylesheet" type="text/css" href="'$STYLE'">'>>$DIR"/index.html"
echo '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">'>>$DIR"/index.html"
echo "</head>">>$DIR"/index.html"
echo "<body>">>$DIR"/index.html"
echo '<div class="container">'>>$DIR"/index.html"
echo '<div class="title"><h1>Gallerie</h1></div>'>>$DIR"/index.html"
cat >$DIR"/index.html" << HTMLCODE
<html>
<head>
<title>$TITLE</title>
<link rel="stylesheet" type="text/css" href="'$STYLE'">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="title"><h1>Gallerie</h1></div>
HTMLCODE
for thumbnail in $THUMBNAILS/*; do
echo '<a href="images/'$(basename $thumbnail)'">'>>$DIR"/index.html"
IMG='<img src="thumbnails/'$(basename $thumbnail)'"/>'
echo $IMG>>$DIR"/index.html"
echo "</a>">>$DIR"/index.html"
echo '<a href="images/'$(basename $thumbnail)'">
<img src="thumbnails/'$(basename $thumbnail)'"/>
</a>'>>$DIR"/index.html"
done
echo '</div>'>>$DIR"/index.html"
echo '<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>'>>$DIR"/index.html"
echo "</body>">>$DIR"/index.html"
echo "</html>">>$DIR"/index.html"
cat >>$DIR"/index.html"<<HTMLCO
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
HTMLCO
echo "Complete"
;;
*) # Do not create html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment