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
djangoearnhardt
@djangoearnhardt
sorry that’s a little confusing… I’ve updated my codepen, and here’s the questions: Why won’t my tweet button link to twitter and share my quote
http://codepen.io/djangoearnhardt/full/woKBzJ/
Thayyeb salim
@Thayyebsalim
Hello guys, I am building a tribute page.
Can anyone help me with improvements
Brady
@soccer99
Started learning VueJS this week. I have a decently strong grasp on ReactJS and I have to say Vue is so much more fun and rewarding than React
Ken Haduch
@khaduch
@Thayyebsalim - I think that the page looks nice. There is a lot of information there, but nicely laid out and easy to read. One suggestion is that instead of using a fixed width or height on the image, use max-height: 800px; it makes for better responsive behavior, the image won't get "pinched" on different screen sizes.
djangoearnhardt
@djangoearnhardt
Still struggling on being able to tweet my quote, I’ve tried a few things now and am stumped. I’d appreciate if anyone could lend a hand…
http://codepen.io/djangoearnhardt/pen/woKBzJ?editors=1010
aqm225
@aqm225
can someone please help me with how this all works/
how do i start contributing to projects and learn
i have newly joined this site
Tyler Moeller
@TylerMoeller
@djangoearnhardt The url should have ?text= in it: https://www.twitter.com/intent/tweet?text=. Keep in mind, if you call the API again for the tweet text, you'll be tweeting a different quote than what you have on the page.
djangoearnhardt
@djangoearnhardt
thanks @TylerMoeller how would I have it tweet the current quote. I thought setting up a variable for those values would preserve that
CamperBot
@camperbot
djangoearnhardt sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 923 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
@djangoearnhardt You can read them from the page $('.message').text(), or you can update the href value like you had earlier, a couple posts above and place that code in the same anonymous function you use for displaying the quote on the page.
Just make sure to use target="_blank" in codepen URLs so they open in a new tab
And, this will be helpful for ensuring you can tweet quotes with punctuation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
djangoearnhardt
@djangoearnhardt
thank you so much, this is a bit to digest, but i’ll get on it @TylerMoeller
CamperBot
@camperbot
djangoearnhardt sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: djangoearnhardt already gave tylermoeller points
Tyler Moeller
@TylerMoeller
@aqm225 Welcome to Free Code Camp. You can start here: https://freecodecamp.com/map
Peter Andersson
@repeterande
I am working on my quote machine and I would like to render <p>{this.state.quote}</p> and I can see the quote in App.state using react dev tools in codepen debug view, but it doesn't work when I add the jsx to render(), any pointers would be much appreciated: http://codepen.io/repeterande/pen/pNJjzE?editors=1010
Thayyeb salim
@Thayyebsalim
thank you @khaduch Here are your brownie points :smile:
CamperBot
@camperbot
thayyebsalim sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1899 | @khaduch |http://www.freecodecamp.com/khaduch
ZaynMalloc
@ZaynMalloc
@repeterande The problem is that you are missing getInitialState from your component lifecycle. Add getInitialState: function(){
return{
quote:''
};
}, . Then in your render add <h1>{this.state.quote}</h1>
Peter Andersson
@repeterande
ah, thank you very much @ZaynMalloc
CamperBot
@camperbot
repeterande sends brownie points to @zaynmalloc :sparkles: :thumbsup: :sparkles:
:cookie: 253 | @zaynmalloc |http://www.freecodecamp.com/zaynmalloc
Peter Andersson
@repeterande
:)
ZaynMalloc
@ZaynMalloc
@repeterande You're welcome!
djangoearnhardt
@djangoearnhardt

@TylerMoeller I’ve tried to figure out what you were advising and I’m just not getting it. Why can’t I put my tweet behavior inside the generate quote function. And use

var tweetQuote = jd.quote;
var tweetAuthor = jd.author;

as local variable for the same two things like this:

$(document).ready(function() {

             $("#button-marg-right").on("click", function(){
                $.getJSON('http://quotes.stormconsultancy.co.uk/random.json', function(jd) {
                  var tweetQuote = jd.quote;
                  var tweetAuthor = jd.author;

                  $('.message').html('');
                   $('.message').append('<p>' + jd.quote + '</p>');
                   $('.author').html('');
                   $('.author').append('<p>- ' + jd.author + '</p>');
                });
                $("#button-marg-left").on("click", function(){

                 $.getJSON('http://quotes.stormconsultancy.co.uk/random.json', function(jd) {
                   var tweetQuote = jd.quote;
                   var tweetAuthor = jd.author;
                   window.open("https://www.twitter.com/intent/tweet?text=" + tweetQuote + tweetAuthor)});
                            });    });   

             });
Ian
@IJACOBS
Anyone else working on the Twitch project and realize that their workaround site to use the API has gone down?
Tyler Moeller
@TylerMoeller

@djangoearnhardt You can put your tweet behavior inside the generate quote function:

$('#button-marg-right').on('click', function () {
  $.getJSON('http://quotes.stormconsultancy.co.uk/random.json', function (jd) {
    var tweetQuote = jd.quote;
    var tweetAuthor = jd.author;

    $('.message').html('');
    $('.message').append('<p>' + jd.quote + '</p>');
    $('.author').html('');
    $('.author').append('<p>- ' + jd.author + '</p>');
    $('#button-marg-left').attr('href', 'https://twitter.com/intent/tweet?text=' + tweetQuote + ' ' + tweetAuthor);
  });
});

There is no need to use a .click handler for the quote button since it is already a <a> in your HTML. When the user clicks, it will go to the URL you specify.

djangoearnhardt
@djangoearnhardt
Wow!!! I’ve been on this for two days… Thank you so much @TylerMoeller. The amount of questions I had moving from the JSON API's section to these challenges in FCC is just so vast.
I see how I was being redundant on that click behavior but never would have put that together :) @TylerMoeller :+1:
Tyler Moeller
@TylerMoeller
@djangoearnhardt No problem. :) There's also no need to clear the contents with .html() and then use .append():
  $.getJSON('http://quotes.stormconsultancy.co.uk/random.json').done(function(jd) {
    var tweetText = encodeURIComponent(jd.quote + ' ' + jd.author);
    $('.message').html('<p>' + jd.quote + '</p>');
    $('.author').html('<p>- ' + jd.author + '</p>');
    $("#button-marg-left").attr("href", 'https://twitter.com/intent/tweet?text=' + tweetText)
  });
djangoearnhardt
@djangoearnhardt
hahah awesome @TylerMoeller , that looks much cleaner. I was just using it because it worked by chance
you’ve definitly brought me a little peace of mind today :clap:
Jonathan Doliver
@porygonj
I'm really stuck with my Tic-Tac-Toe AI. I don't understand why it is mostly only choosing the first space available to it. Any help would be appreciated. http://codepen.io/porygonj/pen/EybYZg?editors=0110
Gaddieshack
@Gaddieshack
Howdy, guys. I'm at building a tribute page. What exactly am I supposed to create? There aren't many evident parameters for the assignment.
At least, not ones that specify what they're looking for when you're making this.
Like, is jQuery required for Building a Tribute Page?
It seems the only things you need to play around with are the HTML basics and Bootstrap.
Amit Patel
@AmitP88
hey guys, I managed to get my modal image right for the first menu item on this website: https://amitp88.github.io/Khmer-Family-Cafe/ but I'm struggling to figure out how to add them to the rest of the menu items when I look at the javascript part
Anicic
@Anicic
Hello world, i'm practicing with bootstrap and responding.I'm trying to use a minimum of CSS, only HTML and bootstrap to reach a goal. Look, and please give a comment!:) https://codepen.io/AnicicZ/pen/NbWJNd
CamperBot
@camperbot

welcome to FreeCodeCamp @Anicic!

kat-mag
@kat-mag
@Anicic Fonts are bit big, that bold-text part doesn't look too pleasant. Just adjust the fonts & give paragraphs some padding and it'll be cool ;)
Gaddieshack
@Gaddieshack
Er...anyone there?
kat-mag
@kat-mag
@Gaddieshack everything you need for that is html & css