Skip to content

Commit

Permalink
Merge pull request #127 from ConductionNL/development
Browse files Browse the repository at this point in the history
Development to main, week 6
  • Loading branch information
remko48 authored Feb 12, 2024
2 parents c94e7ad + 602e384 commit c0b4828
Show file tree
Hide file tree
Showing 19 changed files with 432 additions and 108 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/product-page-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create the Product Page
uses: OpenCatalogi/productpage-action@1.0.9
uses: OpenCatalogi/productpage-action@latest
with:
# Connect Repository
github_repository_name_as_prefix: true
github_repository_name: ${{ github.event.repository.name }}
github_repository_url: https://github.com/ConductionNL/product-website-template
github_api_base_url: https://api.github.com/repos/ConductionNL/product-website-template/contents
github_docs_directory_paths: '[{"name": "Features", "location": "/docs/features"}, {"name": "Roadmap", "location": "/docs/roadmap"}, {"name": "Usecases", "location": "/docs/usecases"}]'
pull_from_branche: "development"

# Links
slack_url: "false"
read_the_docs_url: "false"

# Navbar
navbar_content: "https://raw.githubusercontent.com/ConductionNL/product-website-template/main/pwa/src/templates/templateParts/header/HeaderContent.json"
footer_show_logo: true

# Footer
footer_show_logo: "true"
footer_logo_href: https://conduction.nl
footer_content: "https://raw.githubusercontent.com/ConductionNL/product-website-template/main/pwa/src/templates/templateParts/footer/FooterContent.json"
footer_content_header: "heading-3"

# Jumbotron
jumbotron_title: "Product Website Template"
jumbotron_subtitle: "Product page"
jumbotron_description: "Conduction's Product Website Template: a quick, customizable solution for creating dedicated product pages from repository contents, ideal for open-source projects."
jumbotron_image: "https://www.conduction.nl/wp-content/uploads/2021/07/cropped-Conduction_HOME_0000_afb1-1.png"

# Nl-Desgin Theme
nl_design_theme_classname: "conduction-theme"

# Other
favicon_image: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVE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NCAxNSAtMzEgMjMgLTI4IDE1IC0zMyAxNSAtNTQgMSAtMzEgLTIwIC00NiAtMjAgLTg0IDIgLTI3IDE1IC0zMQoyMiAtMzEgNjIgMCA0MCA0IDQ3IDMxIDYzIDM4IDIxIDUzIDIxIDg0IDEgMjEgLTE0IDI2IC0xNCA1NCAxIDE3IDggMzEgMTkgMzEKMjMgMCA4IC0xMTMgNzIgLTEyNiA3MiAtNSAwIC0zOSAtMTcgLTc2IC0zOHoiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
page_title: "Product Website Template"
nl_design_theme_classname: "conduction-theme"
pull_from_branche: "development"
144 changes: 81 additions & 63 deletions README.md

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions docs/features/Dynamic_footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# The Dynamic Footer: A Flexible Tool for Organizing Your Content

<!-- The dynamic footer in the Product Website Template is a powerful feature that allows you to add folders to the main footer of your product page. This provides a flexible and intuitive way to organize and navigate your content. -->

<!-- When you add a folder to the main menu, the template automatically creates a submenu item for each markdown file in that folder. This means that each markdown file becomes its own page under the corresponding main menu item. It's a simple and efficient way to structure your content and make it easily accessible to visitors.
There's one exception to this rule: the `README.md` file. Instead of becoming a submenu item, the `README.md` file is used as the page for the main menu item itself. This means that when a visitor clicks on the main menu item, they're taken to a page displaying the content of the `README.md` file.
This feature also provides a neat trick for creating a menu item without a submenu. If you want a menu item to lead directly to a single page without any subpages, you can simply create a folder that contains only a `README.md` file. When a visitor clicks on this menu item, they'll be taken directly to the page displaying the content of the `README.md` file. -->

A column on the footer consists of the following properties

| Property Name | Options/Type | Optional Values and Their Use |
| -------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | `string` | The title of the footer column. |
| `items` | `object` | The items displayed in the column |
| `items.ariaLabel` | `string` | The ariaLabel of the displayed item. |
| `items.value` | `string` | The text that wil be displayed. |
| `items.link` | `string` | The url that the item wil be linked to when clicked. |
| `items.internalMarkdown` | `object` | An object that contains the directoryName and fileName to internally link to. |
| `items.internalMarkdown.directoryName` | `string` | The directory name set the `github_docs_directory_paths` variable e.g. `Features` [Read more](#directoryname). |
| `items.internalMarkdown.fileName` | `string` | The file name thats in the directory set at `directoryName` e.g. `README`. |
| `items.icon` | `object` | The object of the icon containing de properties of a [Font Awesome](https://fontawesome.com/) icon. |
| `items.icon.prefix` | `fas`/`fab`/`far` | The prefix of the Font Awesome icon (`fas` Solid icon), (`fab` Brand icon), (`far` Regular icon). |
| `items.icon.icon` | `string` | The name of the Font Awesome icon e.g. `github`. |
| `items.icon.placement` | `left`/`right` | The placement of the Font Awesome icon on the `left` or `right`. |
| `items.customIcon` | `object` | An object containing properties for a customIcon. |
| `items.customIcon.icon` | `string` | The full lenght string of an icon e.g. `"<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.0\" ........ -2 0 -27 -23 -54 -50z\" /> </g> </svg>"`. |
| `items.customIcon.placement` | `left`/`right` | The placement of the Font Awesome icon on the `left` or `right`. |

##### directoryName

> [!WARNING]
> The directoryName must be equal to the a name set in the `GITHUB_DOCS_DIRECTORY_PATHS`. <br />
> e.g.: `Features`. If not set correctly the requested files can not be found and will result in a `404` error.
```yaml
GITHUB_DOCS_DIRECTORY_PATHS: '[{"name": "Features", "location": "/docs/features"}, {"name": "Roadmap", "location": "/docs/roadmap"}, {"name": "Usecases", "location": "/docs/usecases"}]'
```
## Configuration
Dynamic footer items can be passed to the json file like this:
```json
[
{
"title": "Links",
"items": [
{
"ariaLabel": "Home",
"value": "Home",
"link": "/",
"icon": { "prefix": "fas", "icon": "home", "placement": "left" }
},
{
"ariaLabel": "Github",
"value": "Github",
"link": "https://github.com/ConductionNL/product-website-template",
"icon": { "prefix": "fab", "icon": "github", "placement": "left" }
},
{
"ariaLabel": "Roadmap",
"value": "Roadmap",
"link": "/Roadmap",
"icon": { "prefix": "fas", "icon": "arrow-right", "placement": "left" }
}
]
},
{
"title": "Features",
"items": [
{
"ariaLabel": "Features README",
"value": "README",
"link": "/Features",
"icon": { "prefix": "fas", "icon": "arrow-right", "placement": "left" }
},
// ............
// ............
{
"ariaLabel": "NL Design",
"value": "NL Design",
"internalMarkdown": {
"directoryName": "Features",
"fileName": "NL_Design"
},
"icon": { "prefix": "fas", "icon": "arrow-right", "placement": "left" }
}
// ............
]
}
]
```
101 changes: 86 additions & 15 deletions docs/features/Dynamic_menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,101 @@

The dynamic menu in the Product Website Template is a powerful feature that allows you to add folders to the main menu of your product page. This provides a flexible and intuitive way to organize and navigate your content.

When you add a folder to the main menu, the template automatically creates a submenu item for each markdown file in that folder. This means that each markdown file becomes its own page under the corresponding main menu item. It's a simple and efficient way to structure your content and make it easily accessible to visitors.
<!-- When you add a folder to the main menu, the template automatically creates a submenu item for each markdown file in that folder. This means that each markdown file becomes its own page under the corresponding main menu item. It's a simple and efficient way to structure your content and make it easily accessible to visitors. -->

There's one exception to this rule: the `README.md` file. Instead of becoming a submenu item, the `README.md` file is used as the page for the main menu item itself. This means that when a visitor clicks on the main menu item, they're taken to a page displaying the content of the `README.md` file.
<!-- There's one exception to this rule: the `README.md` file. Instead of becoming a submenu item, the `README.md` file is used as the page for the main menu item itself. This means that when a visitor clicks on the main menu item, they're taken to a page displaying the content of the `README.md` file. -->

This feature also provides a neat trick for creating a menu item without a submenu. If you want a menu item to lead directly to a single page without any subpages, you can simply create a folder that contains only a `README.md` file. When a visitor clicks on this menu item, they'll be taken directly to the page displaying the content of the `README.md` file.
<!-- This feature also provides a neat trick for creating a menu item without a submenu. If you want a menu item to lead directly to a single page without any subpages, you can simply create a folder that contains only a `README.md` file. When a visitor clicks on this menu item, they'll be taken directly to the page displaying the content of the `README.md` file. -->

A menu item consists of the following properties

| Property Name | Options/Type | Optional Values and Their Use |
| -------------------------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label` | `string` | The name of the menu item. |
| `type` | `internal`/`extrernal` | The type of the menu item of which it links to, to an external or internal page. |
| `current` | `object` | An object that when true will set the menu item to current. |
| `current.pathname` | `string` | The pathname on whitch path the menu item is current. pathname = "/Roadmap" is current at https://conductionnl.github.io/product-website-template/Roadmap/ |
| `handleClick` | `object` | An object that tells the menu item what to do when clicked on. |
| `handleClick.link` | `string` | The url to link to. |
| `handleClick.internalMarkdown` | `object` | An object that contains the directoryName and fileName to internally link to. |
| `handleClick.internalMarkdown.directoryName` | `string` | The directory name set the `github_docs_directory_paths` variable e.g. `Features` [Read more](#directoryname). |
| `handleClick.internalMarkdown.fileName` | `string` | The file name thats in the directory set at `directoryName` e.g. `README`. |
| `subItems` | `object` | The subItems object contains all the previous properties. |

By leveraging the dynamic menu, you can create a user-friendly navigation system that adapts to the structure of your content.

##### directoryName

> [!WARNING]
> The directoryName must be equal to the a name set in the `GITHUB_DOCS_DIRECTORY_PATHS`. <br />
> e.g.: `Features`. If not set correctly the requested files can not be found and will result in a `404` error.
```yaml
GITHUB_DOCS_DIRECTORY_PATHS: '[{"name": "Features", "location": "/docs/features"}, {"name": "Roadmap", "location": "/docs/roadmap"}, {"name": "Usecases", "location": "/docs/usecases"}]'
```
## Configuration
Dynamic menu items can be passed to the
````json
Dynamic menu items can be passed to the json file like this:
```json
[
{
"name": "Features",
"location": "/docs/features"
"label": "Home",
"type": "internal",
"current": {
"pathname": "/"
},
"handleClick": {
"link": "/"
}
},
{
"name": "Roadmap",
"location": "/docs/roadmap"
"label": "Roadmap",
"type": "internal",
"current": {
"pathname": "/Roadmap"
},
"handleClick": {
"link": "/Roadmap"
}
},
{
"label": "Features",
"current": {
"pathname": "/Features"
},
"subItems": [
{
"label": "README",
"type": "internalMarkdown",
"current": {
"pathname": "/Features/README"
},
"handleClick": {
"internalMarkdown": {
"directoryName": "Features",
"fileName": "README"
}
}
},
// ............
// ............
{
"label": "NL Design",
"type": "internalMarkdown",
"current": {
"pathname": "/Features/NL_Design"
},
"handleClick": {
"internalMarkdown": {
"directoryName": "Features",
"fileName": "NL_Design"
}
}
}
// ............
]
}
]
````

Keep in mind that in order to actually pass the json configuraiton trough the worflow yaml it needs to be both stringified and put to one line.
````yaml
GITHUB_DOCS_DIRECTORY_PATHS: '[{"name": "Features", "location": "/docs/features"},{"name": "Roadmap", "location": "/docs/roadmap"}]'
````
```
12 changes: 12 additions & 0 deletions docs/features/NL_Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ The Product Website Template can be configured with any and all NL Design themes
| Bodegraven | `"bodegraven-theme"` |
| Borne | `"borne-theme"` |
| Buren | `"buren-theme"` |
| Commonground | `"commonground-theme"` |
| Demodam | `"demodam-theme"` |
| Dimpact | `"dimpact-theme"` |
| Dinkelland | `"dinkelland-theme"` |
| Drechterland | `"drechterland-theme"` |
| Duiven | `"duiven-theme"` |
| Enkhuizen | `"enkhuizen-theme"` |
| Epe | `"epe-theme"` |
| Gouda | `"gouda-theme"` |
| Groningen | `"groningen-theme"` |
| Haarlem | `"haarlem-theme"` |
| Haarlemmermeer | `"haarlemmermeer-theme"` |
Expand All @@ -53,14 +58,21 @@ The Product Website Template can be configured with any and all NL Design themes
| Leiden | `"leiden-theme"` |
| Leidschendam Voorburg | `"leidschendam-theme"` |
| Nijmegen | `"nijmegen-theme"` |
| Noaberkracht | `"noaberkracht-theme"` |
| Noordoostpolder | `"noordoostpolder-theme"` |
| Noordwijk | `"noordwijk-theme"` |
| Provincie Zuid Holland | `"pzh-theme"` |
| Rotterdam | `"rotterdam-theme"` |
| Sloterburg | `"sloterburg-theme"` |
| Stedebroec | `"stedebroec-theme"` |
| Tilburg | `"tilburg-theme"` |
| Tubbergen | `"tubbergen-theme"` |
| Utrecht | `"utrecht-theme"` |
| Venray | `"venray-theme"` |
| Vught | `"vught-theme"` |
| Westervoort | `"westervoort-theme"` |
| XXLLNC | `"xxllnc-theme"` |
| Zevenaar | `"zevenaar-theme"` |
| Zuiddrecht | `"zuiddrecht-theme"` |
| Zutphen | `"zutphen-theme"` |
| Zwolle | `"zwolle-theme"` |
Loading

0 comments on commit c0b4828

Please sign in to comment.