Added: width, height, new window options + readme
This commit is contained in:
parent
99f1927d65
commit
301cb68dd2
31
README.md
31
README.md
|
@ -261,14 +261,39 @@ Définir en METAS
|
||||||
|
|
||||||
```
|
```
|
||||||
image: 1 : FILENAME : ALT-TEXT
|
image: 1 : FILENAME : ALT-TEXT
|
||||||
|
image: 2 : FILENAME : ALT-TEXT
|
||||||
```
|
```
|
||||||
|
|
||||||
Dans l'article... (appliquez les lettre l,r, ou c (g,d également) pour
|
Dans l'article...
|
||||||
définir l'alignement auche, droite, centre)
|
Définir le marqueur ```_image``` sur une seule ligne et spécifiez les
|
||||||
|
valeurs séparées par ":"
|
||||||
|
|
||||||
|
- Numero d'image
|
||||||
|
- Alignement: l,r, ou c (g,d également) pour gauche, droite, centre)
|
||||||
|
- Longueur width: juste le nombre
|
||||||
|
- Largeur height: juste le nombre
|
||||||
|
- Champ non vide: Lien de l'image dans un nouvel onglet
|
||||||
|
|
||||||
|
Exemple d'images affichées l'une à côté de l'autre
|
||||||
|
|
||||||
```
|
```
|
||||||
|
(
|
||||||
_image:1
|
_image:1
|
||||||
_image:1:r
|
_image:2:c:640:480
|
||||||
|
_image:3:c:320:240:+
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Exemple d'images affichées l'une en dessous de l'autre, dont la première
|
||||||
|
peut s'ouvrir dans un nouvel onglet
|
||||||
|
|
||||||
|
```
|
||||||
|
(
|
||||||
|
_image:1:c:640:480:+
|
||||||
|
)
|
||||||
|
(
|
||||||
|
_image:2:c:1920:1080
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Block-Code depuis un fichier
|
### Block-Code depuis un fichier
|
||||||
|
|
2
control
2
control
|
@ -1,5 +1,5 @@
|
||||||
Package: egsl
|
Package: egsl
|
||||||
Version: 0.0.19
|
Version: 0.0.20
|
||||||
Section: custom
|
Section: custom
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -261,14 +261,39 @@ Définir en METAS
|
||||||
|
|
||||||
```
|
```
|
||||||
image: 1 : FILENAME : ALT-TEXT
|
image: 1 : FILENAME : ALT-TEXT
|
||||||
|
image: 2 : FILENAME : ALT-TEXT
|
||||||
```
|
```
|
||||||
|
|
||||||
Dans l'article... (appliquez les lettre l,r, ou c (g,d également) pour
|
Dans l'article...
|
||||||
définir l'alignement auche, droite, centre)
|
Définir le marqueur ```_image``` sur une seule ligne et spécifiez les
|
||||||
|
valeurs séparées par ":"
|
||||||
|
|
||||||
|
- Numero d'image
|
||||||
|
- Alignement: l,r, ou c (g,d également) pour gauche, droite, centre)
|
||||||
|
- Longueur width: juste le nombre
|
||||||
|
- Largeur height: juste le nombre
|
||||||
|
- Champ non vide: Lien de l'image dans un nouvel onglet
|
||||||
|
|
||||||
|
Exemple d'images affichées l'une à côté de l'autre
|
||||||
|
|
||||||
```
|
```
|
||||||
|
(
|
||||||
_image:1
|
_image:1
|
||||||
_image:1:r
|
_image:2:c:640:480
|
||||||
|
_image:3:c:320:240:+
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Exemple d'images affichées l'une en dessous de l'autre, dont la première
|
||||||
|
peut s'ouvrir dans un nouvel onglet
|
||||||
|
|
||||||
|
```
|
||||||
|
(
|
||||||
|
_image:1:c:640:480:+
|
||||||
|
)
|
||||||
|
(
|
||||||
|
_image:2:c:1920:1080
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Block-Code depuis un fichier
|
### Block-Code depuis un fichier
|
||||||
|
|
|
@ -56,14 +56,14 @@ case "$gsl_post_type" in
|
||||||
gsl_srv_www_page="$gsl_srv_www/$gsl_header_slug/index.html"
|
gsl_srv_www_page="$gsl_srv_www/$gsl_header_slug/index.html"
|
||||||
gsl__check_srv_files "$gsl_srv_wip_page" wip
|
gsl__check_srv_files "$gsl_srv_wip_page" wip
|
||||||
gsl__check_srv_files "$gsl_srv_www_page" www
|
gsl__check_srv_files "$gsl_srv_www_page" www
|
||||||
gsl_uri=".."
|
#gsl_uri=".."
|
||||||
;;
|
;;
|
||||||
page)
|
page)
|
||||||
gsl_srv_wip_page="$gsl_srv_wip/$gsl_header_slug.html"
|
gsl_srv_wip_page="$gsl_srv_wip/$gsl_header_slug.html"
|
||||||
gsl_srv_www_page="$gsl_srv_www/$gsl_header_slug.html"
|
gsl_srv_www_page="$gsl_srv_www/$gsl_header_slug.html"
|
||||||
gsl__check_srv_files "$gsl_srv_wip_page" wip
|
gsl__check_srv_files "$gsl_srv_wip_page" wip
|
||||||
gsl__check_srv_files "$gsl_srv_www_page" www
|
gsl__check_srv_files "$gsl_srv_www_page" www
|
||||||
gsl_uri="."
|
#gsl_uri="."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,15 @@ gsl__all_makers() {
|
||||||
# Code readability a11y
|
# Code readability a11y
|
||||||
gsl_a11y_post=`mktemp`
|
gsl_a11y_post=`mktemp`
|
||||||
|
|
||||||
|
# Get content only, not header in a file
|
||||||
gsl__post_content_only
|
gsl__post_content_only
|
||||||
|
|
||||||
|
# Get base uri from post/page type:
|
||||||
|
case "$gsl_post_type" in
|
||||||
|
post) gsl_uri=".." ;;
|
||||||
|
page) gsl_uri="." ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Create Listng Page
|
# Create Listng Page
|
||||||
gsl__page_listing_create Add
|
gsl__page_listing_create Add
|
||||||
|
|
||||||
|
@ -583,38 +590,44 @@ EOCITE
|
||||||
gsl__make_image() {
|
gsl__make_image() {
|
||||||
gsl_this_mark="$gsl_mark_image:$gsl_post_hf_1"
|
gsl_this_mark="$gsl_mark_image:$gsl_post_hf_1"
|
||||||
|
|
||||||
# Set HTML base Link
|
while IFS=: read -r "line_nbr" \
|
||||||
case "$gsl_post_type" in
|
"marker" \
|
||||||
post) gsl_bpic_url="../images" ;;
|
"this_image" \
|
||||||
page) gsl_bpic_url="images" ;;
|
"align_image" \
|
||||||
esac
|
"width" \
|
||||||
|
"height" \
|
||||||
while IFS=: read -r "line_nbr" "this_image"
|
"target"
|
||||||
do
|
do
|
||||||
|
|
||||||
align_image=`awk -F: '{print $3}' <<< "$this_image"`
|
# Get this marker
|
||||||
|
gsl_this_mark=`awk -v ln="$line_nbr" 'NR == ln' $gsl_tmp_post`
|
||||||
|
|
||||||
|
#align_image=`awk -F: '{print $3}' <<< "$this_image"`
|
||||||
case "$align_image" in
|
case "$align_image" in
|
||||||
R|r|D|d)
|
R|r|D|d) gsl_html_class="class=\"${gsl_site_css}_image_right\"" ;;
|
||||||
gsl_html_class="class=\"${gsl_site_css}_image_right\""
|
L|l|G|g) gsl_html_class="class=\"${gsl_site_css}_image_left\"" ;;
|
||||||
;;
|
C|c) gsl_html_class="class=\"${gsl_site_css}_image_center\"";;
|
||||||
L|l|G|g)
|
*) gsl_html_class="class=\"${gsl_site_css}_image_center\"";;
|
||||||
gsl_html_class="class=\"${gsl_site_css}_image_left\""
|
|
||||||
;;
|
|
||||||
C|c)
|
|
||||||
gsl_html_class="class=\"${gsl_site_css}_image_center\""
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
gsl_html_class="class=\"${gsl_site_css}_image_center\""
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
gsl_html_src="src=\"$gsl_bpic_url/$gsl_post_hf_2\""
|
gsl_html_src="src=\"$gsl_uri/images/$gsl_post_hf_2\""
|
||||||
gsl_html_alt="alt=\"$gsl_post_hf_3\""
|
gsl_html_alt="alt=\"$gsl_post_hf_3\" title=\"$gsl_post_hf_3\""
|
||||||
gsl_html_image="<img $gsl_html_src $gsl_html_class $gsl_html_alt />"
|
[[ "$width" ]] && gsl_html_width="style=\"width:${width}px;\""
|
||||||
|
[[ "$height" ]] && gsl_html_height="style=\"height:${height}px;\""
|
||||||
|
|
||||||
echo -ne "\r\033[2K: Converting Image... Line:$line_nbr $this_image"
|
gsl_html_image=`
|
||||||
sed -i "${line_nbr}s|$this_image|$gsl_html_image|" "$gsl_tmp_post"
|
printf '%s %s %s %s %s' \
|
||||||
|
"<img $gsl_html_src" \
|
||||||
|
"$gsl_html_class" \
|
||||||
|
"$gsl_html_alt" \
|
||||||
|
"$gsl_html_width" \
|
||||||
|
"$gsl_html_height />"`
|
||||||
|
|
||||||
|
[[ "$target" ]] \
|
||||||
|
&& gsl_html_image="<a target=\"_blank\" href=\"$gsl_uri/images/$gsl_post_hf_2\">$gsl_html_image</a>"
|
||||||
|
|
||||||
|
echo -ne "\r\033[2K: Converting Image... Line:$line_nbr $gsl_this_mark"
|
||||||
|
sed -i "${line_nbr}s|$gsl_this_mark|$gsl_html_image|" "$gsl_tmp_post"
|
||||||
|
|
||||||
done < <(grep -n "$gsl_this_mark" "$gsl_tmp_post")
|
done < <(grep -n "$gsl_this_mark" "$gsl_tmp_post")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue