Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 63 additions & 63 deletions Themes/VuetifyCore/Cli/FooterSectionWriter.php
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
<?php
namespace Themes\VuetifyCore\Cli;
use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HTMLNode;
/**
* A class which is used to write footer section class of the theme.
*
* @author Ibrahim
*/
class FooterSectionWriter extends ClassWriter {
/**
*
* @var string
*/
private $wf;
public function getWireframe() : string {
return $this->wf;
}
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('FooterSection', $writer->getPath(), $writer->getNamespace());
$this->addUseStatement(WebPage::class);
$this->addUseStatement(HTMLNode::class);
$this->wf = $writer->getWireframe();
}
public function writeClassBody() {
$this->append([
"/**",
" * Creates new instance of the class.",
" */",
$this->f('__construct',[
'page' => 'WebPage'
])
], 1);
$wireframe = $this->getWireframe();
//if ($wireframe == 'Base' || $wireframe == 'Extended Toolbar' || $wireframe == 'System Bar') {
$this->append('parent::__construct(\'v-footer\');', 2);
//}
$this->append('//TODO: Add components to the footer.', 2);
$this->append('}', 1);
$this->append('}');
}
public function writeClassComment() {
$this->append([
'/**',
' * This class represents footer section of the theme.',
' */'
]);
}
public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends HTMLNode {');
}
}
<?php

namespace Themes\VuetifyCore\Cli;

use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HTMLNode;

/**
* A class which is used to write footer section class of the theme.
*
* @author Ibrahim
*/
class FooterSectionWriter extends ClassWriter {
/**
*
* @var string
*/
private $wf;
public function getWireframe() : string {
return $this->wf;
}
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('FooterSection', $writer->getPath(), $writer->getNamespace());

$this->addUseStatement(WebPage::class);
$this->addUseStatement(HTMLNode::class);
$this->wf = $writer->getWireframe();


}

public function writeClassBody() {
$this->append([
"/**",
" * Creates new instance of the class.",
" */",
], 1);
$this->f('__construct',[
'page' => 'WebPage'
]);
$wireframe = $this->getWireframe();
//if ($wireframe == 'Base' || $wireframe == 'Extended Toolbar' || $wireframe == 'System Bar') {
$this->append('parent::__construct(\'v-footer\');', 2);
//}
$this->append('//TODO: Add components to the footer.', 2);
$this->append('}', 1);
$this->append('}');
}

public function writeClassComment() {
$this->append([
'/**',
' * This class represents footer section of the theme.',
' */'
]);
}

public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends HTMLNode {');
}

}
100 changes: 50 additions & 50 deletions Themes/VuetifyCore/Cli/HeadSectionWriter.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<?php
namespace Themes\VuetifyCore\Cli;
use Themes\VuetifyCore\VueHeadSectionV2;
use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HeadNode;
/**
* A class which is used to write head section class of the theme.
*
* @author Ibrahim
*/
class HeadSectionWriter extends ClassWriter {
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('HeadSection', $writer->getPath(), $writer->getNamespace());
$this->addUseStatement(WebPage::class);
$this->addUseStatement(HeadNode::class);
$this->addUseStatement(VueHeadSectionV2::class);
}
public function writeClassBody() {
$this->append([
"/**",
" * Creates new instance of the class.",
" */",
$this->f('__construct',[
'page' => 'WebPage'
])
], 1);
$this->append([
'parent::__construct();',
'//TODO: Add any extra JS or Css files here in addition to meta tags.',
], 2);
$this->append('}', 1);
$this->append('}');
}
public function writeClassComment() {
$this->append('/**');
$this->append(' * This class represents head section the theme.');
$this->append(' */');
}
public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends VueHeadSectionV2 {');
}
}
<?php

namespace Themes\VuetifyCore\Cli;

use Themes\VuetifyCore\VueHeadSectionV2;
use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HeadNode;

/**
* A class which is used to write head section class of the theme.
*
* @author Ibrahim
*/
class HeadSectionWriter extends ClassWriter {
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('HeadSection', $writer->getPath(), $writer->getNamespace());
$this->addUseStatement(WebPage::class);
$this->addUseStatement(HeadNode::class);
$this->addUseStatement(VueHeadSectionV2::class);
}
public function writeClassBody() {

$this->append([
"/**",
" * Creates new instance of the class.",
" */",
], 1);
$this->f('__construct',[
'page' => 'WebPage'
]);
$this->append([
'parent::__construct();',
'//TODO: Add any extra JS or Css files here in addition to meta tags.',
], 2);
$this->append('}', 1);
$this->append('}');
}

public function writeClassComment() {
$this->append('/**');
$this->append(' * This class represents head section the theme.');
$this->append(' */');
}

public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends VueHeadSectionV2 {');
}

}
162 changes: 81 additions & 81 deletions Themes/VuetifyCore/Cli/HeaderSectionWriter.php
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
<?php
namespace Themes\VuetifyCore\Cli;
use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HTMLNode;
/**
* A class which is used to write header section class of the theme.
*
* @author Ibrahim
*/
class HeaderSectionWriter extends ClassWriter {
/**
*
* @var string
*/
private $wf;
public function getWireframe() : string {
return $this->wf;
}
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('HeaderSection', $writer->getPath(), $writer->getNamespace());
$this->addUseStatement(WebPage::class);
$this->addUseStatement(HTMLNode::class);
$this->wf = $writer->getWireframe();
}
public function writeClassBody() {
$wireframe = $this->getWireframe();
$this->append([
"/**",
" * Creates new instance of the class.",
" */",
$this->f('__construct',[
'page' => 'WebPage'
])
], 1);
if ($wireframe == 'Side Navigation' || $wireframe == 'Base' || $wireframe == 'System Bar' || $wireframe == 'Inbox') {
$this->append('parent::__construct(\'v-app-bar\', [', 2);
$this->append("'app'", 3);
$this->append(']);', 2);
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
$this->append("'@click' => \"drawer = !drawer\",", 3);
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
$this->append("'id' => \"nav-menu-icon\",", 3);
$this->append("]);", 2);
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
} else if ($wireframe == 'Extended Toolbar') {
$this->append('parent::__construct(\'v-app-bar\', [', 2);
$this->append("'app', 'shrink-on-scroll'", 3);
$this->append(']);', 2);
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
$this->append("'@click' => \"drawer = !drawer\",", 3);
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
$this->append("'id' => \"nav-menu-icon\",", 3);
$this->append("]);", 2);
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
$this->append("\$this->addChild('v-spacer');", 2);
$this->append("\$this->addChild('v-btn', ['icon'])->addChild('v-icon')->text('mdi-dots-vertical');", 2);
}
$this->append('//TODO: Add components to the header.', 2);
$this->append('}', 1);
$this->append('}');
}
public function writeClassComment() {
$this->append('/**');
$this->append(' * This class represents header section the theme.');
$this->append(' */');
}
public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends HTMLNode {');
}
}
<?php

namespace Themes\VuetifyCore\Cli;

use WebFiori\Framework\Ui\WebPage;
use WebFiori\Framework\Writers\ClassWriter;
use WebFiori\Ui\HTMLNode;

/**
* A class which is used to write header section class of the theme.
*
* @author Ibrahim
*/
class HeaderSectionWriter extends ClassWriter {
/**
*
* @var string
*/
private $wf;
public function getWireframe() : string {
return $this->wf;
}
public function __construct(VuetifyThemeClassWriter $writer) {
parent::__construct('HeaderSection', $writer->getPath(), $writer->getNamespace());

$this->addUseStatement(WebPage::class);
$this->addUseStatement(HTMLNode::class);
$this->wf = $writer->getWireframe();

}

public function writeClassBody() {
$wireframe = $this->getWireframe();
$this->append([
"/**",
" * Creates new instance of the class.",
" */",
], 1);
$this->f('__construct',[
'page' => 'WebPage'
]);

if ($wireframe == 'Side Navigation' || $wireframe == 'Base' || $wireframe == 'System Bar' || $wireframe == 'Inbox') {
$this->append('parent::__construct(\'v-app-bar\', [', 2);
$this->append("'app'", 3);
$this->append(']);', 2);
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
$this->append("'@click' => \"drawer = !drawer\",", 3);
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
$this->append("'id' => \"nav-menu-icon\",", 3);
$this->append("]);", 2);
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
} else if ($wireframe == 'Extended Toolbar') {
$this->append('parent::__construct(\'v-app-bar\', [', 2);
$this->append("'app', 'shrink-on-scroll'", 3);
$this->append(']);', 2);
$this->append("\$this->addChild('v-app-bar-nav-icon', [", 2);
$this->append("'@click' => \"drawer = !drawer\",", 3);
$this->append("'class' => \"d-sm-flex d-md-none\",", 3);
$this->append("'id' => \"nav-menu-icon\",", 3);
$this->append("]);", 2);
$this->append("\$this->addChild('v-toolbar-title')->text(\$page->getWebsiteName());", 2);
$this->append("\$this->addChild('v-spacer');", 2);
$this->append("\$this->addChild('v-btn', ['icon'])->addChild('v-icon')->text('mdi-dots-vertical');", 2);
}
$this->append('//TODO: Add components to the header.', 2);
$this->append('}', 1);
$this->append('}');
}

public function writeClassComment() {
$this->append('/**');
$this->append(' * This class represents header section the theme.');
$this->append(' */');
}

public function writeClassDeclaration() {
$this->append("class ".$this->getName().' extends HTMLNode {');
}

}
Loading
Loading