You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-customizations.md
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,6 @@ date: 2020-09-08 11:58:22
4
4
slug: advanced-customizations
5
5
description:
6
6
---
7
-
import CopyToClipBoard from "../src/components/CopyToClipboard.vue"
8
-
import { filters } from "../data/markdown-helpers/filters.js"
9
7
10
8
## Customize CSS
11
9
The styling of the theme is made up of [Sass](https://sass-lang.com/), [Bulma](https://bulma.io/), and the [CC Vocabulary](https://cc-vocabulary.netlify.app/). All the boilerplate for creating custom styles is in the **front** directory in the root of the CC Base Child Theme starter. All custom styles in **front/styles/** will override default theme styles as long as you use the same CSS classes used in the parent theme.
@@ -17,16 +15,11 @@ _As a prerequisite the CC Base Child Theme starter must be installed in the **wo
17
15
- Open the wordpress directory in a text editor or IDE of your choice.
18
16
- Navigate into the **wordpress**/**wp-content**/**themes**/**cc-wp-base-theme-starter**/**front** directory.
19
17
- Install all the necessary node modules by running the command below in your terminal:
20
-
21
-
<CopyToClipBoardtext="npm install"/>
22
-
18
+
-`npm install`
23
19
- To add custom styles cd into the styles folder, add your styles in the relevant sass files.
24
20
- Run the npm scripts below in your terminal, to watch and compile your styles respectively.
25
-
```
26
-
npm watch
27
-
28
-
npm build
29
-
```
21
+
-`npm watch`
22
+
-`npm build`
30
23
31
24
## Advanced Widgets
32
25
@@ -36,37 +29,44 @@ The widgets in the theme can be divided into three categories: default WordPress
36
29
These are widgets that come prepackaged in WordPress to learn more about them view [WordPress Widgets](https://wordpress.org/support/article/wordpress-widgets/).
37
30
38
31
### Layout Widgets
32
+
39
33
These widgets are used to design the structure of the widget areas. The layout widgets are powered by CSS Grid and they effectively work in pairs as it is outlined below.
40
34
41
35
#### Column Container Open and Column Container Close
36
+
42
37
These are used to create containers. Column Containers are blocks of space that are designed to wrap Single Column Widgets.
43
38
44
39
##### Column Container Open
40
+
45
41
The Column Container Open widget is used to initialize a container component.
- Remove Gap: This parameter denotes horizontal the space in between inner columns as well as the space below and above the container, in css those spaces are defined by grid gap, margin bottom, and margin top respectively. These all have a default value of 0.75rem.
51
47
- Column Count: This parameter will allow you to set the number of columns in the container.
52
48
- Space: This parameter denotes the vertical space in between inner columns.
53
49
54
50
##### Column Container Close
51
+
55
52
The Column Container Close widget is used to close an existing container. It essentially marks the end of a container that was opened using the Column Container Open widget. It has no parameters.
56
53
57
54
#### Single Column Open and Single Column Close
55
+
58
56
These widgets effectively form a single column structure which can be populated with any other widget.
59
57
60
58
##### Single Column Open
59
+
61
60
The Single Column Open widget is used to initialize a column component.
62
61
Its parameters are shown in the screenshot below:
63
62
64
-

63
+

65
64
66
65
- How many columns should be used: This parameter is used to configure the span of a single column. The parent container (refer to the previous section for more details) consists of a fixed number of columns which are set using the parameter Column Count. The How many columns should use field will allow you to set the number of columns the single column should occupy from the preset number columns.
67
66
- Color: This parameter is used to set the background color of the single column.
68
67
69
68
##### Single Column Close
69
+
70
70
The Single Column Close widget is used to close an existing column. It essentially marks the end of a column that was opened using the Single Column Open widget. It has no parameters.
71
71
72
72
Follow the steps below to create a column container and populate it with a couple of widgets:
@@ -80,6 +80,7 @@ Follow the steps below to create a column container and populate it with a coupl
80
80
- The final step is to add the Column Container Close widget to the Homepage panel so as to close off the Column Container.
81
81
82
82
### CC Custom Content Widgets
83
+
83
84
These widgets are prefixed by the acronym CC which stands for Creative Commons. They add custom Creative Commons assets and or content which may include social media content or special components derived from the CC Vocabulary.
84
85
85
86
- CC Card: this widget was adapted from [Cards](https://cc-vocabulary.netlify.app/?path=/story/layouts-cards--post-vertical), a CC Vocabulary Component.
@@ -98,7 +99,9 @@ The following filters are available in the theme:
98
99
99
100
Applied to expand the mandatory sidebars of the theme. It gets an array of the mandatory sidebars of the base theme as a parameter. The function should return an array with the sidebars:
0 commit comments