Sources: video-subtitle-pipeline artifacts/beginner-wordpress-user/ - subtitles/: en, zh, bilingual SRT/ASS (100 files) - platform/: youtube SRT + bilibili BCC per video (75 files) - manifests/: per-video manifest.json (25 files) - quality/: quality reports (50 files)
515 lines
15 KiB
Text
515 lines
15 KiB
Text
1
|
|
00:00:00,000 --> 00:00:04,000
|
|
我们已经学会了使用和组合区块来构建我们的站点。
|
|
We have learned to use and group blocks to build our site.
|
|
|
|
2
|
|
00:00:04,000 --> 00:00:09,714
|
|
但你知道有一个捷径可以更快地创建自定义内容布局吗?
|
|
But do you know there is a shortcut to create custom content layouts faster,
|
|
|
|
3
|
|
00:00:09,714 --> 00:00:12,000
|
|
那就是使用区块模式。
|
|
and that is using block patterns.
|
|
|
|
4
|
|
00:00:12,000 --> 00:00:16,000
|
|
我们并非都是设计师,创建布局很耗时。
|
|
We are not all designers and it is time consuming to create layouts.
|
|
|
|
5
|
|
00:00:16,000 --> 00:00:19,000
|
|
区块模式提供了一个解决方案。
|
|
Block patterns provide a solution.
|
|
|
|
6
|
|
00:00:19,000 --> 00:00:24,750
|
|
本课的学习目标是使用和修改可用的预制区块模式,
|
|
The learning objectives for this lesson are using and modifying available pre-made block patterns,
|
|
|
|
7
|
|
00:00:24,750 --> 00:00:30,750
|
|
探索区块模式目录,创建您自己的同步和非同步模式,
|
|
exploring the block pattern directory, creating your own synced and non-synced patterns,
|
|
|
|
8
|
|
00:00:30,750 --> 00:00:34,000
|
|
最后是利用页眉和照片模式。
|
|
and lastly utilizing header and photo patterns.
|
|
|
|
9
|
|
00:00:34,000 --> 00:00:36,000
|
|
但什么是模式呢?
|
|
But what are patterns?
|
|
|
|
10
|
|
00:00:36,000 --> 00:00:39,912
|
|
区块模式是预制好的分组区块设计或布局,
|
|
Block patterns are pre-made designs or layouts of grouped blocks
|
|
|
|
11
|
|
00:00:39,912 --> 00:00:43,000
|
|
可供修改和调整以满足您的需求。
|
|
that are available to modify and change to meet your needs.
|
|
|
|
12
|
|
00:00:43,000 --> 00:00:48,000
|
|
它本质上能节省您的时间,同时也能增强创意和设计。
|
|
It will essentially save you time, but also enhance creativity and design.
|
|
|
|
13
|
|
00:00:48,000 --> 00:00:53,000
|
|
无需您自己嵌套和组合区块,样板已经为您做好了这些。
|
|
Instead of nesting and grouping blocks together, patterns have already done that for you.
|
|
|
|
14
|
|
00:00:53,000 --> 00:00:57,513
|
|
只需点击一下,您就能获得美观且功能性的布局,
|
|
And in one click, you will have access to beautiful and functional layouts
|
|
|
|
15
|
|
00:00:57,513 --> 00:01:01,000
|
|
从行动号召、页眉、栏目、画廊等等。
|
|
from call to actions, headers, columns, galleries and more.
|
|
|
|
16
|
|
00:01:01,000 --> 00:01:07,136
|
|
要添加一个样板,请点击左上角的加号图标,也称为插入器,
|
|
To add a pattern, click on the plus icon on the top left, also called the insertor,
|
|
|
|
17
|
|
00:01:07,136 --> 00:01:11,000
|
|
然后打开右侧区块旁边的样板选项卡。
|
|
and open up the patterns tab on the right next to blocks.
|
|
|
|
18
|
|
00:01:11,000 --> 00:01:14,000
|
|
在顶部,您会看到全部样板。
|
|
At the top, you will see all patterns.
|
|
|
|
19
|
|
00:01:14,000 --> 00:01:21,000
|
|
在它下面,是您自己创建的所有同步和非同步样板。
|
|
And below that, all your synced and non-synced patterns you have created yourself.
|
|
|
|
20
|
|
00:01:21,000 --> 00:01:25,974
|
|
同步样板标有紫色图标,而非同步样板则没有,
|
|
Synced patterns are marked with a purple icon and non-synced patterns don't have one,
|
|
|
|
21
|
|
00:01:25,974 --> 00:01:30,000
|
|
但关于同步和非同步样板稍后再详谈。
|
|
but more about synced and non-synced patterns in a moment.
|
|
|
|
22
|
|
00:01:30,000 --> 00:01:34,000
|
|
在我的样板下方,您会看到随您的主题附带的样板。
|
|
Below my patterns, you will see the patterns that come with your theme.
|
|
|
|
23
|
|
00:01:34,000 --> 00:01:39,000
|
|
它们被组织到不同的分类中,以帮助您找到所需内容。
|
|
They are organized into various categories to help you find what you need.
|
|
|
|
24
|
|
00:01:39,000 --> 00:01:41,333
|
|
一旦您点击某个分类,
|
|
Once you click on the category,
|
|
|
|
25
|
|
00:01:41,333 --> 00:01:46,000
|
|
向下滚动时,您将看到所有可用样板/区块样板的预览。
|
|
you will see a preview of all the available patterns when you scroll down.
|
|
|
|
26
|
|
00:01:46,000 --> 00:01:50,645
|
|
您也可以选择底部的“探索所有样板/区块样板”,
|
|
You can also select explore all patterns at the bottom
|
|
|
|
27
|
|
00:01:50,645 --> 00:01:54,000
|
|
以鸟瞰您的主题附带的样板/区块样板。
|
|
to get a bird's eye view of the patterns that come with your theme.
|
|
|
|
28
|
|
00:01:54,000 --> 00:01:59,000
|
|
您也可以逐个分类地浏览它们。
|
|
You can also go through them category by category.
|
|
|
|
29
|
|
00:01:59,000 --> 00:02:02,000
|
|
让我们看一个简单的例子。
|
|
Let's look at a quick example.
|
|
|
|
30
|
|
00:02:02,000 --> 00:02:06,381
|
|
当您选择一个样板/区块样板时,比如这个来自我的推荐分类,
|
|
When you select a pattern, in this case one from my featured category,
|
|
|
|
31
|
|
00:02:06,381 --> 00:02:10,000
|
|
您将能够修改该样板/区块样板以满足您的设计要求。
|
|
you will be able to modify the pattern to meet your design requirements.
|
|
|
|
32
|
|
00:02:10,000 --> 00:02:15,000
|
|
它可以像任何其他区块一样轻松编辑。
|
|
It can easily be edited in the same way as any other block.
|
|
|
|
33
|
|
00:02:15,000 --> 00:02:20,000
|
|
您可以更改容器区块的对齐方式。
|
|
You can change the alignment of the container block.
|
|
|
|
34
|
|
00:02:20,000 --> 00:02:23,000
|
|
您可以编辑标题。
|
|
You can edit the heading.
|
|
|
|
35
|
|
00:02:23,000 --> 00:02:26,000
|
|
更新内容。
|
|
Update the content.
|
|
|
|
36
|
|
00:02:26,000 --> 00:02:33,000
|
|
替换图像。
|
|
Replace the images.
|
|
|
|
37
|
|
00:02:33,000 --> 00:02:40,000
|
|
例如,更改您区块样板的背景颜色以及其他样式选项。
|
|
And for example, change the background color of your pattern as well as other styling options.
|
|
|
|
38
|
|
00:02:40,000 --> 00:02:44,000
|
|
但所有繁重的工作和布局都已为您完成。
|
|
But all the hard work and the layout has already been done for you.
|
|
|
|
39
|
|
00:02:44,000 --> 00:02:51,000
|
|
您唯一需要做的就是选择区块样板并修改它以满足您的要求。
|
|
The only thing you have to do is select the pattern and modify it to meet your requirements.
|
|
|
|
40
|
|
00:02:51,000 --> 00:02:54,000
|
|
您的主题附带的区块样板是有限的。
|
|
The patterns that come with your theme are limited.
|
|
|
|
41
|
|
00:02:54,000 --> 00:02:59,000
|
|
如果您想要更多区块样板可供选择,可以探索区块模式目录。
|
|
If you want more patterns to choose from, you can explore the block pattern directory.
|
|
|
|
42
|
|
00:02:59,000 --> 00:03:04,000
|
|
为此,让我们前往 WordPress.org 网站。
|
|
To do that, let's make our way to the WordPress.org website.
|
|
|
|
43
|
|
00:03:04,000 --> 00:03:10,000
|
|
点击“扩展”,然后选择“模式”。
|
|
Click on extend and then select patterns.
|
|
|
|
44
|
|
00:03:10,000 --> 00:03:15,000
|
|
在这里,您可以搜索并找到新的区块样板,用于您的网站。
|
|
Here you can search and find new patterns to use on your website.
|
|
|
|
45
|
|
00:03:15,000 --> 00:03:18,938
|
|
您会注意到有一个选项,可以仅查看精选模式,
|
|
You will notice there is an option to only view curated patterns
|
|
|
|
46
|
|
00:03:18,938 --> 00:03:24,000
|
|
或者查看由 WordPress 社区添加的数百种模式。
|
|
or hundreds of patterns that have been added by the WordPress community.
|
|
|
|
47
|
|
00:03:24,000 --> 00:03:28,610
|
|
您可以在搜索区块中输入关键词,按分类搜索,
|
|
You can type in the search block, search by category
|
|
|
|
48
|
|
00:03:28,610 --> 00:03:33,000
|
|
或者浏览所有可用选项,直到找到您想要的。
|
|
or browse through all the available options until you find what you're looking for.
|
|
|
|
49
|
|
00:03:33,000 --> 00:03:35,357
|
|
一旦找到你想要的样板/区块样板,
|
|
Once you find the pattern you are after,
|
|
|
|
50
|
|
00:03:35,357 --> 00:03:39,000
|
|
你可以点击星标,将其添加到你的收藏夹。
|
|
you can click on the star to add it to your favorites.
|
|
|
|
51
|
|
00:03:39,000 --> 00:03:49,909
|
|
当你准备好将样板/区块样板添加到你的站点时,打开该样板/区块样板,点击“复制样板/区块样板”,
|
|
When you are ready to add the pattern to your site, open the pattern, click on copy pattern,
|
|
|
|
52
|
|
00:03:49,909 --> 00:03:54,000
|
|
然后返回你的网站并粘贴。
|
|
return to your website and then paste.
|
|
|
|
53
|
|
00:03:54,000 --> 00:04:00,000
|
|
现在,你就可以开始更改和修改你的样板/区块样板了。
|
|
And now you can start changing and modifying your pattern.
|
|
|
|
54
|
|
00:04:00,000 --> 00:04:06,000
|
|
这就是我的样板/区块样板经过修改以满足设计需求后的样子。
|
|
And this is what my pattern looks like after altering it to meet my design needs.
|
|
|
|
55
|
|
00:04:06,000 --> 00:04:10,606
|
|
当你进入站点编辑器,在这个侧边视图中,
|
|
When you make your way to the site editor, and in this side view,
|
|
|
|
56
|
|
00:04:10,606 --> 00:04:14,000
|
|
你会看到一个“样板/区块样板”标签页。
|
|
you will see a patterns tab.
|
|
|
|
57
|
|
00:04:14,000 --> 00:04:20,105
|
|
在这里,你可以管理、编辑和创建你所有的样板/区块样板,无论是否同步,
|
|
And here you can manage, edit and create all of your patterns, synced or not,
|
|
|
|
58
|
|
00:04:20,105 --> 00:04:22,000
|
|
以及你的模板部分。
|
|
along with your template parts.
|
|
|
|
59
|
|
00:04:22,000 --> 00:04:26,000
|
|
当你点击“我的样板/区块样板”时,你将看到所有自定义样板/区块样板。
|
|
When you click on my patterns, you will see all your custom patterns.
|
|
|
|
60
|
|
00:04:26,000 --> 00:04:31,000
|
|
同步的样板/区块样板有一个紫色图标,非同步的则没有。
|
|
The synced patterns have a purple icon and the unsynced patterns don't.
|
|
|
|
61
|
|
00:04:31,000 --> 00:04:33,927
|
|
如果你将鼠标悬停在紫色图标上,
|
|
If you hover over the purple icon,
|
|
|
|
62
|
|
00:04:33,927 --> 00:04:39,000
|
|
它会清楚地说明,编辑此样板也会更新所有使用它的地方。
|
|
it clearly says editing this pattern will also update anywhere it is used.
|
|
|
|
63
|
|
00:04:39,000 --> 00:04:44,176
|
|
在自定义样板下方,我们会看到所有可用的分类,
|
|
Below custom patterns, we will see all the available categories
|
|
|
|
64
|
|
00:04:44,176 --> 00:04:47,000
|
|
以及您的主题提供的样板。
|
|
as well as the patterns that are provided by your theme.
|
|
|
|
65
|
|
00:04:47,000 --> 00:04:52,614
|
|
同样值得注意的是,当您点击主题自带的某个样板上的三个垂直圆点时,
|
|
It is also worth noting when you click on the three vertical dots of a pattern that comes with your theme,
|
|
|
|
66
|
|
00:04:52,614 --> 00:04:57,000
|
|
您也可以复制该样板并将其添加到您的自定义样板区域。
|
|
you can also duplicate and add that pattern to your custom patterns area.
|
|
|
|
67
|
|
00:04:57,000 --> 00:05:02,000
|
|
当您将其保存为自定义样板后,就可以随意修改它了。
|
|
And when you've saved it as a custom pattern, you can modify it as you please.
|
|
|
|
68
|
|
00:05:02,000 --> 00:05:08,000
|
|
而在底部,则是您所有的页眉、页脚和通用模板部件样板。
|
|
And at the bottom, all your header, footer and general template part patterns.
|
|
|
|
69
|
|
00:05:08,000 --> 00:05:10,308
|
|
让我们从您自己的样板开始。
|
|
Let's start with your own patterns.
|
|
|
|
70
|
|
00:05:10,308 --> 00:05:13,513
|
|
如果您点击样板旁边的加号图标,
|
|
If you click on the plus icon next to patterns,
|
|
|
|
71
|
|
00:05:13,513 --> 00:05:18,000
|
|
就可以创建您自己的自定义同步或非同步样板。
|
|
you can create your own custom synced or unsynced patterns.
|
|
|
|
72
|
|
00:05:18,000 --> 00:05:22,000
|
|
为其命名后,您可以将其添加到相关分类。
|
|
After naming it, you can add it to the relevant category.
|
|
|
|
73
|
|
00:05:22,000 --> 00:05:27,000
|
|
在这个例子中,是一个行动号召分类。
|
|
In this case, a call to action category.
|
|
|
|
74
|
|
00:05:27,000 --> 00:05:31,000
|
|
然后您可以选择是否同步它。
|
|
And then you can choose to sync it or not.
|
|
|
|
75
|
|
00:05:31,000 --> 00:05:35,000
|
|
在这个示例中,我将选择同步该样板。
|
|
In this example, I will choose to sync the pattern.
|
|
|
|
76
|
|
00:05:35,000 --> 00:05:41,000
|
|
在底部,它写着“在多个位置同步此样板”。
|
|
And at the bottom, it says sync this pattern across multiple locations.
|
|
|
|
77
|
|
00:05:41,000 --> 00:05:44,000
|
|
现在您可以开始创建您的同步样板了。
|
|
And now you can start creating your synced pattern.
|
|
|
|
78
|
|
00:05:44,000 --> 00:05:48,286
|
|
当它准备就绪时,我们就可以点击保存。
|
|
And when it is ready, we can click save.
|
|
|
|
79
|
|
00:05:48,286 --> 00:05:54,471
|
|
要在区块编辑器中创建一个样板,只需先选中设计,
|
|
To create a pattern in the block editor, merely select the design,
|
|
|
|
80
|
|
00:05:54,471 --> 00:06:02,000
|
|
然后点击区块工具栏上的三个垂直圆点,并选择“创建样板”。
|
|
then click on the three vertical dots of the block toolbar, and select create pattern.
|
|
|
|
81
|
|
00:06:02,000 --> 00:06:07,000
|
|
然后遵循与之前相同的流程即可。
|
|
And then follow the same process as before.
|
|
|
|
82
|
|
00:06:07,000 --> 00:06:12,000
|
|
我将再次选择一个同步样板。
|
|
And I will once again select a synced pattern.
|
|
|
|
83
|
|
00:06:12,000 --> 00:06:15,188
|
|
所以如果你喜欢某个设计,可以保存它
|
|
So if you love a design, you can save it
|
|
|
|
84
|
|
00:06:15,188 --> 00:06:18,000
|
|
并将其复用为同步或非同步样板。
|
|
and reuse it as a synced or non-synced pattern.
|
|
|
|
85
|
|
00:06:18,000 --> 00:06:21,000
|
|
最后,我们来谈谈模板部分。
|
|
Lastly, let's talk about template parts.
|
|
|
|
86
|
|
00:06:21,000 --> 00:06:26,000
|
|
要管理您的页眉和页脚,您可以使用模板部分样板。
|
|
To manage your header and footer, you have template part patterns at your disposal.
|
|
|
|
87
|
|
00:06:26,000 --> 00:06:28,364
|
|
模板为网页创建了一个设计,
|
|
Templates create a design for a web page,
|
|
|
|
88
|
|
00:06:28,364 --> 00:06:32,000
|
|
这通常通过添加页眉和页脚模板部分来实现。
|
|
and this is usually done by adding a header and footer template part.
|
|
|
|
89
|
|
00:06:32,000 --> 00:06:41,000
|
|
让我们看个例子,打开我们的页面模板。
|
|
Let's look at an example and open up our page template.
|
|
|
|
90
|
|
00:06:41,000 --> 00:06:45,730
|
|
当你打开页面模板后,我们可以继续并选择当前的页眉,
|
|
And when you open your page template, we can go ahead and select our current header,
|
|
|
|
91
|
|
00:06:45,730 --> 00:06:48,000
|
|
然后点击那三个垂直的点。
|
|
and then click on the three vertical dots.
|
|
|
|
92
|
|
00:06:48,000 --> 00:06:51,000
|
|
现在我们可以选择“替换页眉”。
|
|
And now we can select replace header.
|
|
|
|
93
|
|
00:06:51,000 --> 00:06:55,900
|
|
当你这样做时,你可以选择一个现有的模板部分
|
|
And when you do this, you can select one of your existing template parts
|
|
|
|
94
|
|
00:06:55,900 --> 00:06:58,000
|
|
或主题自带的样板。
|
|
or patterns that come with your theme.
|
|
|
|
95
|
|
00:06:58,000 --> 00:07:05,000
|
|
对于页脚,操作方式完全相同。
|
|
And it works exactly the same way with your footer.
|
|
|
|
96
|
|
00:07:05,000 --> 00:07:09,000
|
|
在样板下方,你可以管理和编辑现有的模板部分。
|
|
Below patterns, you can manage and edit your existing template parts.
|
|
|
|
97
|
|
00:07:09,000 --> 00:07:12,818
|
|
要添加新的模板部分,点击样板旁边的加号图标
|
|
To add a new template part, click on the plus icon next to patterns
|
|
|
|
98
|
|
00:07:12,818 --> 00:07:15,000
|
|
并选择“创建模板部分”。
|
|
and select create template part.
|
|
|
|
99
|
|
00:07:15,000 --> 00:07:22,000
|
|
在这里,你可以选择创建通用的页脚或页眉模板部分。
|
|
Here you will be able to select between creating a general footer or header template part.
|
|
|
|
100
|
|
00:07:22,000 --> 00:07:31,000
|
|
要创建新的页眉模板部分,请为其命名,选择“页眉”,然后点击创建。
|
|
To create a new header template part, name it appropriately, select header, and then click create.
|
|
|
|
101
|
|
00:07:31,000 --> 00:07:37,000
|
|
然后你就可以在模板编辑模式下开始构建新的页眉了。
|
|
And then you can start building your new header in template editing mode.
|
|
|
|
102
|
|
00:07:37,000 --> 00:07:38,800
|
|
我相信样板也将成为
|
|
I trust that patterns will also become
|
|
|
|
103
|
|
00:07:38,800 --> 00:07:41,000
|
|
您最喜欢的新工具之一。
|
|
one of your favorite new tools.
|
|
|