Stephen Kerr 2 years ago
commit 3fc27acc3e

@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/${relativeFileDirname}"
}
]
}

@ -0,0 +1,36 @@
from glob import glob
import os
files = glob("content/**", recursive=True)
print(files)
print("----------")
for file in files:
#print(file)
if file.endswith(".md"):
print(file)
html_file = file.replace(".md" , ".html")
pandoc_cmd = "pandoc -f markdown -t html" + file + "-o "
os.system(pandoc_cmd)
print("html file saved!")
html_files = glob("content/**", recursive=True)
print("----------")
all_html = ""
for html_file in html_files:
if file.endswith(".html"):
print(html_file)
#open the html file and read teh content
html = open(html_file).read()
# add this content to all_html
all_html += html
print("------------")
print(all_html)
output = open()

@ -7,24 +7,30 @@
<link href="stylesheet.css" rel="stylesheet">
</head>
<body>
<h1>gardening cards for lil gardeners</h1>
<h1>cards</h1>
<section>
<div class="card">
<h2>body</h2>
<p class = 'image'><img src='./images/1.jpg'></p>
<p class = 'image'><img src='./images/3.jpg'></p>
<p class = 'text'>Some text of this card</p>
</div>
<div class="card">
<h2>panopticon</h2>
<p class = 'image'><img src='./images/2.png'></p>
<p class = 'image'><img src='./images/2.jpg'></p>
<p class = 'text'>The panopticon is a design of institutional building with an inbuilt system of control!</p>
</div>
<div class="card">
<h2></h2>
<p class = 'textnoimage'>2. Ilkyaz agini degerlendirmek ve beslemek Genç yazarlarla iletişim kurmak ve İlkyazi tanitmak, <br> davet etmek.Edebiyat ve sanat çevrelerini ortaklaştirmak adina fikir verme ve oluşturma.</p>
<p class = 'textnoimage'>been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem lorem lorem lorem</p>
</div>
<div class="card">
<h2>gezi</h2>
<p class = 'image'><img src='./images/3.jpg'></p>
<p class = 'text'>these are the protests in 2013</p>
</div>
</section>

@ -2,16 +2,22 @@
"cards" : [{
"name" : "body",
"text" : "Some text of this card",
"image": "1.jpg"
"image": "3.jpg"
},
{
"name" : "panopticon",
"text" : "The panopticon is a design of institutional building with an inbuilt system of control!",
"image": "2.png"
"image": "2.jpg"
},
{
"name" : "",
"text" : "2. Ilkyaz agini degerlendirmek ve beslemek Genç yazarlarla iletişim kurmak ve İlkyazi tanitmak, <br> davet etmek.Edebiyat ve sanat çevrelerini ortaklaştirmak adina fikir verme ve oluşturma.",
"text" : "been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem lorem lorem lorem",
"image": ""
},
{
"name" : "gezi",
"text" : "these are the protests in 2013",
"image": "3.jpg"
}]
}

@ -1,7 +1,7 @@
import os , json
folder = "./images/"
#load the json information
with open ("cards.json", "r") as collage:
with open("cards.json", "r") as collage:
cards = json.load(collage)
#html
@ -50,7 +50,7 @@ html = f"""
<link href="stylesheet.css" rel="stylesheet">
</head>
<body>
<h1>gardening cards for lil gardeners</h1>
<h1>cards</h1>
<section>
{ all_cards }
</section>

Before

Width:  |  Height:  |  Size: 840 KiB

After

Width:  |  Height:  |  Size: 840 KiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

@ -10,31 +10,34 @@
position: relative;
}
.card > p.image > img {
width: 80mm;
height: 80mm;
width: 50mm;
height: 50mm;
position: absolute;
top: 20mm;
left: 5mm;
top: 30mm;
left: 10mm;
}
.card > h2{
position: absolute;
top: 5mm;
left: 5mm;
margin: 0;
text-align: center;
padding-top: 5mm;
}
.card > p.text {
width: 80mm;
height: 20mm;
width: 50mm;
height: 50mm;
position: absolute;
top: 95mm;
left: 5mm;
top: 15mm;
left: 10mm;
text-align: center;
}
.card > p.textnoimage {
width: 80mm;
height: 20mm;
width: 60mm;
height: 85mm;
position: absolute;
top: 25mm;
top: 5mm;
left: 5mm;
text-align: center;
right: 5mm;
text-align: center;
font-size: 8;
}

@ -37,7 +37,15 @@
</section>
</body>
<script>
new CircleType(document.getElementById("up")).radius(380);
new CircleType(document.getElementById("down")).dir(-1).radius(380);
// new CircleType(document.getElementById("up")).radius(120);
// new CircleType(document.getElementById("down")).dir(-1).radius(120);
// https://www.w3schools.com/js/js_loop_for.asp
var ups = document.querySelectorAll(".up");
for (let i = 0; i < ups.length; i++) {
new CircleType(ups[i]).radius(160);
}
</script>
</html>
Loading…
Cancel
Save