added custom option for animations
This commit is contained in:
parent
bfe4bab1f2
commit
a000e94d4b
24
main.py
24
main.py
|
@ -11,6 +11,7 @@ from mdutils import MdUtils
|
|||
markdown = True
|
||||
pdf = False
|
||||
html = True
|
||||
animations = True
|
||||
html_stylesheet = "styles/simple.css"
|
||||
title_animation = "fade-down"
|
||||
heading_animation = "fade-right"
|
||||
|
@ -168,26 +169,27 @@ if html:
|
|||
with open(ofname) as fp:
|
||||
soup = BeautifulSoup(fp,'html5lib')
|
||||
|
||||
aos_css = soup.new_tag('link',href='https://unpkg.com/aos@2.3.1/dist/aos.css',rel='stylesheet')
|
||||
soup.head.append(aos_css)
|
||||
|
||||
font = soup.new_tag('link',href=html_stylesheet,rel='stylesheet')
|
||||
soup.head.append(font)
|
||||
|
||||
title = soup.new_tag('title')
|
||||
title.string = "DailyDose"
|
||||
|
||||
soup.head.append(title)
|
||||
viewport = soup.new_tag("meta",content="width=device-width, initial-scale=1.0")
|
||||
viewport.attrs["name"] = "viewport"
|
||||
soup.head.append(viewport)
|
||||
|
||||
custom_css = soup.new_tag('link',href=html_stylesheet,rel='stylesheet')
|
||||
soup.head.append(custom_css)
|
||||
|
||||
|
||||
if animations:
|
||||
aos_css = soup.new_tag('link',href='https://unpkg.com/aos@2.3.1/dist/aos.css',rel='stylesheet')
|
||||
soup.head.append(aos_css)
|
||||
|
||||
aos_js = soup.new_tag('script',src="https://unpkg.com/aos@2.3.1/dist/aos.js")
|
||||
soup.head.append(aos_js)
|
||||
|
||||
aos_script = soup.new_tag('script')
|
||||
aos_script.string = "AOS.init();"
|
||||
# <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
viewport = soup.new_tag("meta",content="width=device-width, initial-scale=1.0")
|
||||
viewport.attrs["name"] = "viewport"
|
||||
soup.head.append(viewport)
|
||||
|
||||
soup.body.append(aos_script)
|
||||
|
||||
for feed in rss_feeds:
|
||||
|
|
Loading…
Reference in New Issue