[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

This is a dumb question, so probs ignore it. I don't know

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 1

File: OP.jpg (13KB, 396x354px) Image search: [Google]
OP.jpg
13KB, 396x354px
This is a dumb question, so probs ignore it.

I don't know shit about webdev. Like, at one point I knew HTML, but that was before HTML5 and all this new stuff.

Where would I go if I wanted a (hopefully somewhat quick) assist with taking some JS animation snippet I found, and cramming it into an existing HTML sheet for livestream overlay thing?

Like, is there a place to post dumb shit like this on the internet and hope someone helps?
>>
>>59426169
>This is a dumb question, so probs ignore it
Okay
>>
>>59426169
What's the JS animation snippet, post it
>>
>>59426222
Not sure if this will format properly.

#banner {
border-radius: 50%;
width: 150px;
height: 150px;
background: #000;
overflow: hidden;
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
position: relative;
}

#banner .fill {
transform: translateY(150px);
animation-name: fillAction;
animation-iteration-count: 1;
animation-timing-function: cubic-bezier(.2, .6, .8, .4);
animation-duration: 4s;
animation-fill-mode: forwards;
animation-delay: 0.25s;
}

#banner .pour {
width: 6px;
position: absolute;
left: 50%;
margin-left: -3px;
bottom: 0;
top: 0;
background: #009ae6;
animation-name: pourAction;
animation-timing-function: linear;
animation-duration: 0.25s;
}

#banner #waveShape {
animation-name: waveAction;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-duration: 0.5s;
width: 300px;
height: 150px;
fill: #04ACFF;
}

@keyframes pourAction {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}

@keyframes fillAction {
0% {
transform: translateY(150px);
}
100% {
transform: translateY(-5px);
}
}

@keyframes waveAction {
0% {
transform: translate(-150px, 0);
}
100% {
transform: translate(0, 0);
}
}


<div id="banner">
<div class="pour"></div>
<div class="fill">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="300px" height="300px" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
<path fill="#04ACFF" id="waveShape" d="M300,300V2.5c0,0-0.6-0.1-1.1-0.1c0,0-25.5-2.3-40.5-2.4c-15,0-40.6,2.4-40.6,2.4
c-12.3,1.1-30.3,1.8-31.9,1.9c-2-0.1-19.7-0.8-32-1.9c0,0-25.8-2.3-40.8-2.4c-15,0-40.8,2.4-40.8,2.4c-12.3,1.1-30.4,1.8-32,1.9
c-2-0.1-20-0.8-32.2-1.9c0,0-3.1-0.3-8.1-0.7V300H300z" />
</svg>
</div>
</div>

>>
>>59426258
That's not even JS, that's CSS

So what do you want with it? CSS part goes into style tags and HTML goes where HTML goes.

I don't know what HTML sheets for livestreams look like so I can't help you there.
>>
>>59426169
>>59413636
>>59413636
>>
>>59426258
Never realized how easy this looks compared to some of the other shit these gtards post. I'm kinda interested now
>>
>>59426315
I am seriously behind the times on what CSS can do then.

Basically, what I've got is a donation bar from a web-based toolkit. When someone donates, the bar fills up. The actual data is sent by the site obvs, and the bar itself, and presumably it's animation, is styled with HTML and CSS. I have copies of both of those;

HTML: http://pastebin.com/raw/1fpEcwSK
CSS: http://pastebin.com/raw/itS1QHJr

All I want to do is make it so when that bar needs to animate, it uses the animation from the snippet.

Now, presumably, this would involve re-fitting the CSS from the snippet to match the classes in the existing sheet because I don't actually know if the element itself can have it's tags/structure freely changed and still work, since I don't know what will break what.
>>
>>59426432
I am aware I sound like a fuckin' retard, but I'm a chef and an illustrator, I never actually learned any of this stuff.
>>
>>59426444
I'll have a look at those pastebins in a moment unless someone else replies to you, just wait till I get to work.
>>
w3schools.com is a good source for learning HTML, JavaScript, and other languages. I don't know if it will teach you what you're specifically looking for, but it's still worth checking out.
>>
>>59426796
I know the site and it's tutorials.

This was more of a "This is gonna take a long-ass time to study up on to figure out, and I want to get this done by the weekend" kinda thing.
>>
>>59426497
I'm here

>>59426444
Oh, so you want it slowly filling up as people are donating.

You can't just take this what you've found and change few classes to have it work the way you want. What you found is timed and animation will execute in given time and that's it. You'll need to change quite a few things.

I'm not going to write this out for you because I have other things to do at work, you'll have to do this on your own or find someone else.

You've got an AJAX request that fetches to get your donation goal
$.ajax({
type: "GET",
dataType: "json",
crossDomain: true,
url: "/api/donation_goal/" + window.channel
}


This line calculates the donation progress in percentage.
donationPercent = Math.floor((donationProgress / donationGoal) * 100) || 0;


You can leave that as is and you can do that to set height on how filled your little circle is.
>>
If only there was a thread for dumb questions
Thread posts: 14
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.