These are chat archives for FreeCodeCamp/Help

5th
May 2018
Henry
@GitHub-Henry
May 05 2018 00:17
@thekholm80 i guess the lesson is never say never, :smiley:
Kyle Holm
@thekholm80
May 05 2018 00:19
@GitHub-Henry you got that right lol
I think if I had any desire to be a front end dev someday, i'd still avoid both those tools
Henry
@GitHub-Henry
May 05 2018 00:21
i get the feeling they are tools for backend folks that are forced to do front end stuff
Kyle Holm
@thekholm80
May 05 2018 00:21
seems like a good use-case
Henry
@GitHub-Henry
May 05 2018 00:22
or folks that don't do front end work very often
Norvin Burrus
@ndburrus
May 05 2018 00:25
Henry
@GitHub-Henry
May 05 2018 00:26
@ndburrus might as well get help from the best when working with cookies
Norvin Burrus
@ndburrus
May 05 2018 00:28
@GitHub-Henry ...so true! :cookie:
Kranti Nebhwani
@darkphotonKN
May 05 2018 05:02
guys can anyone kindly check my codepen to see why "display: block" and "display: none" added with javascript dynamically works for my nav (it disappears and appears when I add those styles to my nav) when you resize the screen to more narrow than about 60%, and reappears when resizing the screen larger than that, but the opposite is supposed to happen to a button. I put comments to indicate the part of the code that does this, and you can resize the screen to check the nav appearing and disappearing
the same exact thing was applied to the button but in the opposite order
/* LOOK HERE IT DOESN'T WORK FOR DISPLAYING / HIDING A BUTTON BUT IT WORKS FOR THE NAV */
that's the message i put where the code matters
for css, html, and js
That's the code pen
should go on the actual site so you can resize and check the nav disappearing and appearing but the button doesn't
can also use F12 to view dev console and just resize that to make the screen more narrow and less narrow to check it it's easier that way
simpleguy747
@simpleguy747
May 05 2018 10:17

Hi guys, I was looking at some free json api, and came across https://swapi.co I checked for the request-response, and I get response like this


 {.. "eye_color": "blue",
    "birth_year": "19BBY",
    "gender": "male",
    "homeworld": "https://swapi.co/api/planets/1/",
    "films": [
        "https://swapi.co/api/films/2/",
        "https://swapi.co/api/films/6/",
        "https://swapi.co/api/films/3/",
        "https://swapi.co/api/films/1/",
        "https://swapi.co/api/films/7/"
    ],...}

now the question i am having is, is this a correct way to write api? as if I need any information about films, I need to make another (typically n ) request to get that data. And this would repeat if I need any similar information from films api. Can anybody help me to understand this?

Stephen James
@sjames1958gm
May 05 2018 10:51
@simpleguy747 That is generally the case for REST APIs that you have more than one round trip to get referenced information.
It does cause delays on slower connections. Sometimes they will supply additional URL paths for getting combined information, but not always.
Graphql was invented as a way to avoid this by allowing a single request to include referential information as well
Fernando L. Estuesta
@champolot
May 05 2018 13:05
any one here do angular + firebase?
Norvin Burrus
@ndburrus
May 05 2018 13:24
@champolot ...need tutorials?
Fernando L. Estuesta
@champolot
May 05 2018 13:58
im just curious where or what site should i search for angular-firebase jobs
i do find some that need those skill but they're more in need of seniors
Cristian
@Gainbread_twitter
May 05 2018 14:17
Screenshot_1.png
hello my name is cristian started the colt course about a 3 weeks and having some problems when i put a background image in my "html" file all works good in pc browser ,the problem happen when reach mobile sites the background images does not appear
Screenshot_2.png
the next file is for css
Screenshot_3.png
i really appreciate someone can help me
Ken Haduch
@khaduch
May 05 2018 14:25
@Gainbread_twitter - Hello - I don't think that I've seen a "background-bottom" CSS property? It's hard to work with screenshots, though. Are you actually loading this in a mobile device, or just reducing browser width, etc? Do you have this in a CodePen pen or somewhere that you can link to?
Cristian
@Gainbread_twitter
May 05 2018 14:35
i found the error
well
what is happen is
got my html and my css in the same folder right all good ,but them i send myself and email with both files to my phone
wheni open the html in my hone it does not load the image background
so i use and <style></style > inside of my html to see some how , it both files where not connected ,
and it works loaded the image ,i still does not how to make the page load my image background with separates files any clue ,Thanks to answer
Garrus Napp
@GarrusNapp
May 05 2018 14:58
@Gainbread_twitter background-image: url("image.jpg");
Cristian
@Gainbread_twitter
May 05 2018 14:59
ga @GarrusNapp well
Garrus Napp
@GarrusNapp
May 05 2018 15:00
and that's it, on your phone you need image file in the same folder where css is
Cristian
@Gainbread_twitter
May 05 2018 15:00
the image is external source
is link
is a link
Ene Catalin
@EneCatalin
May 05 2018 15:01
you should probs download it in any actual project
Garrus Napp
@GarrusNapp
May 05 2018 15:02
Ok @Gainbread_twitter so let it be external. But in your code you have just background: url... not background-image
Cristian
@Gainbread_twitter
May 05 2018 15:02
oooo
Garrus Napp
@GarrusNapp
May 05 2018 15:02
You can use background shorthand but look what are the arguments: https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#Background_Properties
first one is color, not background image
Cristian
@Gainbread_twitter
May 05 2018 15:03
but when i use <style> tag in my html load the images in mobile phone ,what does mean any clue
so i put all the css insie my html with stye tag and load the image ""
Garrus Napp
@GarrusNapp
May 05 2018 15:04
you can use <style></style> in html, or you can make a style.css file, and in your css just load it
to load styles that are in separate style you write in <head> <link rel="stylesheet" type="text/css" href="style.css">
Cristian
@Gainbread_twitter
May 05 2018 15:06
thas the deal when i use the css.file with the same code does not load the image
yeah is in the example avobe
Garrus Napp
@GarrusNapp
May 05 2018 15:06
I see, nevertheless change it to be background-image
Cristian
@Gainbread_twitter
May 05 2018 15:06
above
ok
lets try hat
that
no
it does not work
Cristian
@Gainbread_twitter
May 05 2018 15:11
@GarrusNapp to load styles that are in separate style you write in <head> <link rel="stylesheet" type="text/css" href="style.css"> i got this to
but no seems to work nether i reapeat this only happen in mobile sites i sent the files to my phone and dont load the image , in normal browser all runs fine
Garrus Napp
@GarrusNapp
May 05 2018 15:14
That should work, maybe there's an issue with mobile browser
maybe see if it persist when you host it rather than trying to access it locally
Cristian
@Gainbread_twitter
May 05 2018 15:16
yeah thats what i though ,but i guess some how when i sent the files to my phone both files are no connected even if the have the correct tag one it and the proper name
look i gonna sent link to codepen
May Kittens Devour Your Soul
@diomed
May 05 2018 15:27
what means <a href="javascript:;">
sup @diomed
Norvin Burrus
@ndburrus
May 05 2018 18:15
@champolot these may be helpful: :blue_book: