Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Darth Skywalker
@adityaparab
@Chan11 : You can use class="text-center" on a div that wraps your ul element like
<div class="text-center">
    <ul>
         <li>...
    </ul>
</div>
LordYamanouchi
@LordYamanouchi
@adityaparab SO I need a developer key. Do most of the websites that I could get quotes from need a developer key?
Chandrahas P
@Chan11
@adityaparab only text is moving to center. pls look at this https://codepen.io/Chan11/full/zBLLdm/
Darth Skywalker
@adityaparab
@LordYamanouchi : No Idea mate! You will have to look around for that. :)
Chandrahas P
@Chan11
@adityaparab Pls open my pen page in new tab. its looking odd
Darth Skywalker
@adityaparab
@Chan11 : Yes. It will move everything to center. :) What is your desired output?
how doyou want it to look like?
Chandrahas P
@Chan11
need to look like below page: https://codepen.io/FreeCodeCamp/full/NNvBQW/
Darth Skywalker
@adityaparab
@Chan11 : Well.. Then. you ahve many things to fix. :)
You don't have a container in your page.
you will have to study bootstrap grid system to make your alignment look like this.
A quick solution, for now, would be
<div class="col-md-8 col-md-offset-3">
    <ul>
         <li>...
    </ul>
</div>
Mark
@cityproject
could anyone help me with my login system? i want to load a logout button once the user is securely logged in. http://192.241.153.25:8000
$('#login_form').on('submit', function(e) { e.preventDefault()

    $.ajax({
      type:"POST",
      url: '/api/users/login/',
      data:$('#login_form').serialize(),
      error: function(response){
        alert('Not authorized.');  // Or something in a message DIV
      },
      success: function(response){
        console.log(response);
        $('.login_bar').html(response)
        $('.login_bar').html(response)
        $('#logout_form').toggleClass(show)
      // do something with response
   }
  });

});
Maulik Darji
@maulikdarji
@Chan11 changing your <div class="text-center"> .. <ul> ..<li> .. to <div class=" container text-left"> will work
Darth Skywalker
@adityaparab

@cityproject :smile:
Shouldn't

$('#logout_form').toggleClass(show)

be

$('#logout_form').toggleClass('show')

?

Mark
@cityproject
yeah. those codes in the end don't really make much difference. i need to rewrite anyways
Chandrahas P
@Chan11
@adityaparab i've learned some basics about bootstrap grid system in fcc,but have no clue how to apply. have to look at it again. Thanks for help. @maulikdarji Will try it,thanks .
CamperBot
@camperbot
chan11 sends brownie points to @adityaparab and @maulikdarji :sparkles: :thumbsup: :sparkles:
:cookie: 425 | @adityaparab |http://www.freecodecamp.com/adityaparab
:cookie: 612 | @maulikdarji |http://www.freecodecamp.com/maulikdarji
Darth Skywalker
@adityaparab

@cityproject

yeah. those codes in the end don't really make much difference. i need to rewrite anyways

They do make a huge difference.

show would mean a variable
'show' means a string.

Mark
@cityproject
i mean, i don't use that code anymore.
so it will be
$('#login_form').on('submit', function(e) { e.preventDefault()

    $.ajax({
      type:"POST",
      url: '/api/users/login/',
      data:$('#login_form').serialize(),
      error: function(response){
        alert('Not authorized.');  // Or something in a message DIV
      },
      success: function(response){
        console.log(response);
   }
  });

});
instead.
I'm looking for ways to print logout button instead of login button once a user logs in.
Darth Skywalker
@adityaparab
@cityproject : SHow your HTML markup
Mark
@cityproject
<div class="login_div" > <!--ng-controller="login_controller"-->
<form id="login_form" method="post" action="{% url 'login' %}">
{% csrf_token %}

          <div class="field-wrap">
          <!--<label>
            Email Address
          </label>-->
          <input required="" type="text" name="username" placeholder="Username">
        </div>

        <div class="field-wrap">
          <!--<label>
            Password
          </label>-->
          <input required="" type="password" name="password" placeholder="Password">
        </div>

        <button class="progress-button forgot" data-style="rotate-angle-bottom" data-perspective data-horizontal>
          <span class="progress-wrap">
            <span class="content">Forgot Password?</span>
              <span class="progress">
              <span class="progress-inner"></span>
            </span>
          </span>
        </button>
<br>
        <button class="ladda-button button-primary login_button" ng-click="vm.submit()"/><span class="ladda-label">Log In</span></button>

        </form>
</div>
so, when the user logs in, the login form and login button should be replaced with logout button and username.
without refreshing the page
Norvin Burrus
@ndburrus
Phanindra M
@PhaniMaddi
which is better Bootstrap 3 or Bootstrap 4?
Darth Skywalker
@adityaparab
@cityproject :smile:
Sorry, I've been away from this room for a while
Mark
@cityproject
ah it's okay.
Darth Skywalker
@adityaparab
1) You don't have logout button on your page.
Mark
@cityproject
i get that all the time :)
Darth Skywalker
@adityaparab
2) I see some Angular JS things in your page!
and still you're using jquery
Mark
@cityproject
yes.
i am not good at angular :(
so certain things must be done using jQuery.
Darth Skywalker
@adityaparab
@cityproject lol. With Angular, this will be a piece of cake!
anyway, let's solve your log out button problem first
Mark
@cityproject
i thought that, replacing login button with logout button can be done using html tag
so yeah
Darth Skywalker
@adityaparab
Put this at the end of your template
<div><button id="logout" style="display:none;">Log Out</button></div>
and your ajax

    $.ajax({
      type:"POST",
      url: '/api/users/login/',
      data:$('#login_form').serialize(),
      error: function(response){
        alert('Not authorized.');  // Or something in a message DIV
      },
      success: function(response){
        console.log(response);
        $(this).css('display','none');
        $('button#logout').css('display','block');
   }
  });
Mark
@cityproject
oh yrah
yeah*
why didn't i think of this solution?