/wdg/ - Web Development General

Previous
>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtube.com/watch?v=Zftx68K-1D4

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS

>PHP resources
pastebin.com/gfBPg24A

Attached: emulator.png (663x681, 124K)

Other urls found in this thread:

github.com/ekussberg/simple-credits
systemspace.link/
youtube.com/watch?v=QY7Rj8aZcZk
pastebin.com/gfBPg24A
training.sensiolabs.com/en/
techcrunch.com/2013/12/18/sensiolabs-raises-6-9-million-to-implement-its-php-framework-symfony-everywhere/
xahlee.info/js/html_index.html
github.com/facebook/react/issues/13604
javascript.info/
php.net/manual/en/function.chdir.php
circleid.com/posts/20180904_internet_traffic_slowed_for_video_apps_by_wireless_carriers/
binji.github.io/binjgb/
getuikit.com/
youtube.com/channel/UC7TizprGknbDalbHplROtag
youtu.be/0Gr1XSyxZy0?t=8m28s
blog.scottlogic.com/2017/12/13/chip8-emulator-webassembly-rust.html
twitter.com/SFWRedditVideos

i used the react tutorial on their site to start learning it. finished the tut and decided to move it out of codepen bullshit to work on it in my machine, but i cant seem to figure out why i cant do it. am i retarded and is there something i missed?

yeah im retarded. its right in the tutorial

Heyo, any good angular ressources or tutorials you'd recommend?

Yeah I got this resource right here: dont use angular

This

Tell that to my boss. Also if you wanna dev webapps there's not much better than angular. once it's compiler, this shit is very lightweight.

>github.com/ekussberg/simple-credits
i'm about to go start soliciting bids to add the option for two virtual currencies instead of one to this script.
the original dev is too busy with his actual jobs to do it.
two currencies, so users buy the first currency with real money and spend it, and other users accumulate the second currency, then cash out.
no, it's not a casino. it's going to be a google answers clone.
if anyone can tell me how much i should expect to pay for this, or if i can manage to learn enough php editing in a week or so to do it, that would be awesome. assume i am a reasonably bright 15 year old who did way too much cocaine for a while.

>someone asks a question
>they don't even understand what's going on because they only understand how to npm-install and do whatever the module says
>even when the solution is a simple bit of javascript they just don't get it and complain about the plugin

absolute state etc

How are your websites doing, gentleman?

Attached: __5665.jpg (1629x898, 219K)

Can i make pretty, modern looking website with pure HTML/CSS/some JS for scripting. For example something like that
systemspace.link/
view-source:systemspace.link/
Where do i find resources for this skill and taste?

*?

alright

have patience brosky, this general is slow

Yes you can, check OP for links on getting started.
>taste
that looks like garbage but ok

tricks he uses:
preloader: idk how u do that tbhfam
cursor: that should be easy
animated-background: just use a an animated gif as bg
clip-path: you'll have to digg here
animate section: just the animate function in css
embeded music: shouldn't be hard
all I can see

pretty cool website, saving that one

Attached: fukkensaved.png (240x225, 63K)

oh and parallax:
you can use one of the "plugins" for iit floating in the web, but what he did was add even listener scroll scroll the same background-position-y, never mind, he just used background-position:fixed on the bg and have a regular img on top of it for increased parallax effect

on clip-path:
youtube.com/watch?v=QY7Rj8aZcZk

>>PHP resources
>pastebin.com/gfBPg24A

as usual, here to answer PHP Questions.

WordPress guy wanted to get better at modern PHP so I am getting into Symfony (I still want to continue doing WordPress).

Is KnP University the best resource?

it tanks my cpu like shit

no, the best resource is symfony creators, SensioLabs.

training.sensiolabs.com/en/

How do we stop boomers creating more ugly dysfunctional websites like

how do I align this nav properly/bottom right?

Not the toughest code to be tired about but i'm kinda am ;)

Attached: t2.png (1280x1024, 239K)

I think something like position:relative and bottom:0px right:0px might do the trick

you place it at the bottom of all the divs

Thanks but I'm not ready to pay the price of a car in a framework training. Seems great though.

it wasn't cheap tho

techcrunch.com/2013/12/18/sensiolabs-raises-6-9-million-to-implement-its-php-framework-symfony-everywhere/

you are not thinking right, divs are like squares that take all horizontal space by default, and the height of it's content. Imagine you add a new line to your page, that's a new div, if you paint it you'd have like multiple lines one above the other, the new ones, go on the bottom, if they have content they are squares, or if you give them a height. that's why if you place the div at the bottom it will be at the bottom.
So one way to put your fdiv at the bottom would be div container (contains all the divs with content) height calc (1vh -" height of the nav in pixels") that way you wouldn't need to place the nav in in position relative fixed or other thing

another way is to set the position of the nav as fixed and bottom 0 right or left 0 it will stay at the bottom of the page no mattter what

React is dying.

oh no

what's the next best thing?

or do we have to stick with old technologies?

Attached: 1536578586889s.jpg (250x250, 10K)

kys zoomer

why, what's it's successor?

vue.js

It's basically modern knockout.js which had been superior to these massive frameworks imo due to its simplicity, and therefore maintainability.

Its usefulness increases due to the number of web APIs blowing up as well. Nobody wants to manage a full fledged framework with native APIs that are used simply outside of them

How long does it take for someone with programming knowledge to learn HTML and CSS good enough for a web job?
And is xahlee.info/js/html_index.html a good source ?

That resource looks to be enough desu. HTML isn't really hard, it just clusters groups of elements together. CSS is the tricky bit, so would recommend focusing more time on that. Maybe research on sass as well as that is popular so might be a requirement

github.com/facebook/react/issues/13604

not this shit again

It's a sad situation if you boss hired you for angular stuff and didn't give you resources.
You didn't lie on your resume, right user?
Because no decent boss would leave a newbie alone without resource to get on the saddle.

No, that looks absolute garbage.
Use javascript.info/ instead if you seriously want to do this.

10 unique visitors a day.
I denied every robots and didn't SEO on purpose.
My three share paltforms are infringing every copyright law available and have only word of mouth spread. Music, books and misc.

Retard here. I need to call a wordpress shortcode with a AJAX.
function showProduct(id){
jQuery.ajax({
url: '/wp-content/themes/chap-child/single-product-modal.php',
type: 'post',
data: {'id': id},
success: function(response) {jQuery(".product-popup").html(response);},
});


and the very basic PHP file that doesnt work

nice resource, why let instead of var though?

First of all, haven't done WP/WC in a long while, but have you checked that do_shortcode has been declared? It should be, but some trickery might be preventing it, or maybe the shortcode product_page hadn't been declared yet

>Sure, sounds good.

traineeship, I'm still very young. My coworkers are trying to help me but they're all very busy with their own work so I'm kind of on my own rn.

Doesn't seem to make a difference if I include the shortcodes.php file or not.

The only bad thing about that site is that it uses let by default, which is wrong. You shoud use const by default and use let only when your linter is telling you that you should be using let.
Noone uses var now

What I mean to say is does it error if you called do_shortcode?

Can you visit the ajax page manually to see what is precisely returned? Doing that as well might be an easier way to debug

>use let only when your linter is telling you that you should be using let
what's a linter, how does it tell you that you should be using let?

>does it error if you called do_shortcode?
Yes, the error is
>undefined function do_shortcode()
Which I thought the 'include' might fix, but im stumped.

>Can you visit the ajax page manually to see what is precisely returned? Doing that as well might be an easier way to debug
The ajax call returns a full product page composed of HTML. The actual return statement is
return '' . ob_get_clean() . '';

and I have no idea where ob_get_clean() leads, but it returns a bunch of HTML.

is web development a good career that I can do for the next 20-30 years and retire or would I get fired or outsourced for cheap labor from India?

>undefined
Yeah, looking online, looks like that's normal, not sure how I did it, but 1 search did show putting the functions in admin-ajax.php. Alternaitvely, if you have some other 3rd-party libs (maybe WooCommerce too), see if they use any ajax so you can see how to tie it in. Sorry I can't provide much more. WP is generally a bitch to work with

Yes. Just don't use Java if you dont want to be outsourced, and make sure to keep up to date with JS if you want to keep a job for the few decades

Ask them for resources, not Jow Forums. Report back. Traineeship is meant to be supervised by the team you're a part of.

>Just don't use Java
what's a good language that won't get outsourced?

It seems like wp doesnt like me using
include('/wp-includes/shortcodes.php');
and prefers
include('../../../../wp-includes/shortcodes.php');
Which fixed the undefined error. thanks for the help

I've been hopping around doing python and that isn't being outsourced. Straight JS doesn't seem to be outsourced too

thx
>../../../../
how did you find out?

By JS do you mean Java Script?

>how did you find out?
you just have to find the directory where shortcodes.php is at.

a quick find in the terminal is enough to reveal the location

Java (Javascript)

>how did you find out?
Googled the error, found out that PHP needs the exact path. Turns out that php file didnt fix the problem I was having anyway, now its just showing the shortcode on the page without actually getting the content from it.

Attached: JUST.png (212x86, 3K)

Yes

I'm guessing the shortcode wasn't loaded due to WC not being instantiated. So many things seem to not be instantiated considering do_shortcode is core to WP and hadn to be included. There must be a proper way to get everything declared. I think best way is really to see how other libs do it. AFAIK WC must have some ajax functionality in one of its pages. Maybe just do a search across WC files for ajax

How do I make it so that Webpack doesn't bundle up everything in my node_modules folder but it also doesn't NOT include require so I don't always get an error stating that 'require is not defined'

1) work with flex/justify-content/align-items
2) work with absolute positioning
3) use margin auto or float

Anyone here familiar with woocommerce? Is there a template I could call via AJAX that would return a product if provided the product ID?

S Q L I N J E C T I O N

>?id=51' aaaaaaaaaa ] /* he */ [

use

require_once __DIR__ . '/../../../../wp-includes/shortcodes.php');

or :


chdir(__DIR__ . '/../../../../'); // change the current working directory [ see : php.net/manual/en/function.chdir.php ]

require_once __DIR__ . '/wp-includes/shortcodes.php';

Why is WebAssembly so based?

Attached: LA.png (1520x798, 22K)

whats this

Legend of Zelda: Link's Awakening, playing natively on the browser

Its happening. Americans are about to get cucked due to their net neutrality is gommunism retardation.

circleid.com/posts/20180904_internet_traffic_slowed_for_video_apps_by_wireless_carriers/

post the url faggot

thought I did faggot, my bad:
binji.github.io/binjgb/

You need to use your own ROM files as usual

>expects people to have their own ROMS
damn

legalities my man

But yeah it sucks, I was planning on doing the same thing, allowing everyone to play their favourite games, then I realised this

i used to play Zelda: Ocarina of time in my Nintendo 64

shit was so cash

VueJS is pure hype

Quints of justice. I know that feel, all the zelda games you can emulate are cash

>have to use !important on everything because material UI fucking sucks dick and FUCK using css in js

Is Greensock still the best animation library for JS or are there better now? I'm reading some Top 10 animation libraries on some sites and they point out to shit like Three js or Anime js

>using css frameworks

Attached: 2340982068346.png (500x422, 73K)

Stop shitting up /wdg/ with your shitty propaganda, netflix shill.

Attached: wow_its_fucking_nothing.png (620x1053, 163K)

>Re-inventing the wheel
This is why you don't have a job, and I know you don't have a job since you're the "muh vanilla, built from scratch everything" type.

not when it comes to CSS tho, i use a CSS framework sometimes, but i enjoy writing CSS myself, its easy and everything is there.

i once made my CSS framework using php as a per-processor, it generated a CSS file with all 'color-{color}' classes, 'background-color-{color}' classes, 'padding-{size}', 'margin-{size}', 'width-{size}' ( using grid ), 'font-size-{size}', ... etc
and it worked fine, took me about 15 mins to write.
with flex and grid available i don't see the need for a CSS framework, unless you want the shiny stuff like cards, buttons, shadows and all that .

my favorite CSS framework is UIKit so far, its dead simple and just amazing
getuikit.com/

the reason i started liking CSS was this channel by mozilla, their videos are simply amazing : youtube.com/channel/UC7TizprGknbDalbHplROtag

also : youtu.be/0Gr1XSyxZy0?t=8m28s

>installing a small node.js package requires you to download Visual C++
is there a lightweight framework for learning and testing?

i'm making a website using the facebook's api, at this moment, it automaticly publish in the groups you're member of.

Would it be ok for my portfolio? or employeers won't even care about it?

because, i'm only sending info to an url... nothing "important".

Attached: fb_icon_325x325.png (325x325, 5K)

Learn the specificity of css selectors.
You can override fairly easily but only if you know the right ways to select the thing you want to overwrite.

put it in your GitHub

I don't know much about web dev, I am more of a /dpt/ kind of person.
I notice that many websites rely on ajax.googleapis, particularly for jquery.
Why do they not host the library themselves, instead of relying on google?
Especially since jquery is advertised to be a small library.

I really see no difficulty in taking the source code of jquery, giving it to your server and then importing the script with all the definitions.

Attached: 1376701962752.jpg (634x411, 60K)

can't you just inspect and automatically generate selectors?

Have you got a link to the site you’ve got in the OP pic?

user is trying to override styles built in to MaterialUI.

There is a hierarchy of selector tags that govern how specific the selection is. The most specific selector will override the less specific ones.
It's not about selecting the element, it's about selecting it more specifically than MaterialUI already is.

google the words you see in the image , newfriend

blog.scottlogic.com/2017/12/13/chip8-emulator-webassembly-rust.html

then why the fuck are you using materialUI?
either work with it or don't use any goddamn framework at all. make your own classes nigga

So I was trying to figure out how the js console seemed to have object names that did not match any of:

let obj = $('.thing');

obj[Symbol.toStringTag] // not this
obj.constructor.name // not this either
obj.toString() // not this
Object.prototype.toString.call(obj) // not this
Object.getPrototypeOf(obj).constructor.name // not this


Basically, I cannot find out how to get the n.fn.init(1) that the developer console always reports.

I did eventually figure out how to reproduce the object names.
[see picture] (why is this retardation a thing?)

But my question is:

How do I programatically pull that information back out? How can I get the same object name that the developer tools console provides?

Attached: Screenshot from 2018-09-10 20-47-52.png (1130x441, 46K)

TL;DR picture attached
(function test(){
let a = {};
a.b = {};
let d = a.b.c = function(){ return this; };
return new d();
})();


Apparently double assignment can give an object a name. (even when the constructor/prototype does not have a name)

Attached: Screenshot from 2018-09-10 20-58-58.png (361x115, 7K)

Is there a nice way to point out that one of your coworkers is being way too careless when it comes to coding?

Most of the errors this person runs into is being of spelling errors, too much copy-and-pasting, using [] instead of {} and vice-versa, and just not having an overall understanding of how Javascript works. No matter how many times these mistakes happens, there's never any improvement, either. It's super frustrating when questions are brought up when the answer is normally "Just use your fucking IDE for what it's made for."