简体   繁体   English

引导社交按钮

[英]Bootstrap social buttons

I'm using social buttons for twitter bootstrap 2 . 我在Twitter Bootstrap 2中使用社交按钮 For some reason, the Facebook "f" logo in the button is not showing up. 由于某种原因,按钮中的Facebook“ f”徽标未显示。 Here is my front end code: 这是我的前端代码:

{% 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" %}

Am I missing a link to any crucial file? 我是否缺少指向任何关键文件的链接? Can't figure out why the Facebook logo isn't showing up. 无法弄清楚为什么没有显示Facebook徽标。 My webapp is in Django. 我的webapp在Django中。

I figured it out. 我想到了。 I had to add this line: 我必须添加以下行:

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

It looks like you're missing the i tag inside the button tag: 好像您在button标签内缺少了i标签:

<i class="fa fa-facebook"></i>

Which would then look like this for you: 然后,对您而言,它将如下所示:

<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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM