3:36
you click on the the leftmost column which here is a number okay um it opens
3:43
basically like kind of like an accordion right but if you click anywhere else um
3:49
it's going to open up a link to a different page okay so kind of two different
3:55
actions here and um yeah we really use an accordion because
4:03
accordion um basically this entire bar here is a link right and uh so yeah
4:10
that's a tough one so how can we get around that another thing so first we're going to
4:16
build this kind of statically and we're going to we're going to see how what Stacks we could do um and then we're
4:22
going to try to get it working in blog or feeds right so that we can uh have
4:29
multiple choic and because sometimes building something statically is cool and then when you try
4:34
to make it work inside feeds or blog you hit some roadblocks so um we're
4:40
going to try to graduate and do both today okay all right
4:47
so um we're going to open up Stacks classic here okay good old Stacks
4:53
classic and uh we're going to do a brand spanking new project okay open stack
5:27
page someone's saying that my screen flickering again uh I literally some weeks it happens
5:35
some weeks it doesn't I haven't changed a damn thing about my setup um so I
5:40
don't know one day I will I will attempt to uh to replicate it and figure it out
5:47
I tried to go back and watch the recordings of the live streams and they're good so I don't know don't know
5:54
what it is um so if you're getting the flashy thing sorry
6:02
um okay so let's go ahead and start this page we're going to do site Styles we're
6:07
just going to Chuck it up there I like to just throw on Chuck here we'll do uh
6:13
make it minimalistic site style so we can add some stuff into it maybe okay um let's just quickly build in
6:22
we're going to do in this
6:28
and to uh two column layout right and I'm just going to build this kind of
6:34
very statically okay um first off there's two things that I have ideas
6:40
that we can do okay um first off actually I'm curious like so accordion is obviously what we want right is there
6:46
anything we can do in accordion so let's let's just quickly build this out with accordion now I'm not going to try to mimic that exact layout with the images
6:53
and the exact text or whatnot we're just going of do going to wing it okay we're
6:58
going to wing it as we normally do makes it a little bit faster to wing it a little bit sometimes all right so we got
7:04
an accordion right and it just as content let's just add some text in there okay where's my
7:11
pink ones there it is right um so here we have an accordion
7:18
right um accordion drops down and that entire
7:26
doohickey technical term there that entire thing is a big old
7:34
button but can we make it link out curious just just for fun right I'm
7:43
going to go ahead and um put in I'm going to type in some HTML into here
7:49
right just for fun just to see how what happens okay um
7:59
all right we're just going to link to video Pro
8:08
um I have no clue if that's going to work all right let's see um preview that
8:15
oh no oh it's because this is a link unto itself I
8:20
believe and yes and you can't have links inside links so I that doesn't work
8:26
that's too bad right that's question is answered so accordion
8:31
is definitely out we can't have a link inside of a link it ain't going to happen
8:40
okay oh when I'm not facing it you guys don't hear here let me see if I can change the direction of a mic so it's
8:46
always in front of me sometimes I kind of have it off to the side okay so here hopefully that's better uh kind of makes
8:53
it so I can't see my screen too good sometimes but okay um hopefully that
8:58
will fix the directional mic issues um right so we're going to build
9:04
in a two column layout okay and um over here we're just
9:10
going to go ahead and add in a
9:16
um we're going to add a button you need a button do I have
9:25
a no all right we're going to do a button and um and we're going to do like the number one in there okay and uh
9:34
let's let's at least make it a little circle like he had in his layout that could be we we'll do some some stuff
9:39
here so okay uh we're going to add a class here let's just make it like uh
9:44
round uh Circle button Circle dash button okay uh so I
9:52
got a circle button class we're going to go ahead and add border radius
10:05
all right uh we're going to add NOP my border rate you know I need to I I think I'm going to rename this rounding Swatch
10:10
probably in at least maybe not now but in the next version because technically it's not rounding it's called border
10:16
radius right and it is one of the few things that I don't call it exactly what
10:22
it is um in real in real life right so it kind of drives me nuts that I call it
10:27
rounding but okay um so we're going to do Circle uh we're going to do uh
10:34
percentage uh 50% okay so um that makes it that makes
10:40
it sort of round but it makes this it makes it oblong if you notice it's not perfect right and that's because it's
10:47
not a perfect square in order to make a perfect circle you need to start with a perfect square okay so um what we need
10:55
to do is we just going to use aspect ratio uh we're going to do voila and
11:00
we're going to make it 1 by one which is a square okay and that
11:06
[Music] should doesn't look like a square here but it should that should do it let's
11:11
let's have a look that's a perfect square score okay sweet I should okay perfect square
11:21
now um we're going to do is in this two column I'm going to make um we want the First Column to basically shrink to
11:27
content because I just want that First Column to be just the button and that's it
11:33
okay um so let's go ahead and uh we're going to go shrink to content on column
11:39
one and always shrink to content even on M okay and then over here um this is
11:45
where we're going to add in our oh column two is going to be Auto so column two is going to be Auto um and that's
11:52
just going to eat up the rest of the uh the space okay and let's add a little bit of gutters because it's always fun
11:57
to have gutters okay um that's a lot of gutter but that's okay uh maybe we don't
12:02
need so much um gutter there there just ver just horizontal Gutter and padding
12:09
um and then we're going to add in um I'm just going to add in a header into here okay and uh uh we'll be born we'll say
12:16
this is um this is my header sure whatever okay um let's preview that
12:23
voila so that's quite a bit of of padding let's just go ahead and reduce that a little bit all right a little bit
12:29
closer there we go right so basically I need to replicate this okay and I want
12:34
this to open up something below and I need this to be a link to something outside right right so we'll start off
12:42
the easy part is the link right this is just a link so we're going to add a link to here and
12:51
um all right so this has a link okay and uh actually let's let's go ahead and
12:59
another thing I'm going to do is uh we're going to add in
13:05
a just to kind of um make this so what do we want to do
13:13
let's go ahead and I'm going to add some padding onto this just to just to bring it down the page a little bit I'm just going to do
13:19
py 48 okay just bring it down and then um in here we're going to
13:27
have ah let's let's not worry about styling right now uh but we want some okay um all right let's just do I'm
13:34
going to multiple of these right let's do quite a few I'm just going to copy paste okay there we go now let's add
13:41
some different uh some differentation to them or however the hell you want to say that right another thing want to do is
13:48
uh let's do actually you know what could be fun
13:55
is um I'm going to go ahead and do column
14:00
two no I don't want it to be shrink content n that would be stupid never mind never mind that okay um but let's
14:08
add a little bit of color to this so we're going to do uh BG
14:14
secondary okay uh that look okay it's okay all right um here let's go ahead
14:22
and uh if you notice in here like it's kind of funky it's got some it's not really like centered so what we want to
14:27
do is uh we want to add in uh or we want to remove the bottom border bottom
14:33
margins so we're going to remove the bottom margin on that and remove the bottom margin on that okay and voila
14:40
okay so we're getting we're getting close okay here um I if you noticed the um this text is not perfectly Center
14:47
aligned with that button okay so what we want to do is we're going to go into vertical alignment set that to Middle
14:54
okay and voila now that text is vertically aligned with uh the button
15:00
right now obviously this is very small so what we can do is um uh we can add a little bit of
15:08
padding there we go sweet I like that so I have a little bit of padding all the way around this text is perfectly
15:15
aligned with his button um if we preview this in the browser um this should link
15:20
to a web page perfect that's the easy part right okay um now let's go ahead
15:28
and we're going to uh when we click this button it should do something okay so um
15:34
I'm going to go ahead and add in let's add in a container here and um I'm just going to add some
15:41
text okay um and let's make the
15:49
container um right let's go ahead and do uh BG secondary on that as well right
15:56
and we're just going to add some text into it okay oops and let's see see they're not
16:03
lining up that's because over here uh I just want this to be
16:08
sizing I don't want any gutter so you could either do sight width full width or Auto no wrapper I'm just going to do
16:14
auto no wrapper on that bad boy and that didn't do what I wanted it
16:20
to do what happened
16:32
that's odd why is
16:38
that
16:44
what oh it's because I should I should be using a one column on that okay instead yeah instead of a container I
16:49
can use a one column that way that we have the same like same gutter logic going on okay one column that should oh
16:58
wait but we need to add BG
17:10
secondary what what's going on
17:17
here there we go okay so now we're all matched up probably an easier way to do that would be to be oops to be honest
17:24
would be what you do is if you instead of trying to line up background colors what you do is you put both of these
17:29
inside of a container that then has um a background right so basically then
17:36
that's better I was trying to not have to put an extra stack on the page but it
17:41
is the better way to do it so now now they're both BG secondary right
17:48
now they're it's going to be perfectly lined up all the time because they're all because these fill up the same exact
17:53
thing okay um but what I want to do is I now want to uh show and hide this one
18:00
column when I click on this number one okay so how are we going to do
18:07
that first off we're going to use um we're going to try to stay inside
18:12
Foundation 6 we're going to use a Toggler okay um so let's do
18:19
um I'm just going to call this show hide okay um I think that makes sense right
18:25
so when I click on this button I need to um add or remove this basically the show
18:32
hiide class or yeah okay
18:39
um right let's do that so let's go ahead in I think it's in components we're
18:44
going to put a where is it here where is
18:51
it Toggler
18:56
okay wonder if you could do animate click as well
19:03
H you could animate no no this animates
19:09
this thing you click that's not what we want all right we want to use Toggler um now I know Toggler sometimes
19:15
can be confusing to some people okay um so let's Analyze This
19:22
okay um so we we have multiple things
19:29
okay this particular um there's three different classes that
19:34
we need to be aware of okay the first is this is going to be uh what we want to
19:42
add or remove a class on okay so that's actually um let's let's call this a show
19:49
hiide um container or content okay all right so um this is
19:56
going to be show hiide content this is going to be a
20:02
show hide trigger okay just so we know so we have
20:08
this oops did I shoot I deleted my my other class by accident I need that to
20:13
be Circle dash button all right so this one is the show hide trigger this is the
20:21
show hide content so those are two specific things that we need okay so up
20:26
here we're going to do show hi High content okay and then um we we we're
20:33
going to skip this toggle class for right now and then this is the um trigger class say so this is going to be
20:40
show hide trigger this is what what we're going to use to trigger the
20:48
toggle okay and we want to trigger it on click
20:54
okay so basically what this do is going to say is um let's actually preview this and whenever I click this button okay it
21:01
should toggle on and off oops um this toggle class on this trigger on this col
21:09
one column because it's the show hide content does that make sense okay so
21:14
when we click on this trigger it's going to take this class and if it's there
21:21
it's going to remove it and if it's if it's not there it's going to add it to this okay just to so we can see that in
21:29
action we're going to preview this in the browser okay and uh this is really
21:35
big let's go ahead and make this a little smaller
21:42
but come on there we go and we're going to open up the inspector I'm going to click on this number one right now I I
21:49
haven't added any animations yet I just want to show you what this is doing let's find um in the code
21:56
here make a little bit bigger for you to see uh let's find that show hide here
22:03
okay show hide content okay now if you notice it has the toggle classes because I clicked that button okay I'm going to
22:09
go ahead and click this again if you notice that class is removed so I click on the trigger that class that toggle
22:17
class is there and then when I click on it again it's removed just adding and removing the
22:24
class that's all that that swatch does okay seems simple Le but super
22:30
powerful okay so um what we want to do is uh I
22:38
want to toggle the show hiide class okay so we're going to we're going to do a
22:43
toggle show hi High okay um so now what we're gon to do is we're going to add
22:49
and remove styles from um from the content okay so um if
22:55
something has the show hide class and actually what I want to do is um we
23:01
going to go ahead and add in a for fun just for now I'm going to do
23:08
something simple I'm just going to do um a display Swatch and um if something has show hide okay I want to hide it okay so
23:17
uh we're going to go ahead and do um display
23:23
none okay so let's go ahead and preview that so now when I click on this
23:29
it hides it when I click on it again it shows it pretty
23:35
simple that's it okay um but we can go better right I
23:41
mean we want to get a little fancy now that this this makes a very basic thing work very easily okay but now let's take
23:48
it up a notch and we want to uh when we click on this button we want that to
23:53
like grow right we want to just kind of like an accordion would do okay okay
24:00
so um unfortunately um we need to ditch this display Swatch to do that okay we
24:06
need we we need to go a little bit more in depth okay um
24:13
and something that probably isn't apparent but the display attribute
24:19
basically hiding and showing something isn't animatable if that's a word okay you
24:25
cannot animate that with with CSS okay or with you can't animate that at
24:31
all okay um either shows or hides that's it boom boom that's it um so we need to
24:38
do something different in order to animate this and if we want it to like grow and hide what are we changing right
24:46
well we're changing the height okay
24:51
so um what we can do is
24:58
we can make uh what I'm going to do is I'm gonna add in by default I want this to
25:05
be hidden okay so what I'm going to do here is uh I'm going to on show hiide
25:12
content I'm going to go and add in a height Swatch because we want this to grow and Shrink okay
25:21
and uh we going to do is we're going to go ahead and by default on the page now
25:28
this is something that that probably isn't apparent okay now we could go ahead and and um actually let's do this
25:35
first I'm going to make this a height of zero okay so show height content has a
25:40
height of Zero by default so you see on the page it's zero we can't see it
25:46
effectively the same thing as display none has a height of zero okay and um
25:52
what we're going to do then is we're going to add in another Swatch okay and
25:57
what we're going to do is um if it's show hide content or if it's just show uh yeah show
26:06
hide right um I probably should have picked a different class than that um
26:12
let's I'm going to change this I'm G to I'm going to set this to be open okay
26:21
um actually here let's just do sh- open so that I you know maybe open is used
26:27
somewhere else so let's make it kind of specific so we're going to do sh open now okay um and if on so show high con
26:36
we want this to be height zero and if it has an sh open
26:45
class okay that has an sh open class uh we want that height to be something
26:52
different now the the problem is here um we can do height Auto right which which
26:58
means uh cuz maybe we don't know the height of that content right so we could set it to be like a height of 256 but
27:06
what happens if um if we don't know what that is so let's make sure that that works okay so now but if you look here
27:13
there's there's some empty space here it's because we've made this a static content area right I mean it's static
27:19
height so if I were to have let's say two text content areas in here okay now if I click on that look it gets cut off
27:27
right so that doesn't make sense okay so um what can we do okay again as I said
27:33
let's try height Auto okay um and let's go like this hey
27:40
that's not bad but this isn't animating yet okay um so how can we animate
27:48
this um so what we can do is uh to animate things a simple way if you've
27:55
probably known is something called a transition okay and uh
28:02
transition where is there it is down here okay um and we're going to put a transition on show hiide
28:09
content and the reason we want it on show hiide content is and not sh open is because the sh open class isn't always
28:17
there okay um so show hiide content is always going to be there okay so we're
28:22
going to do that um and you can specify specific property or you can just use the default of all okay and um yeah so
28:29
now we're just gonna uh we're gonna this is going to animate all properties over one second let's uh preview
28:37
that wait that didn't work Joe now I knew this wasn't going to work okay um
28:43
and again this is just an experience thing as well okay um is that you
28:50
cannot um animate something to a height of Auto you can only animate it to a
28:56
specific height so let's change this back to 256 okay just to show you I go and click on that
29:04
oo okay but it's still cutting off the content what the heck man okay um so we
29:11
need to we're close we're getting there okay but we need to go a little bit
29:18
farther okay so um essentially what we're going to use we're we are not
29:23
going to use height right so I'm I'm not gonna I'm not going to use height at all and what
29:30
we're going to do is we're going to use max height okay so by default I want the
29:37
maximum height to be zero pixels okay then when it's open okay I
29:45
want to set the maximum height now here you can only go up to 256 again Joe what the heck um let's try actually I haven't
29:51
tried this let's try fit content that's interesting um I don't know if that's
29:56
animatable right so so let's do that I go ahead and do this nope that's not animatable Joe darn okay um so what
30:06
we're going to do is we're going to go to detailed okay and I'm going to set um
30:11
uh Max unit pixels to be a th000 okay um and essentially what this
30:18
is doing is we're setting now this content is not a th000 pixels okay but
30:24
what we're doing is we're animating the max height attribute um and the maximum
30:29
will be a th000 so if our content is 500 pixels it will still work properly if
30:36
it's now if it's over 1,000 pixels it'll it'll it's going to limit it to be a th000 pixels so you might need to make
30:42
this bigger if you have a lot of content okay um but let's make sure let's see if this works
30:52
voila there we go now I do recommend that you make this value as small as
31:00
possible okay so try to figure out um and the reason is okay so we have this
31:05
currently animating at 1 second okay um and let let's do this I'm
31:11
going to go ahead uh let's look at this animation actually let's exaggerate a little bit I'm going to put in I'm going to make it bigger okay
31:21
so you see that animation it animated all the way down and all the way up now
31:27
take not note of the timing of that okay now it does take a second to do
31:35
that now I'm not sure exactly how large this is uh let's just get an
31:40
idea that is approximately 800 pixels
31:46
okay um close to a th000 um but let's go ahead and I'm
31:51
going to delete I'm going to delete three of those okay now let's check out the
31:57
animation it looks a lot faster right and if you
32:03
if you look here when I click on it close it it it looks odd okay it's not
32:09
that it's not the exact same as when we had a lot of content and the reason is is that timing
32:16
is animating um as if it were going to do um even though this is only probably
32:22
200 and some odd pixels right yep 212 pixels the animation timing is based on
32:27
a, pixels because that's what we set our Max height to be okay um
32:33
so now there's no changing that right and this is little hack that means it does mean that large content and small
32:41
content could have some very diff some slightly different animation speeds okay
32:48
um but if your content is relatively similar no one's going to really notice okay um and it's really only more
32:54
noticeable when you have slower speeds like a second or something like that normally you would actually animate something like you know 300 milliseconds
33:01
or half second right um something like that so um there is a caveat to that but
33:07
it does work okay so let's go ahead and um if I were to um here let's and what
33:12
I'm going to do here is I'm going to rep uh yeah so let's do that and then
33:18
we're going to go to height and let's set that to be more like I don't know 800 pixels okay something like that so again you're going to want to set this
33:24
to be something that you know all of your content is going to fit within but you know you want to make sure it
33:30
doesn't get cut off but you want it as small as possible
33:36
okay oh and I didn't I clicked on the wrong thing hold on one second I click
33:41
on the number voila pretty slick
33:47
right um okay now let's look at a different way of doing this um I I'm I'm
33:55
actually going to go ahead and add it uh actually we're going to let's delete that I'm going to duplicate this
34:01
page uh let's do this is uh toggle right
34:06
we're going to duplicate this and now we're going to use
34:12
peekaboo okay all right so now we're going to use peekaboo and um so in order to do that
34:19
we don't need any of these bad boys here don't need any of that all right uh we'll keep those two
34:26
swatches because that's that's pretty much our button okay um so what we're going to do now is we're going to add in
34:35
peekaboo uh we're going to add a peekaboo stack okay um and just to make things simple
34:44
I'm going to use this peekaboo launcher okay you could just add a attribute to a button I think it's PAB launcher okay um
34:52
but yeah we're just going to do that and uh what I'm going to do now is
34:57
we're going to just whoops that was weird what the heck there we go we're
35:03
going to move that one column into the peekaboo okay so let's look at these settings
35:09
here uh so this peekaboo uh you give it a launch ID we just leave it as peekaboo for right now okay and this launcher is
35:18
going to on click we're going to toggle uh pekabo on and
35:23
off okay um so and then let's
35:33
see let's look that I think that's it voila and we're
35:38
done okay now if you notice here peekaboo does cut this content off because it does have a maximum size um
35:45
attribute and here you can do small medium and large okay we had set to 500 right and you can adjust those okay um
35:53
so essentially peekaboo is doing something similar to what t is doing
35:58
okay peekaboo actually does a lot more um it has a lot more kind of state and various things and you don't need to
36:04
know all the various um swatches that I added right um you just kind of throw peekaboo on the page and he saw how easy
36:11
that was okay um so there we go
36:19
peekaboo now um we want this we don't want just one
36:25
instance of this on the page we want multiple right so let's go back to toggle okay and let's go ahead and uh
36:31
we're going to copy and paste this okay now now I have two let's go ahead
36:37
and change this one to be um two
36:44
oops so if I go into here now now I have one and two now what if I if I click on
36:50
this oh no it opened both of them if I click on this one oh no it opens both of
36:56
them right so in order to do this essentially we
37:03
would need to duplicate the Toggler okay so that it it had special
37:09
instances for each one Toggler is really kind of a um let's see uh there is okay
37:15
hold on one second but there is a toggle only trigger children oh shoot when set only elements
37:22
found within the trigger element will be toggled oh okay
37:32
yeah that this isn't a child of the trigger so darn
37:40
it um yeah so in order for this to work with toggle okay you would need to you
37:46
would need to duplicate all of these swatches again okay um in order for it
37:52
to work um individually with this guy all right now you some things like
37:57
this show hey uh content could work right and you can also keep this one so here let's do it right so um over here
38:06
down here we're going to do a different trigger so we're going to do uh show hide trigger two okay I'm just going to
38:11
add a two at the end to keep things simple and um we have show hide content
38:18
to actually we're going to do show hide content and show hide content too and
38:24
I'll I'll show you why uh no actually we can't do that unless we uh yeah we're
38:31
going to do show hide content too that gets kind of crazy to explain if we try to do
38:38
both all right so there we go we have two classes right and essentially now we're
38:44
going to we're going to duplicate this now to make things simpler actually what we're going to do is we're going to add in a pen okay and I'm going to go ahead
38:52
and uh we're going to Chuck all these in here
39:07
and we're going to call this um toggle one okay and then guess what I can do I
39:13
can just go copy and paste and this is going to be toggle
39:19
2 okay and in here we're going to go to each one and we're going to um Target
39:24
the content two okay and in here we're going to Target the content to uh we can
39:30
leave sh open actually um and then we're going to toggle uh that essentially uh
39:35
basically this 's open actually is going to be a a unique one or just kind of outside it doesn't need to be made
39:41
specific for each one okay um and then height here we're going to do content
39:47
two all right you could potentially factor out the transition and the height
39:53
swatches by like extracting and using a different class to manage that versus
39:58
the the toggle but just to keep it simple um for for this example um we're going to duplicate these three swatches
40:06
so this should work let's go ahead and check so now I click on that does that clicks on that does that
40:16
nice sweet okay um so that is toggle using multiple
40:24
oops uh actually here let's save this so I so you guys can I'll get this
40:31
um let's just call this toggle
40:37
layout okay man I just noticed that it's 12:15 already and we want to do this with peekaboo okay um replicating this
40:45
with P or we want to do this with feeds after um okay we're going to replicate this now with peekaboo okay so I'm just
40:51
going to uh copy and paste this uh just to keep things simple okay
40:58
and um all right let's make this one peekaboo
41:07
2 all right again just by keeping everything the same um we're duplicating
41:13
it right so we're going to have to make them unique for each instance okay and that's that's pretty simple with
41:19
peekaboo so we're just going to do um uh we're going to do launchers peekaboo 2
41:24
right and down here we're going to make peekaboo 2 with launcher ID here as well
41:30
okay now um what we can do is um we can close others with
41:37
class okay um and what I'm going to do here is I'm going to close peekaboo
41:43
one uh well let's do uh actually we're going to do what was it show hide
41:49
content okay so in here I want to close everything else that has oh but the
42:00
um on this peekaboo instance I want to do a show hide and we're just going to
42:06
do show hide and I want to close everything else with show hide so we're
42:11
going to do here is peekaboo we're going to close other class close other class show
42:20
hide all right so there we go and that gives us the ability to O How come that
42:28
didn't when I clicked on that it closed that one but when I clicked on that one it didn't close let's see if we can fix
42:41
that all right sorry if you hear the dogs barking um Gardener is here I tried
42:46
to ask him not to come until 1 o' but he came early today unfortunately okay um let's go back into
42:54
here so we had uh see this peekaboo closes with others
43:01
with class show hide and this Clos others with class uh
43:08
show hide let's see uh leave closed class
43:17
empty oh I forgot to do that there we go I
43:23
forgot to put the show hide class on this peekaboo all right so now if if we do
43:28
this voila now they're individual right but these if I click on
43:34
this header then that links to the actual page okay so that's cool we show and
43:41
hide classes um for
43:47
peekaboo sweet okay now let's go ahead and see
43:54
what we can do with feeds okay now I I'll be honest um I to speed things
44:02
up I I was I was going to try to take this example and plop it into feeds and
44:08
then take you know peekaboo and plop it into the feeds I'll tell you right now it's not going to work okay that would have been cool to
44:15
just show you hey look we trying this and it fails I'm just going to tell you right now it's G to fail okay um and the
44:21
reason is is peekaboo um as you probably are aware if you use something like total CMS blog or total Loop or um
44:30
feeds the content is only editable um inside the HTML on the actual web page
44:38
but with Toggler and with peekaboo a lot of this data exists in the JavaScript
44:44
okay and feeds and total CMS don't have access to that so what can we
44:51
do we're going to have to take a completely different approach a very
44:56
interesting interesting approach um and it will be fun to actually build this this is probably going to take a little
45:02
while okay um because I'm probably going to take it slow to teach you guys and show you guys everything that's going on
45:07
okay um so if you have to leave I understand because we're almost approaching an hour already okay um
45:14
hopefully you've already got a lot out of what I've shown um but we're taking it to the next level right now okay
45:21
um okay and uh so we're going to duplicate this and
45:28
um this is going to use something called radios okay um not a typical use of what
45:34
you think a radio is used for okay um but let's go and get her done or try to
45:41
get her done um all right first
45:49
off we're going to go ahead and let's look at Radio
45:57
oh over here right what is a radio first right let's just add a couple radios to
46:02
the um and what we're going to do is we're going to make sure they're all the same name okay so field name radio I'm just going to go ahead and add a couple
46:10
okay um and uh let's preview right so we have radios and if you look a radio only
46:17
allows um you to have one selected if it has the same field thing
46:31
perfect okay um so what we're going to do is we're going to hijack that okay
46:39
because something that I know that you might not know is you can Target something with a radio Okay um you can
46:48
Target a radio if it's checked versus
46:53
unchecked okay um so the idea here is if we're going to hide a radio in
47:01
these buttons and when I click on it it's going to make it
47:06
checked when it's checked it's going to open up this box when it's unchecked AKA
47:14
when I click on o but a radio can't be
47:24
unchecked I see I didn't didn't build this before so a radio can't be unchecked so that is a
47:31
drawback okay um but guess what can be unchecked a
47:37
checkbox okay um so um for right now I'm
47:43
going to build this I'm actually going to move I'm going to change we're going to move we're going to build this with a checkbox with a radio though um if we
47:51
used radios it'll be the same exact implementation as if I did a checkbox but but with a A checkbox you can have
47:58
multiple open with the radio you can't with a checkbox you can have things all
48:04
of it closed but a radio you can't okay may
48:09
maybe maybe we can quickly um do it with we'll continue with radio and then I think it'll be pretty simple to
48:15
replicate it with checkbox um in a little bit you can kind of see the the difference in
48:21
Behavior okay um okay so what I'm going to do here is uh
48:28
oh wait I need to I I need to remove peekaboo launcher and remove this from uh remove
48:37
peekaboo from there because we're not using peekaboo okay
48:47
um okay so let's just work
48:52
on actually you know I am going to use checkbox for right now and and then then we'll do radio okay we're going to use
49:00
checkbox and I'm going to give this a class of
49:05
um give this a class and just call it
49:10
um Toggler toggle check or toggle Trigger or not because
49:18
it's going to it's it's supposed to be the trigger okay so let's go in here and in here basically you can see I I can H
49:26
I have a check box and I can check it and uncheck it cool okay and just for fun I'm
49:32
actually going to delete the label right and we're not going to have any value right we're not using this
49:39
checkbox as part of a form okay um it is purely
49:46
oops it is purely to be a
49:53
checkbox okay I like
50:03
it um now now what we need to do is when I
50:09
check this check box um we're going to um use the similar height attributes
50:16
actually let's go ahead and um copy those we want uh transition I don't want Toggler I want height and I want height
50:23
I want these so we don't have to redo those right so um so I want the transition on
50:31
show hiide content which is this okay um and then I want the height to be the max
50:37
height to be zero and when we add sh open it's going to be a Max height of
50:42
800 now um we're going to have to change this particular Swatch because we C we can no longer um guarant basically base
50:50
our Logic on um this being open okay or this class
50:57
being there because uh we need to base it off this checkbox being checked or not okay now um I actually let's it's
51:06
the same Swatch but we're going to have to go pretty Advanced here okay this is definitely Advanced super cool this is
51:13
Advanced okay um I'm going to give I'm going to give
51:21
first off we need to give uh the the container that's holding all of this a class
51:27
okay um so we're just going to do um we're going to call this item container
51:34
okay okay just just because this is an item okay um or no here let's call it
51:41
toggle container okay toggle container okay so this is toggle
51:49
container okay um I may need to add uh I'm going to open up vs code really quick just to just to show you this
51:56
[Music] um what I'm doing here again this is going to be overhead
52:03
of a lot of you uh I I know but this is we need to Target some stuff with CSS
52:09
okay um so first off we need to we need to base something on toggle container I'll make this as big as
52:16
possible okay um so I want toggle
52:22
container and remember um inside of this I gave the checkbox the toggle
52:28
trigger okay um and if you know CSS we can do something like this oops okay I
52:35
can do um toggle container if it has a toggle trigger inside of it now what I need to do is I need to Target um
52:43
actually what I need to do is I need to Target this show hide content okay so um we're going to do
52:52
this show hide content and um we're going to do Max
52:57
height just to have something in here to show you um max height um 800 pixels
53:03
okay and let's go ahead and get CSS in here
53:09
right now um
53:14
this we want to we only want to trigger this logic when in between here is that
53:21
checkbox is checked um this is this is
53:27
sort of bleeding edge CSS I actually use it in some in Stacks now um because it is supported by like
53:33
93% I think of um browsers out there that's something called has okay
53:40
swatches do not support has yet um in sort of something maybe the next version of foundation uh we can build this in
53:47
okay but so if toggle container has um toggle
53:54
trigger that is checked okay let's analyze
54:02
this so if toggle container has um a toggle trigger that is checked
54:12
apply these styles to show hide
54:17
content prior to a year ago you had to write multiple lines of JavaScript to
54:23
accomplish this okay this is my favorite feature in CSS of the past 10
54:30
years okay is this has this is a mazee balls like okay so how how can we use
54:39
this in our Swatch I'm going to take just the selector part of this okay and
54:45
we're going to put that inside of this Swatch because in here um in the CSS of
54:52
a Swatch you can type in whatever you want okay so whatever CS Advanced CSS
54:58
selector you need to do there we go so we're going to use that and that we have our fancy has uh selector in there and
55:06
essentially now when I check this box okay um the height of this should
55:13
change and I haven't done this so but it should work so it's hidden by default so
55:19
that's good and when to check this voila oh my God how cool is
55:30
that hey everyone still in the chat man how is this come on give me some feedback here that is freaking cool
55:38
guess what zero JavaScript for this at all this is 100% CSS this is chef's kiss
55:44
this is amazing okay again this is this wasn't possible a year
55:51
ago uh pretty cool
55:57
okay um but next up is we have this checkbox but that looks ugly right what
56:04
can we do okay this is ugly so um what we can do is I'm just
56:13
going to position this effectively over the button and then make it transparent
56:19
that's it okay so um let's go ahead and on toggle trigger
56:26
um we're going to go ahead and do uh a pos position Swatch okay and uh we're going to do it
56:33
on toggle trigger and uh we're going to do relative to
56:39
parent uh and actually to make it relative to parent to make sure it's over this button what I'm going to do is
56:45
I'm going to Chuck in a container in here okay and we're going to make it um
56:51
position relative and we want to do auto no wrapper so I'm going to move both of those into this there right and position
56:59
this is uh we want to position it percentage wise we want to do it top
57:06
50% okay left 50% uh and then we want to Center the
57:12
origins um make it a z index of I don't let's give it like uh two okay just so
57:18
it's it's above all right and let's preview that
57:23
all right so now I have
57:28
interesting okay it's not really Center on the button though okay
57:35
um and actually to be honest this doesn't need to be a button anymore um it could just be um anything okay but uh
57:43
let's tweak that position Swatch a little bit see
57:56
if I did top
58:03
zero so that goes there how come top 50% goes down there interesting let's
58:13
preview this
58:20
spe the margin no
58:37
hold on let's look at oh let's turn off inline check boxes that could be affecting
58:47
it okay uh transition y
59:03
all right I'm curious here let's see let's inspect this
59:10
again and we're going to do can I make this
59:17
bigger oops
59:38
oops H nice okay still unsure why it well
59:46
actually if we do width and height 100% we could just do top zero okay cool I like this okay um so on here I'm just
59:54
going to do um utility classes I'm just going to do uh W full and H
1:00:02
full okay I think that's good and then on our position Swatch I'm just going to
1:00:07
make it Z 0 all
1:00:15
right oh maybe I got those classs oh no it works in oh
1:00:22
interesting it works in an
1:00:29
arc but not in what happens if we preview in
1:00:37
Safari all right well it works in soar you just it the visually if you see I can click anywhere on this button and
1:00:43
that check boox is working in Safari right is it the same in preview yes all right so now our
1:00:50
checkbox is there now we don't want to see it okay and that's super simple okay
1:00:56
what we're going to do is we're going to do a um opacity
1:01:02
Swatch and we're going to make um toggle trigger have an opacity of
1:01:12
zero boom check that
1:01:18
out how amazing is that
1:01:26
okay um now if you notice a minor thing is if you hover over this we don't get
1:01:31
the pointer anymore um so we could just use the um cursor
1:01:39
Swatch on oops on toggle trigger and make it um
1:01:48
pointer right you can also do fancy stuff if you wanted it to be like
1:01:53
uh not move What would something potentially interesting like help maybe
1:01:59
yeah that that could be interesting right so you can go ahead and preview that and then when you hover over the button you get that look at
1:02:07
that pretty cool I like
1:02:13
it if you notice this is hold on what's going on here something's below this button let's see inspect
1:02:28
oh I think I just I just because I added padding or whatnot
1:02:44
okay oh this this checkbox still has
1:02:51
display interesting
1:02:58
because I'm doing that
1:03:11
interesting that still doesn't fix that though interesting
1:03:27
H all right well that's a minor thing um I know I've eaten up a lot of your time
1:03:33
because we want to uh we want to replicate this multiple times now but so
1:03:38
uh at this point I can just I can copy and paste this container as many times as I want and all my all my CSS should
1:03:45
work right um I don't need to replicate it or duplicate it or do anything like that right so now um I have this button
1:03:54
let's go ahead and do this now again with the because they're
1:04:02
check boxes they're separated okay now this has extra padding because I think I added padding
1:04:08
to that container that I copied and pasted um but here let's do yeah I did uh I should have should have done done
1:04:15
that
1:04:22
differently there we go
1:04:29
sweet um all right so there we go uh that was checkboxes not
1:04:37
radio um let's do it one more time we're going to duplicate that we're going to do
1:04:43
radio right and let's show you how we can do it with a radio um so essentially here we're going to go into we're just
1:04:49
going to swap out these these um check boxes for radios
1:04:59
and actually all of our code as long as we we uh put in these classes all of our
1:05:05
all of our same code should work um and here I don't want a label I
1:05:12
don't want to Value let's turn off inline although inline inline might not
1:05:18
be an issue anymore let's let's try that I'm going to copy this we're going to paste that in here delete the checkbox
1:05:27
right let's preview this now if I click on this one it should boom it closes that
1:05:34
one right now the thing is here though with radios as I said earlier I can't turn off a radio because one has to be
1:05:42
uh you know clicked at all times and the reason it wasn't on page load is because
1:05:48
um it's theoretically wrong you should always have a radio at least one radio checked okay so like this first one
1:05:54
should be checked by default if you notice when I set that to be checked it's open and when I click on these they
1:06:00
will dynamically um animate individually okay okay so now with this
1:06:07
particular layout um since this is completely separate from all the logic
1:06:13
which is in our swatches we should be able to replicate this with feeds no
1:06:18
problem okay um so really quick feeds or total CMS okay um I'm going to Chuck
1:06:25
feeds on the page just for right now um and we're going to use I we'll use the
1:06:31
radio option okay I'm going to duplicate the radio and um we're going to call
1:06:36
this feeds plus
1:06:41
radio right and um right we shouldn't need to change our Styles at all right
1:06:47
so I'm going to go ahead and do a feeds stack right and we're going to do
1:06:55
here okay um okay so inside feeds uh I'm going to go ahead and add in a CSV feed
1:07:02
okay and um we're going to do um ID comma
1:07:09
um label okay um and I'm just going to add in here one
1:07:15
second let's just do um right we're just going to do this
1:07:22
and we're going to do uh one comma um
1:07:27
Joe two comma Josh three comma um
1:07:35
Jacob um four comma uh Jessica and then five comma ran okay
1:07:44
that's the Workman family if you didn't know okay um we're just going to take this
1:07:50
data going to plop that in okay um and then we're going to take this
1:07:56
container I'm going to plop it there okay and we're going to delete
1:08:02
that one
1:08:09
um all right and then in here in the button label uh we're going to put in the
1:08:18
ID all right and then over here um we're going to put in the what I say I said
1:08:24
label I think it should have been
1:08:29
name all right put label yeah ID and label okay now you're going to have multiple Fields right you're you're
1:08:35
probably going to customize the link and you'll probably customize the content I'm just I'm not going to do that for
1:08:40
right now okay um but that essentially should be it when I when I load this page it we should have five of these and
1:08:48
they should all work independently okay um so as you see
1:08:56
there they all work
1:09:07
independently the stacks ID duplicates not allowing for changes in the
1:09:14
selection I I don't know what you mean
1:09:26
radio and checkbox still has the feeds error um there is no feeds error I as I showing
1:09:32
you you don't need a form there is no form here at all it's just a
1:09:39
radio that's it right but um yeah as you see pretty
1:09:51
cool now with that said um I think peekaboo has some interesting
1:09:58
features to it and I do think I will eventually add feeds support to Peekaboo
1:10:05
so that you can have peekaboo inside of a feed um and then use some of its cool
1:10:10
features because it has definitely some other features that aren't available in what we've done here okay um but this
1:10:18
gets this gets pretty darn close Okay um so yeah there we go guys I think it's
1:10:24
pretty fun um I was kind of a crapshoot I had an I had the idea that I thought this would
1:10:30
work and I was like I'm pretty certain this is going to work it's going to be pretty slick um and I built it you saw
1:10:36
me build it live here just kind of figuring it all out and that's actually an interesting thing too is you know
1:10:42
watching someone figure something out um I will go ahead and post the link to
1:10:47
this project file um in the community for this live stream okay I'll post a
1:10:53
comment with the download okay so you guys can have this uh project file um yeah pretty cool again that that does
1:11:00
have that to get the the radio and checkbox stuff working it needs that pretty Advanced selector right with that
1:11:07
ha stuff which is slick slicker than snot okay um so yeah cool thank you very much
1:11:15
everybody I hope you enjoyed this hope you learned something um and uh yeah got
1:11:20
awesome stuff coming soon um total CMS 2 Beta is out um um working on as I said
1:11:26
in the Weaver bites I'm working on audio Pro think of video Pro but for audio okay um hopefully with ctas and
1:11:34
playlists and all that stuff as well okay imagine integrating that with feeds and having an RSS feed or a podcast feed
1:11:40
displaying your podcast inside audio Pro managing that podcast through total
1:11:49
cms3 one day um yes that would be cool so anyway there we go so hope everyone
1:11:57
enjoyed today uh hopefully see you on Friday at the hangout um yeah have a great rest of
1:12:03
your week guys we uh go out there and make your website