add galery wip
This commit is contained in:
parent
e4eb1b6b68
commit
5959ab5b2e
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ backup*/
|
||||
wp-navigation
|
||||
*.log
|
||||
__pycache__/
|
||||
wp-gallery
|
@ -180,6 +180,14 @@ class WPimport:
|
||||
except Exception as err:
|
||||
self._logger.error("{0} : Exception error for get image : {1}".format(self._name, err))
|
||||
exit(1)
|
||||
content_html = "<!-- wp:paragraph --><p>{0}</p><!-- /wp:paragraph -->\n\n".format(albumdesc)
|
||||
|
||||
content_html = content_html + "<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped\"><!-- wp:image {'id':{0},\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} --><figure class=\"wp-block-image size-large'><img src=\"{1}\" alt=\"\" class=\"wp-image-{0}\"/></figure><!-- /wp:image --> \n\n".format(list_img[0]["id"],list_img[1]["new_src"])
|
||||
|
||||
for i in range(1, len(list_img)):
|
||||
content_html = content_html + "<!-- wp:image {'id':{0},\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} --><figure class=\"wp-block-image size-large\"><img src='{0}' alt=\"\" class='wp-image-{1}'/></figure><!-- /wp:image -->\n\n".format(list_img[i]["id"],list_img[i]["new_src"])
|
||||
content_html = content_html + "<!-- /wp:gallery -->"
|
||||
|
||||
|
||||
|
||||
def _fromFileTmp(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user