我正在使用social buttons for twitter bootstrap 2。出于某种原因,Facebook" f"按钮中的徽标未显示。这是我的前端代码:
{% include "meddy1/header.html" %}
{% load staticfiles %}
<link href="../../static/meddy1/css/social-buttons-3.css" rel="stylesheet">
<link href="../../../bootstrap-social-gh-pages/bootstrap-social.css" rel="stylesheet">
<link href="../../../font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<!-- CSS links -->
<link href="{% static "meddy1/css/login-signup.css" %}" rel="stylesheet" media="screen">
<link href="{% static "meddy1/css/login-signup-responsive.css" %}" rel="stylesheet" media="screen">
<!-- End CSS links -->
<div class="wrapper">
<div class="container">
<!-- Log In -->
<div class="login">
<h1> SIGN UP </h1>
{% if user.is_authenticated and not user.is_superuser %}
<h3>Hi {{ user.first_name }}. Thanks for loggin in!</h3>
{% else %}
<buttton class="btn btn-facebook"><a href="{% url 'social:begin' 'facebook' %}?next={{ index }}" class="fa fa-facebook"> | Signup with Facebook</a></buttton>
{% endif %}
<h4> OR </h4>
<form action="" method="post" id="user_uploader" enctype="multipart/form-data"> {% csrf_token %}
{% for field in form.visible_fields %}
{{ field.errors }}
{{ field.help_text }}
{{ field }}
{% endfor %}
<p class="alert">By Clicking “Sign Up” below, you are agreeing to the Meddy <a href="/terms">Terms of Service</a> and <a href="/privacy">Privacy Policy</a></p>
<button class="btn btn-primary" type="submit" name="submit" id="ss-submit">SIGN UP</button>
<form></form>
<button class="btn btn-facebook"><i class="fa fa-facebook"></i> | Connect with Facebook</button>
</div>
<!-- End Log In -->
</div>
</div>
<!-- End Content -->
</body>
</html>
{% include "meddy1/footer.html" %}
我错过了任何关键文件的链接吗?无法弄清楚为什么Facebook徽标不会出现。我的webapp在Django中。
答案 0 :(得分:1)
我明白了。我不得不添加这一行:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
答案 1 :(得分:0)
看起来你错过了按钮标签中的i标签:
<i class="fa fa-facebook"></i>
那对你来说会是这样的:
<buttton class="btn btn-facebook"><a href="{% url 'social:begin' 'facebook' %}?next={{ index }}" class="fa fa-facebook"><i class="fa fa-facebook"></i> | Signup with Facebook</a></buttton>