FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-website/src/pages/tutorials.js at main · processing/processing-website · GitHub
processing
processing-website
Repository navigation
Code
Issues
112
(112)
Pull requests
17
(17)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
processing-website
/
src
/
pages
/
tutorials.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
153 lines (145 loc) · 4.64 KB
Breadcrumbs
processing-website
/
src
/
pages
/
tutorials.js
Copy path
File metadata and controls
153 lines (145 loc) · 4.64 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
React
from
'react'
;
import
{
graphql
}
from
'gatsby'
;
import
{
GatsbyImage
}
from
'gatsby-plugin-image'
;
import
{
LocalizedLink
as
Link
}
from
'gatsby-theme-i18n'
;
import
{
useIntl
}
from
'react-intl'
;
import
classnames
from
'classnames'
;
import
HeadMatter
from
'../components/HeadMatter'
;
import
Layout
from
'../components/Layout'
;
import
{
usePreparedTutorials
}
from
'../hooks/tutorials'
;
import
*
as
css
from
'../styles/pages/tutorials.module.css'
;
import
*
as
grid
from
'../styles/grid.module.css'
;
const
Tutorials
=
(
{
data
}
)
=>
{
const
intl
=
useIntl
(
)
;
const
videos
=
usePreparedTutorials
(
data
.
video
.
nodes
)
;
const
texts
=
usePreparedTutorials
(
data
.
text
.
nodes
)
;
return
(
<
Layout
>
<
HeadMatter
title
=
{
intl
.
formatMessage
(
{
id
:
'tutorials'
}
)
}
description
=
{
intl
.
formatMessage
(
{
id
:
'videoTutorialsIntro'
}
)
}
/>
<
div
className
=
{
classnames
(
grid
.
container
,
grid
.
grid
)
}
>
<
div
className
=
{
classnames
(
grid
.
col
,
css
.
text
)
}
>
<
h1
>
{
intl
.
formatMessage
(
{
id
:
'tutorials'
}
)
}
</
h1
>
<
h2
>
{
intl
.
formatMessage
(
{
id
:
'videoTutorials'
}
)
}
</
h2
>
<
h3
>
{
intl
.
formatMessage
(
{
id
:
'videoTutorialsIntro'
}
)
}
</
h3
>
</
div
>
<
ul
className
=
{
classnames
(
grid
.
col
,
grid
.
grid
,
css
.
list
)
}
>
{
videos
.
map
(
(
tutorial
,
k
)
=>
{
return
(
<
li
key
=
{
k
}
className
=
{
classnames
(
grid
.
col
,
css
.
card
)
}
>
<
a
href
=
{
tutorial
.
link
}
target
=
"_blank"
rel
=
"noreferrer"
>
{
tutorial
.
image
&&
<
Image
tutorial
=
{
tutorial
}
/>
}
<
h4
>
{
tutorial
.
title
}
</
h4
>
<
div
>
<
span
className
=
{
css
.
author
}
>
{
intl
.
formatMessage
(
{
id
:
'by'
}
)
}
{
' '
}
</
span
>
<
span
className
=
{
css
.
authorName
}
>
{
tutorial
.
author
}
</
span
>
</
div
>
</
a
>
<
span
className
=
{
css
.
brief
}
>
{
tutorial
.
intro
}
</
span
>
</
li
>
)
;
}
)
}
</
ul
>
<
div
className
=
{
classnames
(
grid
.
col
,
css
.
text
)
}
id
=
"text-tutorials"
>
<
h2
>
{
intl
.
formatMessage
(
{
id
:
'textTutorials'
}
)
}
</
h2
>
<
h3
>
{
intl
.
formatMessage
(
{
id
:
'textTutorialsIntro'
}
)
}
</
h3
>
</
div
>
<
ul
className
=
{
classnames
(
grid
.
col
,
grid
.
grid
,
css
.
list
)
}
>
{
texts
.
map
(
(
tutorial
,
k
)
=>
{
return
(
<
li
key
=
{
k
}
className
=
{
classnames
(
grid
.
col
,
css
.
card
)
}
>
<
Link
to
=
{
tutorial
.
slug
}
>
{
tutorial
.
image
&&
<
Image
tutorial
=
{
tutorial
}
/>
}
<
h4
>
{
tutorial
.
title
}
</
h4
>
<
div
>
<
span
className
=
{
css
.
author
}
>
{
intl
.
formatMessage
(
{
id
:
'by'
}
)
}
{
' '
}
</
span
>
<
span
className
=
{
css
.
authorName
}
>
{
tutorial
.
author
}
</
span
>
</
div
>
<
span
className
=
{
css
.
brief
}
>
{
tutorial
.
intro
}
</
span
>
<
span
className
=
{
css
.
level
}
>
{
intl
.
formatMessage
(
{
id
:
'level'
}
)
}
:
{
tutorial
.
level
}
</
span
>
</
Link
>
</
li
>
)
;
}
)
}
</
ul
>
</
div
>
</
Layout
>
)
;
}
;
const
Image
=
(
{
tutorial
}
)
=>
{
return
(
<
div
className
=
{
css
.
cover
}
>
<
GatsbyImage
className
=
{
css
.
image
}
alt
=
{
`Image for the
${
tutorial
.
title
}
tutorial`
}
image
=
{
tutorial
.
image
}
objectFit
=
"cover"
/>
</
div
>
)
;
}
;
export
default
Tutorials
;
export
const
query
=
graphql
`
query($locale: String!) {
video: allFile(
filter: {
sourceInstanceName: { eq: "tutorials" }
childMdx: { fields: { locale: { eq: $locale } } }
relativeDirectory: { glob: "video/*" }
}
sort: { order: ASC, fields: childrenMdx___frontmatter___order }
) {
nodes {
name
childMdx {
frontmatter {
order
link
title
author
intro
coverImage {
childImageSharp {
gatsbyImageData(width: 600)
}
}
}
}
}
}
text: allFile(
filter: {
sourceInstanceName: { eq: "tutorials" }
childMdx: { fields: { locale: { eq: $locale } } }
relativeDirectory: { glob: "text/*" }
}
sort: { order: ASC, fields: childrenMdx___frontmatter___order }
) {
nodes {
name
childMdx {
frontmatter {
slug
title
author
intro
level
coverImage {
childImageSharp {
gatsbyImageData(width: 600)
}
}
}
}
}
}
}
`
;
Back
|
FazBrowse Home
|
New Git URL