Polishing up Quote Machine

Polishing up Quote Machine
0

#1

Good afternoon,
I would like help on the following.

  1. Layout (when i run it on my computer it is following the css grid rules, however on codepen its not)
  2. jquery animations, having trouble implementing this. would like the quotes to fade in have tried
    $(’#text’).hide().html(a[0].content+ "

    — " + a[0].title + “

    ”).fadeIn(2000);
    and a few other methods but it doesnt seem to be working, all the above just does is delay the quote from coming in for two seconds it doesnt make it fade.
  3. the text animation on top gets cut off if its over a certain length, and only takes up one line. I would like it to continue typing and just push down on the div below.
  4. Implement a logic where if there is no JSON then clicking on the tweet button just sends an alert (‘you need to generate a quote and then you can tweet it, please go back and hit the quote button’)
    I tried to run a logic if(JSON) etc… if(a) etc… nothing worked for me.
  5. I would also like to know if its possible to do more effects with the text i get from the api, svg filters, maybe a splatter effect, or something else cool but maybe im getting ahead of myself. but once I get the first four things on this list squared away i would like to work on that as well.

the project satisfies the requirements and is working but i would just like to polish it up. Also notice that the tweet button does not change into a little hand when hovered over.

Here is the Link:


#2

Can you describe and show an example (i.e. screenshot) of how a specific grid rule is not being followed?

Why not only display the twitter icon if there is a quote displayed? This would avoid the extra alert? Another option is to disable the ability to click on the icon until a quote appears.

Side notes:

  1. Your quote and twitter icons are tiny compared to the rest of the page. I almost did not see them at first. Another reason I did not see them is due to a lack of contrast between the icons’ color and the colors in the background image.
  2. You have the same problem with contrast for the quote text and the background image.

#3

Hello! Do you mean that you need when you open the page, quote doesn’t appear immediately, but in 2-3 seconds?


#4

Ok then what you suggested first is what im going to do, and i like the first option only display twitter if there is a quote displayed im trying to set it up in something like this:

type or paste code here
function myFunction() {
    var x = document.getElementById("myDIV");
    if (x.style.display === "none") {
        x.style.display = "block";
    } else {
        x.style.display = "none";
    }
}

but then i realized that this wont do it because each time I click on the quote button its going to just alternate between hidden and showing and this isnt what we want, because the tweety icon needs to be always showing up, but only after the quote button has been clicked once, so is there a way to do something similar to the above but only run it one time?

or should i do something like this?

$("#hide").click(function(){
$("p").hide();
    });

#5

This is going to be the inspire quotes app design on the top left is the quote (refresh) button to the right is the instructional text to the user on how to use the app, it runs on load and will be typed out
once the user hits the quote button a quote will show as well as the option to tweet it out and also a facebook share button,
I need to check if facebook has something similar:

https://twitter.com/intent/tweet?

instead of a picture would it work with a full background video? and apply an @media width to switch it back to a photo background?
Is there a way to keep the full width video background reguardless of screensize?

in thinking about what this app is doing:
the encodeURI component takes the string from the JSON and makes it viable to be used in a link without any spaces etc… and because it is a link that can be seen in a browser twitter must be accessing global $_GET variable
however they arent submitting it on their side storing it or doing any database operations w it because it is only printed out to the screen in text that the user sees and can edit, because if he closes the browser then the data that was on the screen at that time is gone.

another thing interesting to note:
there used to be a way to prepopulate certain forms:
//https://www.youtube.com/watch?v=yKyOcjYsFE0
There are alot of these tutorials showing similar examples, however none of this is currently accurate information as I was unable to replicate submitting such a prepopulated form to google.
so does this mean google just changed their method from accessing $_GET to $_POST instead?
this would be in order to prevent everyone from ‘gating’ reviews of their buisness.


#6

update:
close to solving it but not quite yet,
I put the tweety in a span element and set to hide by default in style like so:

#show{ display: none; }

Having a slight trouble with the jquery if someone can assist i have this but its not correct:

type or paste code here
 $('#show').show(function(){
    $('#new-quote').on('click');
  });

#7

update:
solved the problem of the displaying the tweety only after the quote button is clicked as randall said to do here is the solution for anyone that wants to see:


#8

Can you provide a current list of items with which you are still needing help? I just want to confirm before reviewing the current code and responding

Thank you.


#9

One of the problems I am having is applying jquery animation effects to the recieved json data.

What i mean is that I see that the methods are manipulating the text however its not doing what i want.