Skip to content

Commit e2121de

Browse files
author
Brylie Christopher Oxley
committed
Clean up content
1 parent 85f801e commit e2121de

4 files changed

Lines changed: 52 additions & 31 deletions

File tree

docs/advanced-customizations.md

Lines changed: 20 additions & 9 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.
@@ -18,11 +16,12 @@ _As a prerequisite the CC Base Child Theme starter must be installed in the **wo
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:
2018

21-
<CopyToClipBoard text="npm install"/>
19+
```
20+
npm install
21+
```
2222

2323
- To add custom styles cd into the styles folder, add your styles in the relevant sass files.
24-
- Run the npm scripts below in your terminal, to watch and compile your styles respectively.
25-
```
24+
- Run the npm scripts below in your terminal, to watch and compile your styles respectively.```
2625
npm watch
2726

2827
npm build
@@ -36,37 +35,44 @@ The widgets in the theme can be divided into three categories: default WordPress
3635
These are widgets that come prepackaged in WordPress to learn more about them view [WordPress Widgets](https://wordpress.org/support/article/wordpress-widgets/).
3736
3837
### Layout Widgets
38+
3939
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.
4040
4141
#### Column Container Open and Column Container Close
42+
4243
These are used to create containers. Column Containers are blocks of space that are designed to wrap Single Column Widgets.
4344
4445
##### Column Container Open
46+
4547
The Column Container Open widget is used to initialize a container component.
4648
Its parameters are shown in the screenshot below:
4749
48-
![Open column container widget parameters](../src/assets/content-images/advanced-widgets/open-column.png)
50+
![Open column container widget parameters](/assets/content-images/advanced-widgets/open-column.png)
4951
5052
- 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.
5153
- Column Count: This parameter will allow you to set the number of columns in the container.
5254
- Space: This parameter denotes the vertical space in between inner columns.
5355
5456
##### Column Container Close
57+
5558
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.
5659
5760
#### Single Column Open and Single Column Close
61+
5862
These widgets effectively form a single column structure which can be populated with any other widget.
5963
6064
##### Single Column Open
65+
6166
The Single Column Open widget is used to initialize a column component.
6267
Its parameters are shown in the screenshot below:
6368
64-
![Single column open container widget parameters](../src/assets/content-images/advanced-widgets/single-column-open.png)
69+
![Single column open container widget parameters](/assets/content-images/advanced-widgets/single-column-open.png)
6570
6671
- 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.
6772
- Color: This parameter is used to set the background color of the single column.
6873
6974
##### Single Column Close
75+
7076
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.
7177
7278
Follow the steps below to create a column container and populate it with a couple of widgets:
@@ -80,6 +86,7 @@ Follow the steps below to create a column container and populate it with a coupl
8086
- The final step is to add the Column Container Close widget to the Homepage panel so as to close off the Column Container.
8187
8288
### CC Custom Content Widgets
89+
8390
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.
8491
8592
- 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 +105,9 @@ The following filters are available in the theme:
98105
99106
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:
100107
101-
<CopyToClipBoard :text="filters.sidebar" />
108+
```
109+
filters.sidebar
110+
```
102111
103112
**cc_theme_base_menus**
104113
@@ -116,7 +125,9 @@ array(
116125
```
117126
If you want to add new menu placeholder:
118127
119-
<CopyToClipboard :text="filters.placeholder" />
128+
```
129+
filters.placeholder
130+
```
120131
121132
### Using Actions
122133

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ date: 2020-09-08 12:07:49
44
slug: contributing
55
description:
66
---
7+
78
The CC WP Base Theme is an open-source project, we value all contributions be it feature requests, bug reports, and or pull requests, so please feel free to contribute. Before you contribute please familiarize yourself with our [Contributing Guidelines](https://opensource.creativecommons.org/contributing-code/).

docs/customizations.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Creative Commons Base Theme is highly flexible. Continue reading to learn ho
1313
- Go to **Customize** > **Site Identity**
1414
- In the field labeled **Site Title** enter a custom title of your site.
1515

16-
<![Emphasized title field and label](../src/assets/content-images/customizations/set-title.png)
16+
<![Emphasized title field and label](/assets/content-images/customizations/set-title.png)
1717

1818
## Custom site description or tag line
1919

@@ -22,7 +22,7 @@ The Creative Commons Base Theme is highly flexible. Continue reading to learn ho
2222
- Go to **Customize** > **Site Identity**
2323
- In the field labeled **Site Tagline** enter a custom tagline(or description) of your site.
2424

25-
![Emphasized tagline field and label](../src/assets/content-images/customizations/set-description.png)
25+
![Emphasized tagline field and label](/assets/content-images/customizations/set-description.png)
2626

2727
## Custom Icon
2828

@@ -32,19 +32,19 @@ The Creative Commons Base Theme is highly flexible. Continue reading to learn ho
3232
- Click the button labeled **Select Icon** to set up an icon.
3333
Note that the site icon must be a square that is 512 x 512 pixels.
3434

35-
![Emphasized icon field and label](../src/assets/content-images/customizations/set-icon.png)
35+
![Emphasized icon field and label](/assets/content-images/customizations/set-icon.png)
3636

3737
## Custom Navigation Menus
3838

3939
There are two menu locations in the site which are namely: Main Navigation and Footer Navigation.
4040

4141
The screenshot below shows an example of a custom menu in the Main Navigation:
4242

43-
![Main navigation](../src/assets/content-images/customizations/main-nav.png)
43+
![Main navigation](/assets/content-images/customizations/main-nav.png)
4444

4545
The screenshot below shows an example of a custom menu in the Footer Navigation:
4646

47-
![Footer navigation](../src/assets/content-images/customizations/footer-nav.png)
47+
![Footer navigation](/assets/content-images/customizations/footer-nav.png)
4848

4949
_The menus shown above are displayed in the desktop view. On any other screens, their appearance and or position might be different from what is shown above._
5050

@@ -56,15 +56,15 @@ _The menus shown above are displayed in the desktop view. On any other screens,
5656
- To proceed to the next step in the form, click the button labeled **Next**.
5757
- Then click the button labeled **+Add Items**, it will reveal all of the items which can be included in the menu.
5858

59-
![Form used to configure a custom menu on live preview](../src/assets/content-images/customizations/set-menu-live-preview.png)
59+
![Form used to configure a custom menu on live preview](/assets/content-images/customizations/set-menu-live-preview.png)
6060

6161
- Select menu items by clicking on them.
6262
- You are able to re-order the arrangement of selected menu items by dragging them up and down.
6363
- After you are done you may proceed to publish the changes.
6464

6565
### To create a custom menu using the dashboard:
6666

67-
![Form used to configure a custom menu on live preview](../src/assets/content-images/customizations/set-menu-dashboard.png)
67+
![Form used to configure a custom menu on live preview](/assets/content-images/customizations/set-menu-dashboard.png)
6868

6969
- Go to **Dashboard** > **Appearance** > **Menus**, the form in the diagram above will be shown.
7070
- Enter the menu name in the filled labeled **Menu Name**.
@@ -92,7 +92,7 @@ There are three layouts in the theme you can use to configure the structure of y
9292

9393
#### Default Layout
9494

95-
![Default page layout](../src/assets/content-images/customizations/default-page.png)
95+
![Default page layout](/assets/content-images/customizations/default-page.png)
9696

9797
This is the default layout of the page template, it has a default sidebar component on the left. To populate the sidebar with widgets:
9898

@@ -121,7 +121,7 @@ In order to display a static page on the homepage:
121121
- Create another page and give a title of your choice(e.g. Blog).
122122
- Go to **Dashboard** > **Settings** > **Reading**, and set your homepage display to the static page. Then set your Homepage to display the Homepage(the static page we created above) and set your posts to be displayed on the Blog page.
123123

124-
![Reading Settings](../src/assets/content-images/customizations/reading-settings.png)
124+
![Reading Settings](/assets/content-images/customizations/reading-settings.png)
125125

126126
- There are other optional settings outlined in the **Reading Settings** which you can use to also manage your site.
127127
- When done, click the button labeled **Save Changes**.
@@ -151,10 +151,10 @@ In order to display a static page on the homepage:
151151
- Select the Document tab
152152
- You will find Post Format listed in the Document settings.
153153
- Select your desired Post format from the dropdown:
154-
![Form to set post format](../src/assets/content-images/customizations/set-post-format.png)
154+
![Form to set post format](/assets/content-images/customizations/set-post-format.png)
155155
- Close the Settings by clicking on the gear icon.
156156
- On your editor at the very bottom of your post, click on the Post Format Panel so as to enlarge it.
157-
![Post format settings](../src/assets/content-images/customizations/post.png)
157+
![Post format settings](/assets/content-images/customizations/post.png)
158158
- Add relevant configuration details which will be influenced by the format you selected in the Settings.
159159

160160
### Post Formats
@@ -183,7 +183,7 @@ _If the above-listed post formats do not meet your requirements, you can complet
183183

184184
The widgets are available in **Dashboard** > **Appearance** > **Widgets**. On the left panel, we have the available widgets and the small panels on the right are the widget areas available in the theme.
185185

186-
![Available widgets](../src/assets/content-images/customizations/view-widgets.png)
186+
![Available widgets](/assets/content-images/customizations/view-widgets.png)
187187

188188
### To add a widget:
189189
- Drag it from the left panel into a widget area and provide the configuration information if it is required.
@@ -196,17 +196,17 @@ The widgets are available in **Dashboard** > **Appearance** > **Widgets**. On th
196196

197197
- Go to **Customize** > **Widgets**. If you are on a page that does not have any widget areas you will get a message shown in the screenshot below:
198198

199-
![No widgets listed on the live preview](../src/assets/content-images/customizations/no-widgets.png)
199+
![No widgets listed on the live preview](/assets/content-images/customizations/no-widgets.png)
200200

201201
When the page has widgets areas they are listed as shown in the screenshot below:
202202

203-
![Available widgets listed on the live preview](../src/assets/content-images/customizations/has-widgets.png)
203+
![Available widgets listed on the live preview](/assets/content-images/customizations/has-widgets.png)
204204

205205
- You select a widget area by clicking it.
206206
- To add widgets click the +Add Widget button and then select a widget from the widget panel on your right.
207207
- You are also able to search for widgets in the event the one you need is not displayed.
208208

209-
![Set widgets listed on the live preview](../src/assets/content-images/customizations/set-widgets.png)
209+
![Set widgets listed on the live preview](/assets/content-images/customizations/set-widgets.png)
210210

211211
- After adding widgets you can then publish your changes.
212212

docs/getting-started.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,39 @@ date: 2020-09-08 12:05:54
44
slug: getting-started
55
description:
66
---
7-
import CopyToClipBoard from "../src/components/CopyToClipboard.vue"
8-
import { queulatSettings } from "../data/markdown-helpers/queulat-settings.js"
97

108
To get started you have to first install the CC WP Base Theme locally.
119

1210
## Requirements
1311

1412
- [WordPress](https://wordpress.org/support/article/how-to-install-wordpress/)
15-
1613
- [Composer](https://getcomposer.org/): Install composer globally by following the [documentation](https://getcomposer.org/doc/00-intro.md#globally) for your particular OS.
1714

1815
_For a step by step guide on how you can set up WordPress in your local environment checkout [How to set up a local development...](https://www.endpoint.com/blog/2019/08/07/set-up-local-development-environment-for-wordpress)_
1916
## Installation Guide
2017

21-
1. Download the <a href="https://github.com/creativecommons/wp-theme-base/archive/master.zip">zip</a> package of the theme.
18+
1. Download the <a href="https://github.com/creativecommons/creativecommons-base/archive/master.zip">zip</a> package of the theme.
2219
2. Unzip to your wp-content/themes directory.
2320
3. Navigate to the wp-theme-base directory and run the command below on the terminal, to install all the necessary package dependencies:
2421

25-
<CopyToClipBoard text="composer install"/>
22+
```
23+
composer install
24+
```
2625

27-
One of the installed dependencies is [Queulat](https://github.com/felipelavinz/queulat). In-order to initialize Queulat in the project, follow the instructions provided in [feliperlavinz/queulat](https://github.com/felipelavinz/queulat#loading-queulat-as-mu-plugin).
26+
One of the installed dependencies is [Queulat](https://github.com/felipelavinz/queulat). In-order to initialize Queulat in the project, follow the instructions provided in [feliperlavinz/queulat](https://github.com/felipelavinz/queulat#loading-queulat-as-mu-plugin).
2827

2928
Alternatively, to initialize Queulat navigate to the mu-plugins directory. The mu-plugins directory is in the root of the wp-content folder. It’s automatically created when you install Queulat using composer. At the root of the mu-plugins directory create an index.php file. Then copy and paste the code below:
3029

31-
<CopyToClipBoard :text="queulatSettings "/>
30+
```php
31+
<?php
32+
/**
33+
* Plugin Name: Queulat Loader
34+
* Description: Load Queulat mu-plugin
35+
*/
36+
// Load Composer autoloader (ABSPATH it's the path to wp-load.php).
37+
require_once ABSPATH . 'wp-content/themes/wp-theme-base/vendor/autoload.php';
38+
// Load Queulat main file.
39+
require_once __DIR__ .'/queulat/queulat.php';
40+
```
3241

3342
4. Start your development server and activate the CC WP Base Theme in your local WordPress Dashboard.

0 commit comments

Comments
 (0)