Example #1
0
def story():
#generates html for displaying the title as a link
    str=""
    stories=util.getAllPosts()
    for item in stories:
        str+='"<div class="col-md-offset-2 col-md-8 row">'
        str+='<h2 class="text-primary">%s</h3>' %(item[1])
        str+="<blockquote>"
        str+='<p class="text-muted">%s</p>' %(item[2])
        str+='<footer class="text-info"> %s </footer>' %(item[0])
        str+="</blockquote>"
        str+='</div>'

    str = Markup(str)

    return render_template("story.html", allposts=str)
Example #2
0
def story():
#generates html for displaying the title as a link
    str=""
    stories=util.getAllPosts()
    if not stories:
        str+='<br><br>'
        str+='"<div class="col-md-offset-2 col-md-8 row">'
        str+='<h2 class="text-primary text-center"> %s </h2>' %("Add a story above!")
        str+='</div>'
    for item in reversed(stories):
        str+='"<div class="col-md-offset-2 col-md-8 row" style="background-color:black; opacity:0.8">'
        str+='<h2 class="text-primary" style="word-wrap: break-word"> %s </h2>' %(item[1])
        str+="<blockquote>"
        str+='<p class="text-warning" style="word-wrap: break-word">%s</p>' %(item[2])
        str+='<footer class="text-info">%s</footer>' %(item[0])
        str+="</blockquote>"
        str+="</div>"

    str = Markup(str)

    return render_template("story.html", allposts=str)
Example #3
0
def story():
#generates html for displaying the title as a link
    str=""
    stories=util.getAllPosts()
    if not stories:
        str+='<br><br>'
        str+='"<div class="col-md-offset-2 col-md-8 row">'
        str+='<h2 class="text-primary text-center"> %s </h2>' %("Add a story above!")
        str+='</div>'
    for item in reversed(stories):
        str+='"<div class="col-md-offset-2 col-md-8 row" style="background-color:black; opacity:0.8">'
        str+='<h2 class="text-primary" style="word-wrap: break-word"> %s </h2>' %(item[1])
        str+="<blockquote>"
        str+='<p class="text-warning" style="word-wrap: break-word">%s</p>' %(item[2])
        str+='<footer class="text-info">%s</footer>' %(item[0])
        str+="</blockquote>"
        str+="</div>"

    str = Markup(str)

    return render_template("story.html", allposts=str)