Commit 04c1b204 authored by Mathis Dedial's avatar Mathis Dedial
Browse files

Add Facebook share button (issue #4)

Remove unused template
parent 0499872b
Pipeline #2693 skipped with stage
window.fbAsyncInit = function () {
FB.init({
appId: '806124186257035',
autoLogAppEvents: true,
xfbml: true,
version: 'v2.12'
});
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; }
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
......@@ -36,3 +36,12 @@ window.setTimeout(function() {
messages[i].style.display = 'none';
}
}, 2000);
// add event listener for facebook share button
document.getElementById('fbShareButton').addEventListener('click', function () {
FB.ui({
method: 'share',
href: 'https://developers.facebook.com/docs/',
}, function (response) { });
});
......@@ -18,6 +18,10 @@
</head>
<body>
<!-- Facebook JavaScript SDK -->
<script src="static/scripts/facebook.js"></script>
<nav class="navbar navbar-expand-lg bg-secondary fixed-top text-uppercase" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" >AMIV Jubiläum - Burger Contest</a>
......@@ -55,21 +59,22 @@
<div class="col-md mb-5 mb-lg-0">
<h4 class="text-uppercase mb-4">Around the Web</h4>
<ul class="list-inline mb-0">
<!--li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="#">
<i class="fa fa-fw fa-facebook"></i>
</a>
</li>
<li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="#">
<i class="fa fa-fw fa-twitter"></i>
</a>
</li-->
<li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="http://amiv.ch">
<i class="fa fa-fw fa-dribbble"></i>
</a>
</li>
<li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="#" id="fbShareButton">
<i class="fa fa-fw fa-facebook"></i>
</a>
</li>
<!--
<li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="#">
<i class="fa fa-fw fa-twitter"></i>
</a>
</li-->
<li class="list-inline-item">
<a class="btn btn-outline-light btn-social text-center rounded-circle" href="http://amiv.ch">
<i class="fa fa-fw fa-dribbble"></i>
</a>
</li>
</ul>
</div>
</div>
......
{% extends 'base.html' %}
{% block title %} AMIV Burger Voting {% endblock %}
{% block content %}
<!-- Header -->
<header class="masthead bg-primary text-white text-center">
<div class="container">
<div class="col-lg-8 mx-auto">
<a class="btn btn-secondary btn-lg rounded-pill" href="#">Vote for a burger</a>
<hr class="star-light mb-5">
<a class="btn btn-secondary btn-lg rounded-pill" href="creator (1).htm">Create a burger</a>
</div>
</div>
</header>
<!-- Info Section -->
<section class="bg-primary text-white text-center" id="info">
<div class="container">
<h2 class="text-center text-uppercase text-white">Info</h2>
<div class="text-center">
<h5>You can creat a burger on this page and then everybody can vote to decide which burger is the best. The best burger will be available at the menza Polyterasse on .....</h5></span>
</div>
</div>
</section>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment