diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index b6f16f83c83c737d8868624597dd2a816c75bece..0cd00d41da9ae4dc9b60ab7266430e2d13687a95 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -11,7 +11,7 @@ # License # ======= # -# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net> +# Copyright © 2014-2018 Bob Mottram <bob@freedombone.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -106,9 +106,11 @@ function web_admin_create_installed_apps { echo ' <div class="row">' >> "$apps_filename" fi + filename="apps/app_${app_name}.html" + { echo ' <div class="column">'; echo ' <div>'; - echo " <a href=\"./app_${app_name}.html\">"; + echo " <a href=\"$filename\">"; echo " <img src=\"icons/${app_name}.png\" style=\"width:100%\">"; echo " <center>${app_name}</center>"; echo ' </a>'; @@ -127,6 +129,16 @@ function web_admin_create_installed_apps { app_index=$((app_index+1)) done + # Complete the rest of the four column row + # shellcheck disable=SC2034 + for i in $(seq ${installed_apps_ctr} 3) + do + { echo ' <div class="column">'; + echo ' <div>'; + echo ' </div>'; + echo ' </div>'; } >> "$apps_filename" + done + echo ' </body>' >> "$apps_filename" echo '</html>' >> "$apps_filename"