Example #1
0
def index_de(lang=None):

    # this happens if the language buttons are clicked
    if request.method == "POST":
        lang = request.form.get("lang")

        return redirect(url_for('index_en', lang=lang))
    # this happens if a GET request is sent
    else:
        lang = 'de'

    title_text = helper.get_title_content('index', lang)

    # get the latest blog post
    blog_article = helper.get_blog_content()
    # get the latest project
    latest_project = helper.get_latest_project()

    return render_template('index.html',
                           title_text=title_text,
                           title="DATA SCIENCE & SUSTAINABILITY",
                           id="index",
                           lang=lang,
                           blog_article=blog_article,
                           latest_project=latest_project)
Example #2
0
def index():

    title_text = helper.get_title_content('index')

    return render_template('/index.html',
                           title_text=title_text,
                           title="DATA SCIENCE & SUSTAINABILITY",
                           id="index")
Example #3
0
def about():

    title_text = helper.get_title_content('about')

    skills = helper.get_skill_content()

    return render_template('/about.html',
                           title_text=title_text,
                           skills=skills,
                           title="ÜBER MICH",
                           id="about")
Example #4
0
def index_en(lang=None):

    # this happens if the language buttons are clicked
    if request.method == "POST":
        lang = request.form.get("lang")

        return redirect(url_for('index_de', lang=lang))
    # this happens if a GET request is sent
    else:
        lang = 'en'

    title_text = helper.get_title_content('index', lang)

    return render_template('index.html',
                           title_text=title_text,
                           title="DATA SCIENCE & SUSTAINABILITY",
                           id="index",
                           lang=lang)
Example #5
0
def about_de():

    if request.method == "POST":
        lang = request.form.get("lang")

        return redirect(url_for('about_en', lang=lang))
    else:
        lang = 'de'

    title_text = helper.get_title_content('about', lang)

    skills = helper.get_skill_content(lang)

    return render_template('/about.html',
                           title_text=title_text,
                           skills=skills,
                           title="ÜBER MICH",
                           id="about",
                           lang=lang)
Example #6
0
def portfolio():

    # get all projects from the database
    project_list = helper.get_portfolio_content()

    # create list of lists that contains pairs of projects
    if len(project_list) % 2 == 0:
        pass
    else:
        project_list.append(['placeholder'])
    iterator = iter(project_list)
    zipped = zip(iterator, iterator)

    # get the title content for the portfolio page
    title_text = helper.get_title_content('portfolio')

    return render_template('/portfolio.html',
                           title_text=title_text,
                           title="PROJEKTPORTFOLIO",
                           id="portfolio",
                           projects=zipped)
Example #7
0
def portfolio_de():

    if request.method == "POST":
        lang = request.form.get("lang")

        return redirect(url_for('portfolio_en', lang=lang))
    else:
        lang = 'de'

    # get all projects from the database
    zipped = helper.get_portfolio_content(lang)

    # get the title content for the portfolio page
    title_text = helper.get_title_content('portfolio', lang)

    return render_template('/portfolio.html',
                           title_text=title_text,
                           title="PROJEKTPORTFOLIO",
                           id="portfolio",
                           projects=zipped,
                           lang=lang)