Skip to content

Instantly share code, notes, and snippets.

@dasparadoxon
Created December 27, 2018 08:26
Show Gist options
  • Save dasparadoxon/1dac4fd17b5a3fb71f841149a4e71b67 to your computer and use it in GitHub Desktop.
Save dasparadoxon/1dac4fd17b5a3fb71f841149a4e71b67 to your computer and use it in GitHub Desktop.
## Little Script to use two columns for image websites with skeleton boilerplate
## 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