Created
December 27, 2018 08:26
-
-
Save dasparadoxon/1dac4fd17b5a3fb71f841149a4e71b67 to your computer and use it in GitHub Desktop.
## Little Script to use two columns for image websites with skeleton boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Little Script to use two columns for image websites with skeleton boilerplate | |
from os import listdir | |
from os.path import isfile, join | |
mypath = "" | |
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] | |
openRow = "<div class='row'>" | |
openColumn = "<div class='phones one-half column'>" | |
closeDiv = "</div>" | |
imageInsert = "<img class='u-max-full-width' src='{}'>".format("test") | |
numberOfImages = len(onlyfiles) | |
i = 0 | |
while i < numberOfImages: | |
print(openRow) | |
print(openColumn) | |
print("<img class='u-max-full-width' src='images/{}'>".format(onlyfiles[i])) | |
print(closeDiv) | |
i = i + 1 | |
if(i<numberOfImages): | |
print(openColumn) | |
print("<img class='u-max-full-width' src='images/{}'>".format(onlyfiles[i])) | |
print(closeDiv) | |
i = i + 1 | |
print(closeDiv) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment