fix: HTML img style

This commit is contained in:
Cyrille L 2022-06-15 17:22:25 +02:00
parent d196d16505
commit 933bdd7566
7 changed files with 26 additions and 10 deletions

View File

@ -4,11 +4,17 @@ GSL changes from releases. You can send an issue :
- repo: https://git.a-lec.org/echolib/gsl/-/issues
- Contact xmpp: im@echolib.re
## [0.0.91]
### Fix
- Valid style for img: width & height in one style=""
## [0.0.90]
### Changes
- Statoolinfos: Genereated with www (add/remove)
- CSS div between titles : xxx_content xxx_content-hX
## [0.0.9]
## Please, see help (and documentations in help folder)

View File

@ -1,5 +1,5 @@
Package: egsl
Version: 0.0.90
Version: 0.0.91
Section: custom
Priority: optional
Architecture: all

View File

@ -1,4 +1,4 @@
## [0.0.90]
## [0.0.91]
## Please, see help (and documentations in help folder)

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Version: 0.0.90
# Version: 0.0.91
# file: gsl
# Folder: /usr/local/bin
# By echolib (XMPP: im@echolib.re)

View File

@ -4,11 +4,17 @@ GSL changes from releases. You can send an issue :
- repo: https://git.a-lec.org/echolib/gsl/-/issues
- Contact xmpp: im@echolib.re
## [0.0.91]
### Fix
- Valid style for img: width & height in one style=""
## [0.0.90]
### Changes
- Statoolinfos: Genereated with www (add/remove)
- CSS div between titles : xxx_content xxx_content-hX
## [0.0.9]
## Please, see help (and documentations in help folder)

View File

@ -1,4 +1,4 @@
## [0.0.90]
## [0.0.91]
## Please, see help (and documentations in help folder)

View File

@ -660,20 +660,24 @@ do
image_src="src=\"${srv_uri}images/$header_f2\""
image_alt="alt=\"$header_f3\" title=\"$header_f3\""
[[ "$width" ]] && image_width=" style=\"width:${width};\""
[[ "$height" ]] && image_height=" style=\"height:${height};\""
if [[ "$height" && "$width" ]];then
image_style=" style=\"width:$width;height:$height;\""
elif [[ "$width" ]];then
image_style=" style=\"width:${width};\""
elif [[ "$height" ]];then
image_style=" style=\"height:${height};\""
fi
HTML_image=`
printf '%s%s\n' \
"<img $image_css $image_src $image_alt" \
"$image_width$image_height />"`
"$image_style />"`
if [[ "$target" ]];then
image_clink="class=\"${site_css}_image-link$link_class\""
HTML_image=`
printf '%s%s%s%s\n' \
"<a $image_clink href=\"${srv_uri}images/$header_f2\" " \
"title=\"$header_f3\">" \
printf '%s%s%s\n' \
"<a $image_clink href=\"${srv_uri}images/$header_f2\">" \
"$HTML_image" \
"</a>"`
fi