Skip to content

Commit 09b3cee

Browse files
Add list_order to gql query
1 parent fe4f215 commit 09b3cee

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

web/components/TableOfContents.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import React from 'react'
2+
import styled from 'styled-components'
3+
4+
// const H2 = styled.h2`
5+
// margin-top: 50px;
6+
// font-weight: 400;
7+
// `
28

39
export default function TableOfContents({ data }) {
410
console.log('ToC data: ', data)

web/components/TopicSection.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import React from 'react'
22
import ShortcutTable from './ShortcutTable'
33
import DescriptiveItem from './DescriptiveItem'
4+
// import styled from 'styled-components'
5+
6+
// const H3 = styled.h3`
7+
// color: rgb(255, 163, 133);
8+
// margin-bottom: 10px;
9+
// font-weight: 600;
10+
// `
411

512
export default function TopicSection(props) {
613
console.log('TopicSection props: ', props)

web/src/pages/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Index({ data }) {
2929

3030
export const query = graphql`
3131
{
32-
allSanitySection {
32+
allSanitySection(sort: {fields: list_order}) {
3333
edges {
3434
node {
3535
_id
@@ -39,6 +39,7 @@ export const query = graphql`
3939
_type
4040
name
4141
description
42+
list_order
4243
external_links {
4344
_id
4445
_type
@@ -47,24 +48,23 @@ export const query = graphql`
4748
}
4849
subsections {
4950
... on SanityGeneralSubsection {
50-
id
5151
_id
5252
_type
5353
name
5454
description
5555
syntax
5656
subsection_active
57-
code {
58-
_type
59-
code
60-
language
61-
}
6257
external_links {
6358
_id
6459
_type
6560
description
6661
url
6762
}
63+
code {
64+
_type
65+
code
66+
language
67+
}
6868
}
6969
... on SanityShortcutSubsection {
7070
id

web/src/styles/global.css

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,18 @@ header h1 {
7070
}
7171

7272
h2 {
73+
color: rgb(67, 159, 208);
7374
margin-top: 50px;
7475
font-weight: 400;
7576
}
7677

7778
h3 {
79+
color: rgb(255, 159, 128);
7880
margin-bottom: 10px;
7981
font-weight: 600;
8082
}
8183

82-
h1, h2, h3 {
83-
color: rgb(144, 210, 245)
84-
}
85-
8684
h2, h3 {
87-
color: rgb(67, 159, 208);
8885
font-size: 1.7em;
8986
}
9087

@@ -100,14 +97,6 @@ h2, h4, thead th {
10097
margin: 50px 0 20px;
10198
}
10299

103-
/* .section_description {
104-
font-family: 'Work Sans', sans-serif;
105-
padding: 5px;
106-
border: 1px dashed rgb(252, 93, 93);
107-
border-top: 0;
108-
background-color: white;
109-
} */
110-
111100
.incomplete_section::after {
112101
content: ' (Coming Soon)';
113102
}

0 commit comments

Comments
 (0)