Skip to content

Commit 9f7d133

Browse files
authored
chore: Merge pull request #10 from WebFiori/dev
Release-As: v3.0.0
2 parents e892629 + e194f42 commit 9f7d133

12 files changed

Lines changed: 1106 additions & 776 deletions
Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
<?php
2-
3-
namespace Themes\VuetifyCore\Cli;
4-
5-
use WebFiori\Framework\Ui\WebPage;
6-
use WebFiori\Framework\Writers\ClassWriter;
7-
use WebFiori\Ui\HTMLNode;
8-
9-
/**
10-
* A class which is used to write footer section class of the theme.
11-
*
12-
* @author Ibrahim
13-
*/
14-
class FooterSectionWriter extends ClassWriter {
15-
/**
16-
*
17-
* @var string
18-
*/
19-
private $wf;
20-
public function getWireframe() : string {
21-
return $this->wf;
22-
}
23-
public function __construct(VuetifyThemeClassWriter $writer) {
24-
parent::__construct('FooterSection', $writer->getPath(), $writer->getNamespace());
25-
26-
$this->addUseStatement(WebPage::class);
27-
$this->addUseStatement(HTMLNode::class);
28-
$this->wf = $writer->getWireframe();
29-
30-
31-
}
32-
33-
public function writeClassBody() {
34-
$this->append([
35-
"/**",
36-
" * Creates new instance of the class.",
37-
" */",
38-
$this->f('__construct',[
39-
'page' => 'WebPage'
40-
])
41-
], 1);
42-
$wireframe = $this->getWireframe();
43-
//if ($wireframe == 'Base' || $wireframe == 'Extended Toolbar' || $wireframe == 'System Bar') {
44-
$this->append('parent::__construct(\'v-footer\');', 2);
45-
//}
46-
$this->append('//TODO: Add components to the footer.', 2);
47-
$this->append('}', 1);
48-
$this->append('}');
49-
}
50-
51-
public function writeClassComment() {
52-
$this->append([
53-
'/**',
54-
' * This class represents footer section of the theme.',
55-
' */'
56-
]);
57-
}
58-
59-
public function writeClassDeclaration() {
60-
$this->append("class ".$this->getName().' extends HTMLNode {');
61-
}
62-
63-
}
1+
<?php
2+
3+
namespace Themes\VuetifyCore\Cli;
4+
5+
use WebFiori\Framework\Ui\WebPage;
6+
use WebFiori\Framework\Writers\ClassWriter;
7+
use WebFiori\Ui\HTMLNode;
8+
9+
/**
10+
* A class which is used to write footer section class of the theme.
11+
*
12+
* @author Ibrahim
13+
*/
14+
class FooterSectionWriter extends ClassWriter {
15+
/**
16+
*
17+
* @var string
18+
*/
19+
private $wf;
20+
public function getWireframe() : string {
21+
return $this->wf;
22+
}
23+
public function __construct(VuetifyThemeClassWriter $writer) {
24+
parent::__construct('FooterSection', $writer->getPath(), $writer->getNamespace());
25+
26+
$this->addUseStatement(WebPage::class);
27+
$this->addUseStatement(HTMLNode::class);
28+
$this->wf = $writer->getWireframe();
29+
30+
31+
}
32+
33+
public function writeClassBody() {
34+
$this->append([
35+
"/**",
36+
" * Creates new instance of the class.",
37+
" */",
38+
], 1);
39+
$this->f('__construct',[
40+
'page' => 'WebPage'
41+
]);
42+
$wireframe = $this->getWireframe();
43+
//if ($wireframe == 'Base' || $wireframe == 'Extended Toolbar' || $wireframe == 'System Bar') {
44+
$this->append('parent::__construct(\'v-footer\');', 2);
45+
//}
46+
$this->append('//TODO: Add components to the footer.', 2);
47+
$this->append('}', 1);
48+
$this->append('}');
49+
}
50+
51+
public function writeClassComment() {
52+
$this->append([
53+
'/**',
54+
' * This class represents footer section of the theme.',
55+
' */'
56+
]);
57+
}
58+
59+
public function writeClassDeclaration() {
60+
$this->append("class ".$this->getName().' extends HTMLNode {');
61+
}
62+
63+
}
Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
<?php
2-
3-
namespace Themes\VuetifyCore\Cli;
4-
5-
use Themes\VuetifyCore\VueHeadSectionV2;
6-
use WebFiori\Framework\Ui\WebPage;
7-
use WebFiori\Framework\Writers\ClassWriter;
8-
use WebFiori\Ui\HeadNode;
9-
10-
/**
11-
* A class which is used to write head section class of the theme.
12-
*
13-
* @author Ibrahim
14-
*/
15-
class HeadSectionWriter extends ClassWriter {
16-
public function __construct(VuetifyThemeClassWriter $writer) {
17-
parent::__construct('HeadSection', $writer->getPath(), $writer->getNamespace());
18-
$this->addUseStatement(WebPage::class);
19-
$this->addUseStatement(HeadNode::class);
20-
$this->addUseStatement(VueHeadSectionV2::class);
21-
}
22-
public function writeClassBody() {
23-
24-
$this->append([
25-
"/**",
26-
" * Creates new instance of the class.",
27-
" */",
28-
$this->f('__construct',[
29-
'page' => 'WebPage'
30-
])
31-
], 1);
32-
$this->append([
33-
'parent::__construct();',
34-
'//TODO: Add any extra JS or Css files here in addition to meta tags.',
35-
], 2);
36-
$this->append('}', 1);
37-
$this->append('}');
38-
}
39-
40-
public function writeClassComment() {
41-
$this->append('/**');
42-
$this->append(' * This class represents head section the theme.');
43-
$this->append(' */');
44-
}
45-
46-
public function writeClassDeclaration() {
47-
$this->append("class ".$this->getName().' extends VueHeadSectionV2 {');
48-
}
49-
50-
}
1+
<?php
2+
3+
namespace Themes\VuetifyCore\Cli;
4+
5+
use Themes\VuetifyCore\VueHeadSectionV2;
6+
use WebFiori\Framework\Ui\WebPage;
7+
use WebFiori\Framework\Writers\ClassWriter;
8+
use WebFiori\Ui\HeadNode;
9+
10+
/**
11+
* A class which is used to write head section class of the theme.
12+
*
13+
* @author Ibrahim
14+
*/
15+
class HeadSectionWriter extends ClassWriter {
16+
public function __construct(VuetifyThemeClassWriter $writer) {
17+
parent::__construct('HeadSection', $writer->getPath(), $writer->getNamespace());
18+
$this->addUseStatement(WebPage::class);
19+
$this->addUseStatement(HeadNode::class);
20+
$this->addUseStatement(VueHeadSectionV2::class);
21+
}
22+
public function writeClassBody() {
23+
24+
$this->append([
25+
"/**",
26+
" * Creates new instance of the class.",
27+
" */",
28+
], 1);
29+
$this->f('__construct',[
30+
'page' => 'WebPage'
31+
]);
32+
$this->append([
33+
'parent::__construct();',
34+
'//TODO: Add any extra JS or Css files here in addition to meta tags.',
35+
], 2);
36+
$this->append('}', 1);
37+
$this->append('}');
38+
}
39+
40+
public function writeClassComment() {
41+
$this->append('/**');
42+
$this->append(' * This class represents head section the theme.');
43+
$this->append(' */');
44+
}
45+
46+
public function writeClassDeclaration() {
47+
$this->append("class ".$this->getName().' extends VueHeadSectionV2 {');
48+
}
49+
50+
}
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
<?php
2-
3-
namespace Themes\VuetifyCore\Cli;
4-
5-
use WebFiori\Framework\Ui\WebPage;
6-
use WebFiori\Framework\Writers\ClassWriter;
7-
use WebFiori\Ui\HTMLNode;
8-
9-
/**
10-
* A class which is used to write header section class of the theme.
11-
*
12-
* @author Ibrahim
13-
*/
14-
class HeaderSectionWriter extends ClassWriter {
15-
/**
16-
*
17-
* @var string
18-
*/
19-
private $wf;
20-
public function getWireframe() : string {
21-
return $this->wf;
22-
}
23-
public function __construct(VuetifyThemeClassWriter $writer) {
24-
parent::__construct('HeaderSection', $writer->getPath(), $writer->getNamespace());
25-
26-
$this->addUseStatement(WebPage::class);
27-
$this->addUseStatement(HTMLNode::class);
28-
$this->wf = $writer->getWireframe();
29-
30-
}
31-
32-
public function writeClassBody() {
33-
$wireframe = $this->getWireframe();
34-
$this->append([
35-
"/**",
36-
" * Creates new instance of the class.",
37-
" */",
38-
$this->f('__construct',[
39-
'page' => 'WebPage'
40-
])
41-
], 1);
42-
43-
if ($wireframe == 'Side Navigation' || $wireframe == 'Base' || $wireframe == 'System Bar' || $wireframe == 'Inbox') {
44-
$this->append('parent::__construct(\'v-app-bar\', [', 2);
45-
$this->append("'app'", 3);
46-
$this->append(']);', 2);
47-
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
48-
$this->append("'@click' => \"drawer = !drawer\",", 3);
49-
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
50-
$this->append("'id' => \"nav-menu-icon\",", 3);
51-
$this->append("]);", 2);
52-
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
53-
} else if ($wireframe == 'Extended Toolbar') {
54-
$this->append('parent::__construct(\'v-app-bar\', [', 2);
55-
$this->append("'app', 'shrink-on-scroll'", 3);
56-
$this->append(']);', 2);
57-
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
58-
$this->append("'@click' => \"drawer = !drawer\",", 3);
59-
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
60-
$this->append("'id' => \"nav-menu-icon\",", 3);
61-
$this->append("]);", 2);
62-
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
63-
$this->append("\$this->addChild('v-spacer');", 2);
64-
$this->append("\$this->addChild('v-btn', ['icon'])->addChild('v-icon')->text('mdi-dots-vertical');", 2);
65-
}
66-
$this->append('//TODO: Add components to the header.', 2);
67-
$this->append('}', 1);
68-
$this->append('}');
69-
}
70-
71-
public function writeClassComment() {
72-
$this->append('/**');
73-
$this->append(' * This class represents header section the theme.');
74-
$this->append(' */');
75-
}
76-
77-
public function writeClassDeclaration() {
78-
$this->append("class ".$this->getName().' extends HTMLNode {');
79-
}
80-
81-
}
1+
<?php
2+
3+
namespace Themes\VuetifyCore\Cli;
4+
5+
use WebFiori\Framework\Ui\WebPage;
6+
use WebFiori\Framework\Writers\ClassWriter;
7+
use WebFiori\Ui\HTMLNode;
8+
9+
/**
10+
* A class which is used to write header section class of the theme.
11+
*
12+
* @author Ibrahim
13+
*/
14+
class HeaderSectionWriter extends ClassWriter {
15+
/**
16+
*
17+
* @var string
18+
*/
19+
private $wf;
20+
public function getWireframe() : string {
21+
return $this->wf;
22+
}
23+
public function __construct(VuetifyThemeClassWriter $writer) {
24+
parent::__construct('HeaderSection', $writer->getPath(), $writer->getNamespace());
25+
26+
$this->addUseStatement(WebPage::class);
27+
$this->addUseStatement(HTMLNode::class);
28+
$this->wf = $writer->getWireframe();
29+
30+
}
31+
32+
public function writeClassBody() {
33+
$wireframe = $this->getWireframe();
34+
$this->append([
35+
"/**",
36+
" * Creates new instance of the class.",
37+
" */",
38+
], 1);
39+
$this->f('__construct',[
40+
'page' => 'WebPage'
41+
]);
42+
43+
if ($wireframe == 'Side Navigation' || $wireframe == 'Base' || $wireframe == 'System Bar' || $wireframe == 'Inbox') {
44+
$this->append('parent::__construct(\'v-app-bar\', [', 2);
45+
$this->append("'app'", 3);
46+
$this->append(']);', 2);
47+
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
48+
$this->append("'@click' => \"drawer = !drawer\",", 3);
49+
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
50+
$this->append("'id' => \"nav-menu-icon\",", 3);
51+
$this->append("]);", 2);
52+
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
53+
} else if ($wireframe == 'Extended Toolbar') {
54+
$this->append('parent::__construct(\'v-app-bar\', [', 2);
55+
$this->append("'app', 'shrink-on-scroll'", 3);
56+
$this->append(']);', 2);
57+
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
58+
$this->append("'@click' => \"drawer = !drawer\",", 3);
59+
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
60+
$this->append("'id' => \"nav-menu-icon\",", 3);
61+
$this->append("]);", 2);
62+
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
63+
$this->append("\$this->addChild('v-spacer');", 2);
64+
$this->append("\$this->addChild('v-btn', ['icon'])->addChild('v-icon')->text('mdi-dots-vertical');", 2);
65+
}
66+
$this->append('//TODO: Add components to the header.', 2);
67+
$this->append('}', 1);
68+
$this->append('}');
69+
}
70+
71+
public function writeClassComment() {
72+
$this->append('/**');
73+
$this->append(' * This class represents header section the theme.');
74+
$this->append(' */');
75+
}
76+
77+
public function writeClassDeclaration() {
78+
$this->append("class ".$this->getName().' extends HTMLNode {');
79+
}
80+
81+
}

0 commit comments

Comments
 (0)