Skip to content

Commit 2af645c

Browse files
authored
Merge pull request #99 from creativecommons/docs-improvements
Improve static documentation
2 parents 9c5b357 + fd638b8 commit 2af645c

58 files changed

Lines changed: 98 additions & 1510 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.editorconfig

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/.eslintrc.js

Lines changed: 0 additions & 104 deletions
This file was deleted.

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ dist
88
.env.*
99
.netlify
1010
package-lock.json
11+
_site/
12+
.sass-cache

docs/.prettierrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/_config.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
theme: jekyll-theme-cayman
1+
remote_theme: pmarsceill/just-the-docs
2+
3+
logo: "/assets/images/CC-theme-base.svg"
4+
5+
aux_links:
6+
"CC Open Source":
7+
- "https://opensource.creativecommons.org/"
8+
9+
gh_edit_link: true # show or hide edit this page link
10+
gh_edit_link_text: "Edit this page on GitHub."
11+
gh_edit_repository: "https://github.com/creativecommons/creativecommons-base/"
12+
gh_edit_branch: "main" # the branch that the docs are served from
13+
gh_edit_source: docs # the source directory where the docs are located
14+
gh_edit_view_mode: "tree"
Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ date: 2020-09-08 11:58:22
44
slug: advanced-customizations
55
description:
66
---
7-
import CopyToClipBoard from "../src/components/CopyToClipboard.vue"
8-
import { filters } from "../data/markdown-helpers/filters.js"
97

108
## Customize CSS
119
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
1715
- Open the wordpress directory in a text editor or IDE of your choice.
1816
- Navigate into the **wordpress**/**wp-content**/**themes**/**cc-wp-base-theme-starter**/**front** directory.
1917
- Install all the necessary node modules by running the command below in your terminal:
20-
21-
<CopyToClipBoard text="npm install"/>
22-
18+
- `npm install`
2319
- To add custom styles cd into the styles folder, add your styles in the relevant sass files.
2420
- 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`
3023

3124
## Advanced Widgets
3225

@@ -36,37 +29,44 @@ The widgets in the theme can be divided into three categories: default WordPress
3629
These are widgets that come prepackaged in WordPress to learn more about them view [WordPress Widgets](https://wordpress.org/support/article/wordpress-widgets/).
3730

3831
### Layout Widgets
32+
3933
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.
4034

4135
#### Column Container Open and Column Container Close
36+
4237
These are used to create containers. Column Containers are blocks of space that are designed to wrap Single Column Widgets.
4338

4439
##### Column Container Open
40+
4541
The Column Container Open widget is used to initialize a container component.
4642
Its parameters are shown in the screenshot below:
4743

48-
![Open column container widget parameters](../src/assets/content-images/advanced-widgets/open-column.png)
44+
![Open column container widget parameters](https://opensource.creativecommons.org/creativecommons-base/assets/content-images/advanced-widgets/open-column.png)
4945

5046
- 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.
5147
- Column Count: This parameter will allow you to set the number of columns in the container.
5248
- Space: This parameter denotes the vertical space in between inner columns.
5349

5450
##### Column Container Close
51+
5552
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.
5653

5754
#### Single Column Open and Single Column Close
55+
5856
These widgets effectively form a single column structure which can be populated with any other widget.
5957

6058
##### Single Column Open
59+
6160
The Single Column Open widget is used to initialize a column component.
6261
Its parameters are shown in the screenshot below:
6362

64-
![Single column open container widget parameters](../src/assets/content-images/advanced-widgets/single-column-open.png)
63+
![Single column open container widget parameters](https://opensource.creativecommons.org/creativecommons-base/assets/content-images/advanced-widgets/single-column-open.png)
6564

6665
- 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.
6766
- Color: This parameter is used to set the background color of the single column.
6867

6968
##### Single Column Close
69+
7070
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.
7171

7272
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
8080
- The final step is to add the Column Container Close widget to the Homepage panel so as to close off the Column Container.
8181

8282
### CC Custom Content Widgets
83+
8384
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.
8485

8586
- 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:
9899

99100
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:
100101

101-
<CopyToClipBoard :text="filters.sidebar" />
102+
```
103+
filters.sidebar
104+
```
102105

103106
**cc_theme_base_menus**
104107

@@ -116,7 +119,9 @@ array(
116119
```
117120
If you want to add new menu placeholder:
118121

119-
<CopyToClipboard :text="filters.placeholder" />
122+
```
123+
filters.placeholder
124+
```
120125

121126
### Using Actions
122127

docs/src/assets/content-images/advanced-widgets/open-column.png renamed to docs/assets/content-images/advanced-widgets/open-column.png

File renamed without changes.

docs/src/assets/content-images/advanced-widgets/single-column-open.png renamed to docs/assets/content-images/advanced-widgets/single-column-open.png

File renamed without changes.

docs/src/assets/content-images/customizations/default-page.png renamed to docs/assets/content-images/customizations/default-page.png

File renamed without changes.

0 commit comments

Comments
 (0)