Skip to content

Commit

Permalink
rename "template" to "layout"
Browse files Browse the repository at this point in the history
  • Loading branch information
abadakhshan committed Aug 18, 2020
1 parent 1017817 commit 02ece01
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 44 deletions.
30 changes: 30 additions & 0 deletions build-tools/layout-resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class LayoutResolver {
Resolve(key) {
switch (key) {
case "NarikListUi":
return {
layout: "",
layoutUrl: "./src/app/layouts/list-layout.html",
};
case "NarikEditUi":
return {
layout: "",
layoutUrl: "./src/app/layouts/edit-layout.html",
};
case "widget":
return {
layout: "",
layoutUrl: "./src/app/layouts/widget-layout.html",
};
case "widget2":
return {
layout: "",
layoutUrl: "./src/app/layouts/widget-layout2.html",
};

default:
break;
}
}
}
module.exports = LayoutResolver;
30 changes: 0 additions & 30 deletions build-tools/template-resolver.js

This file was deleted.

4 changes: 2 additions & 2 deletions extra-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require("path");
const AngularCompilerPlugin = require("@ngtools/webpack/src");
const TemplateResolver = require("./build-tools/template-resolver");
const LayoutResolver = require("./build-tools/layout-resolver");

module.exports = (config) => {
const index = config.plugins.findIndex((p) => {
Expand All @@ -21,7 +21,7 @@ module.exports = (config) => {
{
loader: "@narik/webpack-tools",
options: {
resolver: new TemplateResolver(),
resolver: new LayoutResolver(),
basePath: config.plugins[index]._basePath,
},
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<div class="card m-2">
<div class="card-body">

<div class="card-footer">
<div narik-section="widgetFooter">
<narik-button buttonClass='btn-outline-primary
btn-rounded waves-effect' iconClass='fa-check' label='{{"prompt" | translate}}' (click)="prompt()">
</narik-button>
</div>
</div>


<div narik-section="widgetTitle">
<h5 class="card-title">{{ title }}</h5>
</div>

<div narik-section="widgetContent"></div>



<div class="card-footer">
<div narik-section="widgetFooter">
<narik-button
buttonClass="btn-outline-primary
btn-rounded waves-effect"
iconClass="fa-check"
label='{{"prompt" | translate}}'
(click)="prompt()"
>
</narik-button>
</div>
</div>
</div>
</div>
File renamed without changes.

0 comments on commit 02ece01

Please sign in to comment.