noxz-sites

A collection of a builder and various scripts creating the noxz.tech sites
git clone https://noxz.tech/git/noxz-sites.git
noxz-sites

commit: 0a58d6c539c588e6012b15c730e63db40d644cac
parent: e7dfc206c9206b0c30086326ec84f261c1e68206
author: Chris Noxz <chris@noxz.tech>
date:   Tue, 4 Jul 2023 12:17:56 +0200
add discontinued section in repo list
Mbuild19++++++++++++++++---
Mconfig/git_repos.html5+++++
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/build b/build
@@ -950,6 +950,7 @@ render_git_repo() {
 render_git() {
 	git_repos=
 	git_forks=
+	git_discs=
 	git_buffer=
 	git_pp=
 	git_owner=
@@ -970,9 +971,13 @@ render_git() {
 				"${git_owner}"                                              \
 				"$(git -C "${repo}" log -1 --format=%ai)")
 
-		[ -f "$repo/fork" ]                                                 \
-			&& git_forks="$(printf '%s%s' "${git_forks}" "${git_buffer}")"  \
-			|| git_repos="$(printf '%s%s' "${git_repos}" "${git_buffer}")"
+		if [ -f "$repo/fork" ]; then
+			git_forks="$(printf '%s%s' "${git_forks}" "${git_buffer}")"
+		elif [ -f "$repo/discontinued" ]; then
+			git_discs="$(printf '%s%s' "${git_discs}" "${git_buffer}")"
+		else
+			git_repos="$(printf '%s%s' "${git_repos}" "${git_buffer}")"
+		fi
 
 		render_git_repo "${1}" "${repo##*/}"
 		print_done
@@ -986,6 +991,7 @@ render_git() {
 		-v var_logo="$(awk_safe "${SITE_ICON_SVG}")"                        \
 		-v var_repos="$(awk_safe "${git_repos}" | sed 's/<tr>/\n\0/2g')"    \
 		-v var_forks="$(awk_safe "${git_forks}" | sed 's/<tr>/\n\0/2g')"    \
+		-v var_discs="$(awk_safe "${git_discs}" | sed 's/<tr>/\n\0/2g')"    \
 	'
 		/\{:repos:\}/{
 			padding=$0
@@ -999,6 +1005,12 @@ render_git() {
 			gsub(/\n/, "\n" padding, var_forks)
 		}
 
+		/\{:discs:\}/{
+			padding=$0
+			gsub(/{:.*:}$/, "", padding)
+			gsub(/\n/, "\n" padding, var_dics)
+		}
+
 		{
 			gsub(/\{:author:\}/, var_author)
 			gsub(/\{:title:\}/, var_title)
@@ -1007,6 +1019,7 @@ render_git() {
 			gsub(/\{:logo:\}/, var_logo)
 			gsub(/\{:repos:\}/, var_repos)
 			gsub(/\{:forks:\}/, var_forks)
+			gsub(/\{:discs:\}/, var_discs)
 			print
 		}
 	' "${CFG_GIT_REPOS_HTML}" > "${git_index}"
diff --git a/config/git_repos.html b/config/git_repos.html
@@ -32,6 +32,11 @@
 			<tbody>
 				{:forks:}
 			</tbody>
+			<tr class="nohi"><td colspan="4">&nbsp;</td></tr>
+			<tr class="nohi"><td>Name</td><td>Description</td><td>Owner</td><td>Last commit</td></tr>
+			<tbody>
+				{:discs:}
+			</tbody>
 		</table>
 	</div>
 </body>