Skip to content

Commit

Permalink
Moved to amteich namespace. Added question icon. Stable Release.
Browse files Browse the repository at this point in the history
  • Loading branch information
seehat committed Apr 6, 2020
1 parent a884981 commit 1b75bdc
Show file tree
Hide file tree
Showing 10 changed files with 1,169 additions and 485 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Download and copy this repository to `/site/plugins/kirby-helpsection`.
### Git submodule

```
git submodule add https://github.com/mgfagency/kirby-helpsection.git site/plugins/kirby-helpsection
git submodule add https://github.com/amteich/kirby-helpsection.git site/plugins/kirby-helpsection
```

### Composer

```
composer require mgfagency/kirby-helpsection:@beta
composer require amteich/kirby-helpsection:@beta
```

## Options

All options require `mgfagency.helpsection.` as prefix.
All options require `amteich.helpsection.` as prefix.

**contentfolder**

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "mgfagency/kirby-helpsection",
"name": "amteich/kirby-helpsection",
"description": "Panel-View to display help for users.",
"type": "kirby-plugin",
"version": "1.0.0-beta.10",
"version": "1.0.0",
"license": "MIT",
"authors": [
{
"name": "Christian Zehetner",
"email": "christian@mgf.at"
"email": "christian@am-teich.com"
}
],
"require": {
Expand Down
2 changes: 1 addition & 1 deletion examples/models/textformats.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace mgfagency\helpsection;
namespace amteich\helpsection;

use Kirby\CMS\KirbyTag;
use Page;
Expand Down
6 changes: 3 additions & 3 deletions includes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
'routes' => [
[
// Get the first set of pages to display primary nav
'pattern' => 'mgfagency/helpsection/index',
'pattern' => 'amteich/helpsection/index',
'action' => function () {
$slug = option('mgfagency.helpsection.contentfolder', 'helpsection');
$slug = option('amteich.helpsection.contentfolder', 'helpsection');
$pages = [];
$page = page($slug);

Expand Down Expand Up @@ -50,7 +50,7 @@
],
[
// Get the first set of pages to display primary nav
'pattern' => 'mgfagency/helpsection/page/(:all)',
'pattern' => 'amteich/helpsection/page/(:all)',
'action' => function ($slug) {
return [
'rendered' => page($slug)->render(),
Expand Down
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php

namespace mgfagency\helpsection;
namespace amteich\helpsection;

use Kirby;

\Kirby::plugin('mgfagency/helpsection', [
\Kirby::plugin('amteich/helpsection', [
'options' => [
'icon' => 'question',
],
'routes' => function ($kirby) {
return [
[
'pattern' => $kirby->option('mgfagency.helpsection.contentfolder', 'helpsection'),
'pattern' => $kirby->option('amteich.helpsection.contentfolder', 'helpsection'),
'action' => function () {
return false;
}
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kirby-helpsection",
"version": "1.0.0-beta.10",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand All @@ -10,14 +10,14 @@
"cs": "php-cs-fixer fix ./ --rules=@PSR2"
},
"devDependencies": {
"bili": "^4.2.5",
"eslint": "^5.13.0",
"eslint-plugin-vue": "^5.1.0",
"node-sass": "^4.11.0",
"rollup-plugin-eslint": "^5.0.0",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-vue": "^4.7.1",
"vue-template-compiler": "^2.6.3"
"bili": "^4.9.0",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.13.1",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-livereload": "^1.1.0",
"rollup-plugin-vue": "^5.1.6",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
Expand Down
4 changes: 2 additions & 2 deletions src/components/view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
this.windowWidth = window.innerWidth
});
this.$api.get('mgfagency/helpsection/index').then(response => {
this.$api.get('amteich/helpsection/index').then(response => {
if (response.status != 'ok') {
this.content = "<h1>Error</h1><br>" + response.error;
}
Expand Down Expand Up @@ -146,7 +146,7 @@ export default {
this.show = 'main';
},
loadPageContent (slug) {
this.$api.get('mgfagency/helpsection/page/' + slug).then(response => {
this.$api.get('amteich/helpsection/page/' + slug).then(response => {
this.content = response.rendered;
});
},
Expand Down
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import View from "./components/view.vue";

panel.plugin("mgfagency/helpsection", {
panel.plugin("amteich/helpsection", {
views: {
helpsection: {
icon: "wand",
icon: 'amteichhelpsection', // option('amteich.helpsection.icon')
menu: true,
component: View
}
},
icons: {
'amteichhelpsection': '<path d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6 S11.3,14,8,14z"></path><circle cx="8" cy="12" r="1"></circle><path d="M7.1,5.5C7.3,5.2,7.6,5,8,5c0.6,0,1,0.4,1,1c0,0.3-0.1,0.4-0.6,0.7C7.8,7.1,7,7.7,7,9v1h2V9 c0-0.2,0-0.3,0.5-0.6C10.1,8,11,7.4,11,6c0-1.7-1.3-3-3-3C6.9,3,5.9,3.6,5.4,4.5L4.9,5.4l1.7,1L7.1,5.5z"></path>'
}
});
Loading

0 comments on commit 1b75bdc

Please sign in to comment.