-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
executable file
·2191 lines (1776 loc) · 88.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Ladies Learning Code</title>
<!-- Don't alter slideshow.css, CSSS slide deck needs it to work -->
<link rel="stylesheet" href="framework/css/slideshow.css" data-noprefix>
<!-- Theme-specific styles -->
<link href='http://fonts.googleapis.com/css?family=Quicksand%7CPacifico%7COpen+Sans:400italic,400,300' rel='stylesheet' type='text/css' data-noprefix>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="framework/css/highlightjs-themes/vs.css" data-noprefix>
<link rel="stylesheet" href="framework/css/theme-llc.css" data-noprefix>
<link rel="shortcut icon" href="framework/img/favicon.ico">
<!-- Workshop-specific styles -->
<link rel="stylesheet" href="framework/css/workshop.css" data-noprefix>
<!-- Takes care of CSS3 prefixes! -->
<script src="framework/scripts/prefixfree.min.js"></script>
<!-- opens all links in a new window -->
<base target="_blank">
</head>
<!-- Timer/progress bar: Define the presentation duration using "data-duration" in minutes. -->
<body data-duration="360">
<!-- Welcome slide -->
<header class="slide intro first">
<img class="logo no-shadow" src="framework/img/logo-llc-white.png" alt="Ladies Learning Code logo">
<div class="info">
<h1 class="heading-bg">
<span class="dark">Welcome to</span><br>
<span>Ladies Learning Code!</span>
</h1>
<div class="heading-bg connected">
<span class="dark">GET CONNECTED:</span>
<span class="light">NETWORK: {network}</span><br>
<span class="light">PASSWORD: {password}</span>
</div>
</div>
<div class="sponsor">
<p>In partnership with:</p>
<img src="framework/img/telus-logo-white.svg" alt="Telus">
</div>
</header>
<main>
<!-- Instructor info -->
<section class="slide intro">
<img class="logo no-shadow" src="framework/img/logo-llc-white.png" alt="Ladies Learning Code logo">
<div class="info">
<h1 class="heading-bg">
<span>Building a store with Shopify</span><br>
</h1>
<h2><span>with </span>{presenter}</h2>
<div class="instructor-info">
<img class="instructor-img" src="framework/img/workshop/presenter.png" alt="">
<!-- If you have a blog or twitter account you'd like to share -->
<ul>
<li><i class="fa fa-desktop"></i><a href="https://www.shopify.ca/">blog.ca</a></li>
<li><i class="fa fa-twitter"></i><a href="https://twitter.com/twitter">@twitter</a></li>
</ul>
</div>
</div>
</section>
<section class="slide centered">
<img class="no-shadow" style="padding:40px 0;" src="framework/img/workshop/shopify-logo.svg">
<br>
<h2 class="delayed">Commerce application</h2>
<br>
<h2 class="delayed">Over 500,000 merchants in 150+ countries</h2>
<br>
<h2 class="delayed">Canadian :)</h2>
<p class="presenter-notes">
Shopify will let you securely sell goods both online and in-store.
Shopify takes care of hosting your files, maintaining a database of your products and sales,
and making sure financial transactions are secure - a lot of the obstacles to setting up
a viable online business are taken care of.
Started in Ottawa, Ontario. Run by Germans ;)
</p>
</section>
<section class="slide local-shops bg--image">
<p class="presenter-notes">Who uses Shopify? Some think of it as a platform for
small businesses selling hand crafted goods. Like these two Ottawa stores.</p>
</section>
<section class="slide big-brands bg--image">
<p class="presenter-notes">It's also used by incredibly well-known and popular brands,
some of which generate millions of dollars in revenue just from their store.</p>
</section>
<section class="slide title">
<h1>Today's Goal:</h1>
<h2>Use Liquid to modify and create Shopify templates</h2>
<p class="presenter-notes">
Liquid is a Ruby-based coding language that was created by Shopify.
It is predominately a "templating language" - it's going to make
developing themes a lot easier.
</p>
</section>
<section class="slide">
<div class="col col--one-half">
<h2>Agenda</h2>
<ul>
<li>Shopify's platform and the Dashboard</li>
<li>Overview of templating</li>
<li>Storefront Editor customizations</li>
<li>Introduction to Liquid Text</li>
<li>Modify template files</li>
<li>Program smarter page designs</li>
<li>Do some shopping</li>
</ul>
</div>
<div class="col col--one-half">
<img src="framework/img/workshop/debut-theme-mobile.png" class="contain--img">
</div>
<p class="presenter-notes">
</p>
</section>
<section class="slide centered">
<img src="framework/img/workshop/im-ready.gif" class="w100">
</section>
<section class="slide title">
<h1>Getting Started</h1>
<h2>Shopify Partner Account</h2>
<p class="presenter-notes">
The Shopify Partners program is marketed as a way to earn some client revenue
and get access to additional resources. But its useful for people just starting
out because it lets you create development shops and work on them as long as you'd
like before you're ready to "go live" and begin a plan.
</p>
</section>
<section class="slide">
<h2>Shopify Partner Account</h2>
<p>Login at <a href="http://www.shopify.ca/partners" alt="Shopify Partners Program">shopify.ca/partners</a>.</p>
<h3>Setting up your account</h3>
<p>Provide an email address to activate your account. Partner accounts are free and last forever.</p>
<img src="framework/img/workshop/partner-program.png" class="w75 center">
</section>
<section class="slide">
<h2>I'm a Partner now. What does that mean?</h2>
<br>
<div class="col col--one-third">
<img class="contain--img" src="framework/img/workshop/partners-sidebar.png">
</div>
<div class="col col--two-thirds">
<p class="delayed">Partners account: 50% playground, 50% business.</p>
<ul class="delayed">
<li>Create new stores for clients</li>
<li>Develop new apps for the <a href="https://apps.shopify.com/">App Store</a></li>
<li>Design new themes for the <a href="https://themes.shopify.com/">Theme Store</a></li>
</ul>
<ul class="delayed">
<li>Hand off development stores to merchants</li>
<li>Review collected and incoming payments</li>
</ul>
<ul class="delayed"><li>Quick access to a variety of resources</li></ul>
</div>
<p class="presenter-notes">
When you "finish" a dev shop, you transfer it to a merchant and from there
and it's up to the merchant whether you have access.
Incoming payments from revenue sharing modal when you setup stores for people who become paying
Shopify merchants, when people buy the themes you've designed, or lease the the Apps you've made.
</p>
</section>
<section class="slide">
<h2>Create a new development store</h2>
<br>
<img src="framework/img/workshop/create-dev-store.png" alt="Create a new development store" class="center">
<p class="presenter-notes">
In this screen shot we already have one store. Make as many as you'd like.
Each store will be a brand new instance of Shopify, so there will be no information
shared between stores.
Each store has it's own library of products, web pages, and user accounts.
If you are making a store for someone else, you can later switch a development store
to an affiliate store by switching to a paid plan.
When you make your store choose ONLINE store only.
</p>
</section>
<section class="slide">
<img src="framework/img/workshop/shopify-home.png" alt="Shopify Home" class="center">
<p class="presenter-notes">
The first screen is called Shopify Home - also called the Dashobard.
In the beginning, there will be some onboarding tips on your Home screen.
The left-hand sidebar has links to managing your store's Orders, Products, Discounts, etc.
To get to the site, you choose Online Store. The Online store is just one of a handful
of Channels your store can have. Other examples include Facebook and Point of sale devices,
and Buy Button.
In the bottom of the sidebar, there's another menu of links to resources.
</p>
</section>
<section class="slide title">
<h1>Products</h1>
<h2>CSV file for bulk uploads</h2>
<p class="presenter-notes">
Comma Separated Values file. First gotcha: it needs to be a CSV file,
even though and Excel file looks similar.
</p>
</section>
<section class="slide">
<h2>Uploading CSV file</h2>
<div class="col col--one-half">
<p>CSV: "Comma Separated Value" file</p>
<ul>
<li>Products > Import button</li>
<li>Upload <b>llc-products.csv</b></li>
<li>Check the preview - looks good?</li>
<li>Start upload</li>
</ul>
</div>
<div class="col col--one-half delayed">
<img class="" src="framework/img/workshop/waiting.gif">
<br>
<p>This will take a few minutes, but we can close the pop-up window.</p>
<p>Refresh the page to get started.</p>
</div>
<p class="presenter-notes">
We are uploading over 200 products, but thankfully Shopify will upload them as soon as
each one becomes available. So we can check out the ones its uploaded so far.
</p>
</section>
<section class="slide title">
<img src="framework/img/workshop/product-page-overview.png" class="center">
<p class="presenter-notes">
Bring up your LIVE Shopify site and walk the class through some of the common
product page elements.
Product Type, Product Vendor: Can only be one option.
Tags - Add as many as you want, used for sorting later.
Multiple images.
Compare at price - how to tell Shopify if an item is On Sale.
Inventory policy: Can tell whether you want Shopify to keep track of the
inventory.
SEO: What it's going to look like for search engines.
Click on the "View on website" button to show what the theme looks like
on Launchpad Star. Launchpad Star is the starter theme, so let's get a new theme.
</p>
</section>
<section class="slide title">
<h1>Themes</h1>
<h2>How the world sees your store</h2>
<p class="presenter-notes">
Your Shopify store is really just a database of products, collections, etc. But your store's theme is what you and customers "see" when they visit your site.
</p>
</section>
<section class="slide title">
<img src="framework/img/workshop/onlinestore-themes.png" class="center">
</section>
<section class="slide">
<h2>Adding Themes to your store</h2>
<p>A single store can have <i>many</i> themes.</p>
<p>A theme is just the the clothes your store wears - you can change whenever you want.</p>
<p>Different themes have different functionality, settings, and features.</p>
<p class="presenter-notes">
A theme's purpose is to display your store's products, collections, pages, and blogs in
an interesting way. And each theme has its own way of doing this.
You aren't limited to one theme, but keep in mind that switching themes will often require
you spend some time learning the new theme and doing a bit of setup.
Functionality: How it uses tags; Settings: talk about that soon; Features: Slideshows or sidebars
</p>
</section>
<section class="slide">
<h2>Upload a theme</h2>
<img src="framework/img/workshop/upload-a-theme.png" alt="Highlighting where to find the upload button" class="center">
<ul>
<li>Click "Upload theme"</li>
<li>Choose <code>Debut - Ladies Learning Code.zip</code> from the workshop files.</li>
<li>FYI: This is a version of Debut, a free theme available in the Theme store.</li>
</ul>
<p class="presenter-notes">
Debut is the name of a theme available in the theme store. We are uploading a slightly
altered one for this workshop.
</p>
</section>
<section class="slide">
<h2>Unpublished theme</h2>
<br>
<img src="framework/img/workshop/unpublished-theme.png" class="center w66">
<br>
<p>You can <b>customize</b> your theme by using the Online store editor.</p>
<p class="presenter-notes">
</p>
</section>
<section class="slide">
<br>
<img src="framework/img/workshop/editor-screen.png" class="center">
<p class="presenter-notes">
If you aren't seeing this screen, it's probably because your store is using the "old" editor.
Instead of "editor", the URL will end in "settings".
You can upgrade to the new one from the main dashboard.
</p>
</section>
<section class="slide">
<h2>Exercise #1: Get to know your theme</h2>
<p>There is an <code>images</code> folder in the workshop files you are welcome to use, or try the free images from the <a href="https://burst.shopify.com">Burst integration</a>.</li></p>
<ul>
<li>For the Header, choose to use a custom logo.</li>
<li>Change the Footer newsletter subscribe button color to a color you like.</li>
<li>Change the headings typography to Lato.</li>
<li>Show the quantity selector on Product pages. (<b>Hint:</b> Navigate to the Product page in the editor)</li>
<li>Set up a couple social media links in your Footer section. (<b>Hint:</b> Open general settings)</li>
<li>Add two new slideshow images. (Don't worry about the links yet.)</li>
<li><b>Save</b> your work. Then head back to the admin and <b>publish</b> this Debut theme.</li>
</ul>
<p class="presenter-notes">
Do the first couple changes with the class, then leave this list up.
Give class time to experiment with edits, mentors can help them go through the list.
</p>
</section>
<section class="slide centered">
<br>
<img src="framework/img/workshop/thumbs-up-robot.gif">
<p class="presenter-notes">
Good job! We aren't done yet, though.
</p>
</section>
<section class="slide title">
<h1>Collections</h1>
<h2>Grouping products</h2>
</section>
<section class="slide">
<h2>Managing your store's collections</h2>
<p>Let's add some more products to the homepage collection.</p>
<ul>
<li>Navigate to "Collections" and edit the <b>Home page</b> collection.</li>
<li>Home > Products > Collections</li>
<li>Manually add 5 more products to the collection.</li>
</ul>
<br>
<img src="framework/img/workshop/manual-add.png" alt="Manually add products" class="center w66">
<p class="presenter-notes">
Right now there's only one product in the Frontpage collections. Let's add more.
After adding, check out your store again.
</p>
</section>
<section class="slide">
<h2>Make a new collection</h2>
<p>Collections > "Add collection" button</p>
<div class="delayed">
<ul>
<li>Title: <b>Earrings</b></li>
<li>Conditions: Product type == Earrings</li>
</ul>
<img src="framework/img/workshop/earrings-conditions.png" alt="Earrings collection conditions" class="center w66">
</div>
<p class="presenter-notes">
Manually adding products is a pain, so let's make some rules. Now any product in the future
that gets this Product type will automatically be added.
</p>
</section>
<section class="slide">
<h2>Conditional collections</h2>
<ul>
<li>Title: <b>Necklaces</b></li>
<li>Conditions: Product type == Necklaces & Pendants</li>
</ul>
<br>
<ul>
<li>Title: <b>Accessories</b></li>
<li>Conditions: Product tag == accessories</li>
</ul>
<br>
<ul>
<li>Title: <b>The Blue Diamond Collection</b></li>
<li>Conditions: Product vendor == Blue Diamond</li>
</ul>
<p class="presenter-notes">
May be worthwhile to show mentees where the Products get their tags from.
</p>
</section>
<section class="slide">
<h2>Muliple conditions collections</h2>
<div class="col col--one-half"</div>
<p>Title: <b>Household</b></p>
<p>Conditions: Any conditions you feel make sense.</p>
<p>Products must match: "any condition". Why would that be?</p>
</div>
<div class="col col--one-half"</div>
<img src="framework/img/workshop/multiple-conditions.png" class="center">
</div>
<p class="presenter-notes">
Add as many conditions you'd like with the "Add condition" button.
Make sure you choose "Products must match any condition". Otherwise you won't
see any products becase each product can only have ONE type.
</p>
</section>
<section class="slide title">
<h1>Pages</h1>
</section>
<section class="slide">
<h2>Making pages</h2>
<p>Create an "About us" page to tell the story of your store.</p>
<p>Navigate to: Online store > Pages</p>
<p>Feel free to use the description of this workshop.</p>
<pre><code class="hljs html">
In this workshop, we'll discuss how you can use Liquid, Shopify's nifty templating language, to pull information from your store and alter the webpage layout. You can also open a free Partner account, which you can use during and after the workshop to work on Shopify projects of your own.
We'll start with an overview of Shopify's theme environment and best practices in making customizations. From there you'll learn how to make alternative templates for your store's products and pages to provide more variety in your store's look.
By the end of the day, your will have the foundational skills to transform an "out-of-the box template" into a custom site that reflects your design and how you want to run your store.
</code></pre>
</section>
<section class="slide">
<p><b>Pro tip:</b> watch out for copy-pasting code into the editor.</p>
<br>
<img src="framework/img/workshop/rte-code.png" class="center w66">
</section>
<section class="slide title">
<h1>Navigation</h1>
<h2>Working with menus</h2>
</section>
<section class="slide">
<h2>Adding menu items</h2>
<p>We have collections and pages, but can't see them. We need to add our "About us" page as well as a <a href="https://docs.shopify.com/manual/your-website/navigation/create-drop-down-menu">drop down menu</a> to our
site's main navigation</p>
<br>
<img src="framework/img/workshop/catalog-dropdown.png" class="center w66">
</section>
<section class="slide">
<h2>Add to a menu</h2>
<p>Online Store > Navigation</p>
<p>Edit the <b>Main menu</b> to add your "About us" page.</p>
<img src="framework/img/workshop/add-about-us.png" class="center w66">
</section>
<section class="slide">
<h2>Create a nested menu</h2>
<div class="col col--one-third">
<p>Add a nested Catalog menu. Link the parent item to "All collections".</p>
</div>
<div class="col col--two-thirds">
<img src="framework/img/workshop/nested-menu.png" class="center ">
</div>
</section>
<section class="slide">
<h2>Exercise #2: More theme customizations</h2>
<ul>
<li>Feature the products of the <b>Household collection</b> on the homepage.</li>
<li>Change the the footer newsletter sign-up heading to say "Subscribe for updates" instead of "Newsletter".</li>
</ul>
<br>
<div class="delayed">
<p>To change the Newsletter heading, we to need to <a href="https://docs.shopify.com/manual/your-website/themes/translate-theme" alt="Edit Theme language page">edit this theme's Languages page</a>.</p>
<img src="framework/img/workshop/edit-language-link.png" alt="Edit Language Link" class="center">
</div>
<p class="presenter-notes">
Do the first couple changes with the class, then leave this list up.
Give class time to experiment with edits, mentors can help them go through the list.
</p>
</section>
<section class="slide">
<h2>Language editor</h2>
<p>The language editor lets us avoid hard coding words into our theme's code.</p>
<p><b>Pro tip</b>: There's a lot of words here, so use the search function to find "Newsletter".</p>
<br>
<img src="framework/img/workshop/edit-language.png" class="center w50">
<p class="presenter-notes">
Choose a new frontpage collection.
Most of the time, text you see on pages that aren't part of a page or product description
you wrote yourself will be translateable/changeable from the language edit screen.
Unless it's "hard coded" which is not what we want.
</p>
</section>
<section class="slide">
<h2>What is "hard coding"?</h2>
<p>When text is explictly written in the HTML, we say that it is <b>hard coded</b>. This means
it can only be changed if someone has access to the site's files.</p>
<div class="delayed">
<h3>HTML</h3>
<pre><code class="hljs xml">
<h1>Fuzzy boots</h1>
<h3>$139.99</h3>
<p>These boots will keep you warm all winter. Their truly amazing!</p>
</code></pre>
</div>
<div class="delayed">
<img src="framework/img/workshop/face-palm.gif" class="center no-shadow" height="275" width="500">
</div>
<p class="presenter-notes">
Consequences of hard coding: Difficuly to change if you don't know where it is;
not everyone will know how to change it; sometimes you can't access it.
</p>
</section>
<section class="slide">
<h2>How does Liquid help?</h2>
<p>Instead of writing out explicity what we want, we just reference a <b><a href="https://docs.shopify.com/themes/liquid-documentation/objects">liquid object</a></b>.</p>
<p>Liquid objects will dynamically display the value of an attribute, like a title, price, etc.<br> within a set of <b>handles</b>: <code>{{</code> ... <code>}}</code></p>
<div class="">
<h3>Liquid</h3>
<pre><code class="hljs xml">
<h1>{{ product.title }}</h1>
<p>{{ product.description }}</p>
</code></pre>
</div>
<div class="">
<h3>HTML returned</h3>
<pre><code class="hljs xml">
<h1>Rooster Decor Wood Cheese Board</h1>
<p>This is such a lovely wood grain rooster cheese board.
Great country / rustic decor for the rooster collector.</p>
</code></pre>
</div>
<p class="presenter-notes">
If you want to change something, you just have to login into Shopify and
change the page. No need to go into the theme files.
Explain that {{ }} are called handlebars - they are pretty common with templating languages.
They tell Shopify that this is a liquid object, so go look this up.
</p>
</section>
<section class="slide title">
<h2>Code for when you aren't around</h2>
<br>
<h2 class="delayed">Or for future-you.</h2>
<p class="presenter-notes">
A lot of the time, you're writing code for people who aren't comfortable with making edits.
So the less they ever need to go into the theme files the better.
Or for the future version of you that also doesn't want to have to go through the theme
files to look for something.
</p>
</section>
<section class="slide">
<h2>Exercise #3: Break something on purpose</h2>
<ul>
<li>Go into your theme files - "Edit HMTL/CSS".</li>
<li>Find <b>theme.liquid</b> in the Layout directory and open it.</li>
<li>Delete everything <u>above</u> <code>{{ content_for_header }}</code>.</li>
<li>Save your work and <b>preview</b> it.</li>
</ul>
<img src="framework/img/workshop/break-1.png" class="center w75">
<p class="presenter-notes">
Explain directories briefly.
Undo this break by clicking on 'Older versions' and choose the last save.
</p>
</section>
<section class="slide beaker-panic bg--image">
</section>
<section class="slide">
<h2>Load an older version</h2>
<p>If you cannot simply "undo" a change, you can load an <b>older version</b>.</p>
<img src="framework/img/workshop/older-versions.png" class="center">
<br>
<p><b>Pro tip:</b> Shortcut for undo: Cmd+Z (for Mac), Ctrl+Z (Windows)</p>
</section>
<section class="slide">
<h2>Break it again!</h2>
<ul>
<li>Go into the Debut theme's Assets directory and open <b>theme.scss.liquid</b>.</li>
<li>Type "What could go wrong?" anywhere.</li>
<li>Save and <b>preview</b> your work :D</li>
</ul>
<div class="">
<h3>theme.scss.liquid</h3>
<pre><code class="hljs css">
What could go wrong?/*============
Debut | Built with Shopify Slate
Some things to know about this file:
- Sass is compiled on Shopify's server
</code></pre>
</div>
<p class="">Heads up! No <em>'Older Versions'</em> in the Assets directory.</p>
<p class="presenter-notes">
Show the class where the Assets directory AND the styles.scss.liquid file is.
</p>
</section>
<section class="slide">
<h2>Break smarter</h2>
<ul>
<li>Make a <b>Duplicate</b> of your theme from the Themes Dashboard</li>
<li>Check out the Online store editor settings of this new theme - they're the same!</li>
</ul>
<img src="framework/img/workshop/how-to-duplicate.png" class="center w50">
<br>
<p><b>Pro tip</b>: Avoid editing the code of a store's live theme. Code on a duplicate theme, then publish that.</p>
<p class="presenter-notes">
The ability to make duplicates and easily switch between them is a huge advantage with Shopify. Mistakes are less costly than with some other content management systems.
</p>
</section>
<section class="slide title">
<h1>Break Time</h1>
<h2>Feel free to customize your store<br>
using the Online store editor.</h2>
<p class="presenter-notes">
Make any changes you'd like to your store using the Storefront
Editor. Just don't change any code yet.
</p>
</section>
<section class="slide title">
<h1>Templating</h1>
<h2 class="delayed">Building websites in small steps</h2>
<p class="presenter-notes">
There are a lot of parts to a website, but you only need to work in small chunks
at a time. Knowing how templates work makes it more manageable, and saves you
a lot of work.
</p>
</section>
<section class="slide centered">
<img class="contain--img" src="framework/img/workshop/sample-page.png">
</section>
<section class="slide">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/sample-page.png">
</div>
<div class="col col--one-half">
<h2>What's in a page?</h2>
<div class="delayed">
<p>Header</p>
<p>Page title</p>
<p>Description</p>
<p>Product photo</p>
<p>Product description</p>
<p>Buttons!</p>
<p>Related products</p>
<p>Footer</p>
</div>
</div>
</section>
<section class="slide title">
<h1>Template files</h1>
<h2>Edit HTML/CSS</h2>
</section>
<section class="slide">
<div class="col col--one-half">
<img src="framework/img/workshop/theme-templates.png" class="center">
</div>
<div class="col col--one-half delayed">
<h3>We'll start with:</h3>
<ul>
<li>theme.liquid</li>
<li>page.liquid</li>
<li>product.liquid</li>
<li>collection.liquid</li>
<li>index.liquid</li>
</ul>
</div>
<p class="presenter-notes">
Shopify websites only need a handful of templates.
</p>
</section>
<section class="slide">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/sample-page-1.png">
</div>
<div class="col col--one-half">
<h2>Layout</h2>
<p><b>theme.liquid</b></p>
<div class="delayed">
<p>This is going to "wrap" every other template we use.</p>
<p>Your header and footer sections appear on <i>every page</i>.</p>
</div>
</div>
</section>
<section class="slide">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/template-page--header.png">
</div>
<div class="col col--one-half">
<h2>The header</h2>
<p><b>header.liquid</b> - in the <code>sections</code> folder</em></p>
<div class="delayed">
<p>Your logo</p>
<p>Site navigation links</p>
<p>Cart button</p>
<p>Account buttons</p>
<p>Promotional banners</p>
<p>Search field</p>
</div>
</div>
<p class="presenter-notes">
This may be a review for some, but it's worth revisiting.
</p>
</section>
<section class="slide">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/template-page--footer.png">
</div>
<div class="col col--one-half">
<h2>The footer</h2>
<p><b>footer.liquid</b> - in the <code>sections</code> folder</em></p>
<div class="delayed">
<p>Lists of quick links</p>
<p>Social media icons/links</p>
<p>Newsletter sign-up</p>
<p>Search field</p>
<p>Copyright information</p>
</div>
</div>
<p class="presenter-notes">
This may be a review for some, but it's worth revisiting.
</p>
</section>
<section class="slide">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/page-page.png">
</div>
<div class="col col--one-half">
<h2>Pages</h2>
<p><b>page.liquid</b> - in the <code>templates</code> folder</em></p>
<div class="delayed">
<p>Base template for all your store's Pages.</p>
<div class="delayed">
<p><b>What could be in it?</b></p>
<p>Page title</p>
<p>Page content - write-up, pictures</p>
<p>Sidebar</p>
</div>
</div>
</div>
</section>
<section class="slide">
<h2>Exercise #4: Intro to liquid objects</h2>
<h3>page.liquid</h3>
<p>We need to know what <a href="https://docs.shopify.com/themes/liquid-documentation/objects/page">liquid objects are available for pages</a>.</p>
<ul>
<li class="">Change the HTML element for the page <b>title</b> from an <code><h1></code> to an <code><h2></code>.</li>
<li class="">Add the page's <b>author</b> after the page content in a <code><p></code> tag.</li>
</ul>
<div class="delayed">
<pre><code class="hljs xml">
<div class="section-header text-center">
<h2>{{ page.title }}</h2>
</div>
<div class="rte">
{{ page.content }}
</div>
<p>{{ page.author }}</p>
</code></pre>
</div>
<p class="presenter-notes">
Remind class it's about incremental steps - don't try both of these in one change.
Find out where the page's title is coming from. Find out where the page content ends.
Check out your About Us page. The author is going to be Shopify, since that page was pre-written.
But make a NEW page and preview it - your name should be at the bottom.
</p>
</section>
<section class="slide">
<div class="row">
<div class="col col--one-half">
<img class="contain--img" src="framework/img/workshop/product-page.png">
</div>
<div class="col col--one-half">
<h2>Products</h2>
<div class="delayed">
<p><b>product.liquid</b></p>
<p>Base template for all your individual products.</p>
<p class="delayed">For Debut, this will contain a reference to
<code>{% section 'product-template' %}</code>
which will pull in the product template.
</p>
<div class="delayed">
<p><b>What's in it?</b></p>
<p>Product title and description</p>
<p>Pricing info and variant options</p>
<p>Add to Cart button</p>
<p>Related products</p>
</div>
</div>
</div>
</div>
</section>
<section class="slide">
<h2>Exercise #4: Intro to liquid objects</h2>
<p class="">You've decided you need to see the product's <b>type</b> listed after the product's description.</p>
<p>Need to know what <a href="https://docs.shopify.com/themes/liquid-documentation/objects/product">liquid objects are available for products</a>.</p>
<br>
<img src="framework/img/workshop/simple-product-type.png" class="center w66">
</section>
<section class="slide">
<h2>Exercise #4: Intro to liquid objects</h2>
<h3>product-template.liquid</h3>
<div class="delayed">
<pre><code class="hljs xml">
<div class="product-single__description rte" itemprop="description">
{{ product.description }}
</div>
<p>Type: {{ product.type }}</p>
</code></pre>
</div>
<p class="presenter-notes">
</p>
</section>
<section class="slide">
<h2>Exercise #5: Intro to liquid filters</h2>
<ul>
<li class="">You've decided you need to see the product's <b>type</b> listed <i>after</i> the product's description.</li>
<li class="">You want the text to also be a <b>link</b> to all products of that same type.</li>
</ul>
<div class="delayed">
<p class="">To accomplish the second task, we'll need to know what <a href="https://docs.shopify.com/themes/liquid-documentation/filters">liquid filters</a> are available to us.</p>
</div>
<div class="delayed">
<p>Filters <b>modify</b> whatever they are attached to.</p>
<h3>Example</h3>
<pre><code class="hljs xml">
{{ product.property | filter }}
</code></pre>
<p><b>Pro tip</b>: That line is called a "pipe".</p>
</div>
<p class="presenter-notes">
There are two instances of product.title - need to choose the right one.
Explain what a "pipe" is and where to find it.
Put a picture of the keyboard and point out where it is.
</p>
</section>
<section class="slide">
<h2>Types of filters</h2>
<p><b><a href="https://docs.shopify.com/themes/liquid-documentation/filters/string-filters">String Filters</a></b>: for when we want to modify words, sentences, titles, anything with characters.</p>
<div class="delayed">
<h3>Liquid</h3>
<pre><code class="hljs xml">
{{ 'How are you?' | upcase }}
{{ product.handle | append: '.png' }}
{{ article.author | replace: 'Nathan', 'Vinay' | prepend: 'Capt. ' }}
</code></pre>
</div>
<div class="delayed">
<h3>Result</h3>
<pre><code class="hljs xml">