Custom css SAS & layout playground
This commit is contained in:
586
assets/andy/coba.html
Normal file
586
assets/andy/coba.html
Normal file
@@ -0,0 +1,586 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme
|
||||
Author: KeenThemes
|
||||
Website: http://www.keenthemes.com/
|
||||
Contact: support@keenthemes.com
|
||||
Follow: www.twitter.com/keenthemes
|
||||
Dribbble: www.dribbble.com/keenthemes
|
||||
Like: www.facebook.com/keenthemes
|
||||
Purchase: https://1.envato.market/EA4JP
|
||||
Renew Support: https://1.envato.market/EA4JP
|
||||
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
|
||||
-->
|
||||
<html lang="en">
|
||||
<!--begin::Head-->
|
||||
|
||||
<head>
|
||||
<base href="../" />
|
||||
<meta charset="utf-8" />
|
||||
<title>Corporate portal | Landing Page</title>
|
||||
<meta name="description" content="Login page example" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
|
||||
<!--begin::Fonts-->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700"
|
||||
/>
|
||||
<!--end::Fonts-->
|
||||
|
||||
<!--begin::Page Custom Styles(used by this page)-->
|
||||
<link
|
||||
href="assets/css/pages/login/login-1.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Page Custom Styles-->
|
||||
|
||||
<!--begin::Global Theme Styles(used by all pages)-->
|
||||
<link
|
||||
href="assets/plugins/global/plugins.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/plugins/custom/prismjs/prismjs.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link href="assets/css/style.bundle.css" rel="stylesheet" type="text/css" />
|
||||
<!--end::Global Theme Styles-->
|
||||
|
||||
<!--begin::Layout Themes(used by all pages)-->
|
||||
|
||||
<link
|
||||
href="assets/css/themes/layout/header/base/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/header/menu/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/brand/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/aside/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Layout Themes-->
|
||||
<link
|
||||
href="asset-corporate-portal/css/sas.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
|
||||
<link rel="shortcut icon" href="assets/media/logos/favicon.ico" />
|
||||
</head>
|
||||
<!--end::Head-->
|
||||
|
||||
<!--begin::Body-->
|
||||
|
||||
<body
|
||||
id="kt_body"
|
||||
class="header-fixed header-mobile-fixed subheader-enabled subheader-fixed subheader-mobile-fixed aside-enabled aside-fixed aside-minimize-hoverable page-loading"
|
||||
>
|
||||
<!--begin::Main-->
|
||||
<div class="d-flex flex-column flex-root bg-white">
|
||||
<!-- begin::Navbar -->
|
||||
<div
|
||||
class="d-flex flex-lg-row justify-content-between py-5"
|
||||
style="height: 119px; align-items: center"
|
||||
>
|
||||
<img
|
||||
src="asset-corporate-portal/media/logo.png"
|
||||
alt=""
|
||||
style="height: 39px"
|
||||
/>
|
||||
<ul class="nav">
|
||||
<li class="nav-item dropdown">
|
||||
<a
|
||||
class="nav-link dropdown-toggle font-weight-bolder"
|
||||
data-toggle="dropdown"
|
||||
role="button"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
Dashboard
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link disabled"
|
||||
href="#"
|
||||
tabindex="-1"
|
||||
aria-disabled="true"
|
||||
>Disabled</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
<img
|
||||
src="asset-corporate-portal/media/logo.png"
|
||||
alt=""
|
||||
style="height: 39px"
|
||||
/>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<button type="button" class="btn">btn</button>
|
||||
<button type="button" class="btn btn-tosca">btn cb</button>
|
||||
<button type="button" class="btn btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-secondary">Secondary</button>
|
||||
<button type="button" class="btn btn-info">Info</button>
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-warning">Warning</button>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<button type="button" class="btn btn-outline-primary">Primary</button>
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
Secondary
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-success">Success</button>
|
||||
<button type="button" class="btn btn-outline-danger">Danger</button>
|
||||
<button type="button" class="btn btn-outline-warning">Warning</button>
|
||||
<button type="button" class="btn btn-outline-info">Info</button>
|
||||
<button type="button" class="btn btn-outline-dark">Dark</button>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-primary active">Active state</a>
|
||||
<a href="#" class="btn btn-success active">Active state</a>
|
||||
<a href="#" class="btn btn-danger active">Active state</a>
|
||||
<a href="#" class="btn btn-warning active">Active state</a>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<button class="btn btn-primary" disabled>Disabled state</button>
|
||||
<button class="btn btn-success" disabled>Disabled state</button>
|
||||
<button class="btn btn-danger" disabled>Disabled state</button>
|
||||
<button class="btn btn-warning" disabled>Disabled state</button>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-success active">
|
||||
<input type="radio" name="options" id="option1" checked="checked" />
|
||||
Active
|
||||
</label>
|
||||
<label class="btn btn-success">
|
||||
<input type="radio" name="options" id="option2" /> Radio
|
||||
</label>
|
||||
<label class="btn btn-success">
|
||||
<input type="radio" name="options" id="option3" /> Radio
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-success font-weight-bold btn-pill"
|
||||
>Success</a
|
||||
>
|
||||
<a href="#" class="btn btn-primary font-weight-bold btn-pill"
|
||||
>Primary</a
|
||||
>
|
||||
<a href="#" class="btn btn-danger font-weight-bold btn-pill">Danger</a>
|
||||
<a href="#" class="btn btn-warning font-weight-bold btn-pill"
|
||||
>Warning</a
|
||||
>
|
||||
<a href="#" class="btn btn-dark font-weight-bold btn-pill">Dark</a>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-success font-weight-bold btn-square"
|
||||
>Success</a
|
||||
>
|
||||
<a href="#" class="btn btn-primary font-weight-bold btn-square"
|
||||
>Primary</a
|
||||
>
|
||||
<a href="#" class="btn btn-danger font-weight-bold btn-square"
|
||||
>Danger</a
|
||||
>
|
||||
<a href="#" class="btn btn-warning font-weight-bold btn-square"
|
||||
>Warning</a
|
||||
>
|
||||
<a href="#" class="btn btn-dark font-weight-bold btn-square">Dark</a>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-light-success font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a href="#" class="btn btn-light-info font-weight-bold mr-2">info</a>
|
||||
<a href="#" class="btn btn-light-primary font-weight-bold mr-2"
|
||||
>Primary</a
|
||||
>
|
||||
<a href="#" class="btn btn-light-secondary font-weight-bold mr-2"
|
||||
>secondary</a
|
||||
>
|
||||
<a href="#" class="btn btn-light-danger font-weight-bold mr-2"
|
||||
>Danger</a
|
||||
>
|
||||
<a href="#" class="btn btn-light-warning font-weight-bold mr-2"
|
||||
>Warning</a
|
||||
>
|
||||
<a href="#" class="btn btn-light-dark font-weight-bold">Dark</a>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-info btn-hover-light-info font-weight-bold mr-2"
|
||||
>info</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-secondary btn-hover-light-secondary font-weight-bold mr-2"
|
||||
>secondary</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-success btn-hover-light-success font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-primary btn-hover-light-primary font-weight-bold mr-2"
|
||||
>Primary</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-danger btn-hover-light-danger font-weight-bold mr-2"
|
||||
>Danger</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-warning btn-hover-light-warning font-weight-bold mr-2"
|
||||
>Warning</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-text-dark btn-hover-light-dark font-weight-bold mr-2"
|
||||
>Dark</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-success btn-text-success btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-info btn-text-info btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>info</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-primary btn-text-primary btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>Primary</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-danger btn-text-danger btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>Danger</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-warning btn-text-warning btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>Warning</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-hover-bg-dark btn-text-dark btn-hover-text-white border-0 font-weight-bold mr-2"
|
||||
>Dark</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-success btn-hover-text-success font-weight-bold"
|
||||
>Success</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-info btn-hover-text-info font-weight-bold"
|
||||
>info</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-primary btn-hover-text-primary font-weight-bold"
|
||||
>Primary</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-danger btn-hover-text-danger font-weight-bold"
|
||||
>Danger</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-warning btn-hover-text-dark-50 font-weight-bold"
|
||||
>Warning</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-text-dark btn-hover-text-dark font-weight-bold"
|
||||
>Dark</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-light btn-hover-success font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a href="#" class="btn btn-light btn-hover-info font-weight-bold mr-2"
|
||||
>info</a
|
||||
>
|
||||
<a href="#" class="btn btn-light btn-hover-primary font-weight-bold"
|
||||
>Primary</a
|
||||
>
|
||||
<a href="#" class="btn btn-light btn-hover-danger font-weight-bold"
|
||||
>Danger</a
|
||||
>
|
||||
<a href="#" class="btn btn-light btn-hover-warning font-weight-bold"
|
||||
>Warning</a
|
||||
>
|
||||
<a href="#" class="btn btn-light btn-hover-dark font-weight-bold"
|
||||
>Dark</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-link-success font-weight-bold">Success</a>
|
||||
<a href="#" class="btn btn-link-info font-weight-bold">info</a>
|
||||
<a href="#" class="btn btn-link-primary font-weight-bold">Primary</a>
|
||||
<a href="#" class="btn btn-link-danger font-weight-bold">Danger</a>
|
||||
<a href="#" class="btn btn-link-warning font-weight-bold">Warning</a>
|
||||
<a href="#" class="btn btn-link-dark font-weight-bold">Dark</a>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-light btn-shadow font-weight-bold mr-2"
|
||||
>Light</a
|
||||
>
|
||||
<a href="#" class="btn btn-info btn-shadow font-weight-bold mr-2"
|
||||
>info</a
|
||||
>
|
||||
<a href="#" class="btn btn-success btn-shadow font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a href="#" class="btn btn-primary btn-shadow font-weight-bold mr-2"
|
||||
>Primary</a
|
||||
>
|
||||
<a href="#" class="btn btn-danger btn-shadow font-weight-bold mr-2"
|
||||
>Danger</a
|
||||
>
|
||||
<a href="#" class="btn btn-warning btn-shadow font-weight-bold mr-2"
|
||||
>Warning</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<a href="#" class="btn btn-light btn-shadow-hover font-weight-bold mr-2"
|
||||
>Light</a
|
||||
>
|
||||
<a href="#" class="btn btn-info btn-shadow-hover font-weight-bold mr-2"
|
||||
>info</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-success btn-shadow-hover font-weight-bold mr-2"
|
||||
>Success</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-primary btn-shadow-hover font-weight-bold mr-2"
|
||||
>Primary</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-danger btn-shadow-hover font-weight-bold mr-2"
|
||||
>Danger</a
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
class="btn btn-warning btn-shadow-hover font-weight-bold mr-2"
|
||||
>Warning</a
|
||||
>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<ul class="nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a
|
||||
class="nav-link dropdown-toggle"
|
||||
data-toggle="dropdown"
|
||||
href="#"
|
||||
role="button"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
Dropdown
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Separated link</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link disabled"
|
||||
href="#"
|
||||
tabindex="-1"
|
||||
aria-disabled="true"
|
||||
>Disabled</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<ul class="nav nav-pills" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Active</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a
|
||||
class="nav-link dropdown-toggle"
|
||||
data-toggle="dropdown"
|
||||
href="#"
|
||||
role="button"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
Dropdown
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Separated link</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link disabled"
|
||||
href="#"
|
||||
tabindex="-1"
|
||||
aria-disabled="true"
|
||||
>Disabled</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content mt-5" id="myTabContent">...</div>
|
||||
</div>
|
||||
<div class="p-10">
|
||||
<p class="text-primary">.text-primary</p>
|
||||
<p class="text-secondary">.text-secondary</p>
|
||||
<p class="text-success">.text-success</p>
|
||||
<p class="text-danger">.text-danger</p>
|
||||
<p class="text-warning">.text-warning</p>
|
||||
<p class="text-info">.text-info</p>
|
||||
<p class="text-light bg-dark">.text-light</p>
|
||||
<p class="text-dark">.text-dark</p>
|
||||
<p class="text-body">.text-body</p>
|
||||
<p class="text-muted">.text-muted</p>
|
||||
<p class="text-white bg-dark">.text-white</p>
|
||||
<p class="text-black-50">.text-black-50</p>
|
||||
<p class="text-white-50 bg-dark">.text-white-50</p>
|
||||
<p class="h1 text-disabled">text normal</p>
|
||||
</div>
|
||||
<!-- end::Navbar -->
|
||||
</div>
|
||||
<!--end::Main-->
|
||||
|
||||
<script>
|
||||
var HOST_URL =
|
||||
"https://preview.keenthemes.com/metronic/theme/html/tools/preview";
|
||||
</script>
|
||||
<!--begin::Global Config(global config for global JS scripts)-->
|
||||
<script>
|
||||
var KTAppSettings = {
|
||||
breakpoints: {
|
||||
sm: 576,
|
||||
md: 768,
|
||||
lg: 992,
|
||||
xl: 1200,
|
||||
xxl: 1400,
|
||||
},
|
||||
colors: {
|
||||
theme: {
|
||||
base: {
|
||||
white: "#ffffff",
|
||||
primary: "#3699FF",
|
||||
secondary: "#E5EAEE",
|
||||
success: "#1BC5BD",
|
||||
info: "#8950FC",
|
||||
warning: "#FFA800",
|
||||
danger: "#F64E60",
|
||||
light: "#E4E6EF",
|
||||
dark: "#181C32",
|
||||
},
|
||||
light: {
|
||||
white: "#ffffff",
|
||||
primary: "#E1F0FF",
|
||||
secondary: "#EBEDF3",
|
||||
success: "#C9F7F5",
|
||||
info: "#EEE5FF",
|
||||
warning: "#FFF4DE",
|
||||
danger: "#FFE2E5",
|
||||
light: "#F3F6F9",
|
||||
dark: "#D6D6E0",
|
||||
},
|
||||
inverse: {
|
||||
white: "#ffffff",
|
||||
primary: "#ffffff",
|
||||
secondary: "#3F4254",
|
||||
success: "#ffffff",
|
||||
info: "#ffffff",
|
||||
warning: "#ffffff",
|
||||
danger: "#ffffff",
|
||||
light: "#464E5F",
|
||||
dark: "#ffffff",
|
||||
},
|
||||
},
|
||||
gray: {
|
||||
"gray-100": "#F3F6F9",
|
||||
"gray-200": "#EBEDF3",
|
||||
"gray-300": "#E4E6EF",
|
||||
"gray-400": "#D1D3E0",
|
||||
"gray-500": "#B5B5C3",
|
||||
"gray-600": "#7E8299",
|
||||
"gray-700": "#5E6278",
|
||||
"gray-800": "#3F4254",
|
||||
"gray-900": "#181C32",
|
||||
},
|
||||
},
|
||||
"font-family": "Poppins",
|
||||
};
|
||||
</script>
|
||||
<!--end::Global Config-->
|
||||
|
||||
<!--begin::Global Theme Bundle(used by all pages)-->
|
||||
<script src="assets/plugins/global/plugins.bundle.js"></script>
|
||||
<script src="assets/plugins/custom/prismjs/prismjs.bundle.js"></script>
|
||||
<script src="assets/js/scripts.bundle.js"></script>
|
||||
<!--end::Global Theme Bundle-->
|
||||
|
||||
<!--begin::Page Scripts(used by this page)-->
|
||||
<!-- <script src="asset-corporate-portal/js/login-general.js"></script> -->
|
||||
<!--end::Page Scripts-->
|
||||
</body>
|
||||
<!--end::Body-->
|
||||
</html>
|
||||
4064
assets/asset-corporate-portal/css/sas.bundle.css
Normal file
4064
assets/asset-corporate-portal/css/sas.bundle.css
Normal file
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,14 @@ func main() {
|
||||
|
||||
handlers.SetupRoutes(app, h)
|
||||
|
||||
xStore, err := db.NewXsampleStore(dbName)
|
||||
if err != nil {
|
||||
app.Logger.Fatalf("failed to create store: %s", err)
|
||||
}
|
||||
xs := services.NewServicesXsample(services.Xsample{}, xStore)
|
||||
xh := handlers.NewXsampleHandler(xs)
|
||||
handlers.SetupRoutesXsample(app, xh)
|
||||
|
||||
app.Logger.Fatal(app.Start(":5000"))
|
||||
}
|
||||
|
||||
|
||||
26
db/xsample.store.go
Normal file
26
db/xsample.store.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
_ "github.com/glebarez/go-sqlite"
|
||||
)
|
||||
|
||||
type XsampleStore struct {
|
||||
Db *sql.DB
|
||||
}
|
||||
|
||||
func NewXsampleStore(dbName string) (XsampleStore, error) {
|
||||
Db, err := getConnection(dbName)
|
||||
if err != nil {
|
||||
return XsampleStore{}, err
|
||||
}
|
||||
|
||||
if err := createMigrations(dbName, Db); err != nil {
|
||||
return XsampleStore{}, err
|
||||
}
|
||||
|
||||
return XsampleStore{
|
||||
Db,
|
||||
}, nil
|
||||
}
|
||||
@@ -7,6 +7,13 @@ func SetupRoutes(app *echo.Echo, h *UserHandler) {
|
||||
|
||||
group.GET("", h.HandlerShowUsers)
|
||||
group.GET("/details/:id", h.HandlerShowUserById)
|
||||
|
||||
}
|
||||
|
||||
//PLAYGROUND TESTING
|
||||
func SetupRoutesXsample(app *echo.Echo, h *XsampleHandler) {
|
||||
xSample := app.Group("/xsample")
|
||||
xSample.GET("/xsample01", h.Hello)
|
||||
}
|
||||
func SetupRoutesProject(app *echo.Echo) {
|
||||
|
||||
|
||||
32
handlers/xsample.handlers.go
Normal file
32
handlers/xsample.handlers.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/a-h/templ"
|
||||
"github.com/emarifer/go-templ-project-structure/views/xsample"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
type XsampleService interface {
|
||||
}
|
||||
|
||||
func NewXsampleHandler(us XsampleService) *XsampleHandler {
|
||||
return &XsampleHandler{
|
||||
XsampleService: us,
|
||||
}
|
||||
}
|
||||
|
||||
type XsampleHandler struct {
|
||||
XsampleService XsampleService
|
||||
}
|
||||
|
||||
func (uh *XsampleHandler) Hello(c echo.Context) error {
|
||||
helo := xsample.ShowHelo("Hello World", xsample.HelloWorld("Hello World"), xsample.CssHelo(), xsample.JsHelo())
|
||||
return uh.View(c, helo)
|
||||
}
|
||||
|
||||
func (uh *XsampleHandler) View(c echo.Context, cmp templ.Component) error {
|
||||
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
|
||||
|
||||
return cmp.Render(c.Request().Context(), c.Response().Writer)
|
||||
}
|
||||
80
services/xsample.services.go
Normal file
80
services/xsample.services.go
Normal file
@@ -0,0 +1,80 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/emarifer/go-templ-project-structure/db"
|
||||
)
|
||||
|
||||
func NewServicesXsample(u Xsample, uStore db.XsampleStore) *ServicesXsample {
|
||||
|
||||
return &ServicesXsample{
|
||||
Xsample: u,
|
||||
XsampleStore: uStore,
|
||||
}
|
||||
}
|
||||
|
||||
type Xsample struct {
|
||||
ID int `json:"id"`
|
||||
Xsamplename string `json:"Xsamplename"`
|
||||
Email string `json:"email"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
}
|
||||
|
||||
type ServicesXsample struct {
|
||||
Xsample Xsample
|
||||
XsampleStore db.XsampleStore
|
||||
}
|
||||
|
||||
func (su *ServicesXsample) GetAllXsamples() ([]Xsample, error) {
|
||||
query := `SELECT id, Xsamplename, email, created_at FROM Xsamples ORDER BY created_at DESC`
|
||||
|
||||
rows, err := su.XsampleStore.Db.Query(query)
|
||||
if err != nil {
|
||||
return []Xsample{}, err
|
||||
}
|
||||
// We close the resource
|
||||
defer rows.Close()
|
||||
|
||||
Xsamples := []Xsample{}
|
||||
for rows.Next() {
|
||||
rows.Scan(
|
||||
&su.Xsample.ID,
|
||||
&su.Xsample.Xsamplename,
|
||||
&su.Xsample.Email,
|
||||
&su.Xsample.CreatedAt,
|
||||
)
|
||||
|
||||
Xsamples = append(Xsamples, su.Xsample)
|
||||
}
|
||||
|
||||
return Xsamples, nil
|
||||
}
|
||||
|
||||
func (su *ServicesXsample) GetXsampleById(id int) (Xsample, error) {
|
||||
|
||||
query := `SELECT id, Xsamplename, email, created_at FROM Xsamples
|
||||
WHERE id = ?`
|
||||
|
||||
stmt, err := su.XsampleStore.Db.Prepare(query)
|
||||
if err != nil {
|
||||
return Xsample{}, err
|
||||
}
|
||||
|
||||
defer stmt.Close()
|
||||
|
||||
su.Xsample.ID = id
|
||||
err = stmt.QueryRow(
|
||||
su.Xsample.ID,
|
||||
).Scan(
|
||||
&su.Xsample.ID,
|
||||
&su.Xsample.Xsamplename,
|
||||
&su.Xsample.Email,
|
||||
&su.Xsample.CreatedAt,
|
||||
)
|
||||
if err != nil {
|
||||
return Xsample{}, err
|
||||
}
|
||||
|
||||
return su.Xsample, nil
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package layout
|
||||
|
||||
// loyoit for login/forgot password
|
||||
templ AuthenticationLayout(title string, css templ.Component, js templ.Component) {
|
||||
templ CanvasLayout(title string, css templ.Component, js templ.Component) {
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme
|
||||
@@ -78,6 +77,12 @@ templ AuthenticationLayout(title string, css templ.Component, js templ.Component
|
||||
rel="shortcut icon"
|
||||
href="asset-corporate-portal/media/logo/logo-small.jpg"
|
||||
/>
|
||||
<!--end::Layout Themes SAS-->
|
||||
<link
|
||||
href="asset-corporate-portal/css/sas.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
@css
|
||||
</head>
|
||||
<!--end::Head-->
|
||||
|
||||
@@ -10,8 +10,7 @@ import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
// loyoit for login/forgot password
|
||||
func AuthenticationLayout(title string, css templ.Component, js templ.Component) templ.Component {
|
||||
func CanvasLayout(title string, css templ.Component, js templ.Component) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
@@ -24,20 +23,20 @@ func AuthenticationLayout(title string, css templ.Component, js templ.Component)
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><!--\r\nTemplate Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme\r\nAuthor: KeenThemes\r\nWebsite: http://www.keenthemes.com/\r\nContact: support@keenthemes.com\r\nFollow: www.twitter.com/keenthemes\r\nDribbble: www.dribbble.com/keenthemes\r\nLike: www.facebook.com/keenthemes\r\nPurchase: https://1.envato.market/EA4JP\r\nRenew Support: https://1.envato.market/EA4JP\r\nLicense: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.\r\n--><html lang=\"en\"><!--begin::Head--><head><base href=\"../\"><meta charset=\"utf-8\"><title>Company Portal | ")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><!--\r\n\t\tTemplate Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme\r\n\t\tAuthor: KeenThemes\r\n\t\tWebsite: http://www.keenthemes.com/\r\n\t\tContact: support@keenthemes.com\r\n\t\tFollow: www.twitter.com/keenthemes\r\n\t\tDribbble: www.dribbble.com/keenthemes\r\n\t\tLike: www.facebook.com/keenthemes\r\n\t\tPurchase: https://1.envato.market/EA4JP\r\n\t\tRenew Support: https://1.envato.market/EA4JP\r\n\t\tLicense: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.\r\n\t\t--><html lang=\"en\"><!--begin::Head--><head><base href=\"../\"><meta charset=\"utf-8\"><title>Company Portal | ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\canvas_layout.templ`, Line: 23, Col: 34}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\canvas_layout.templ`, Line: 22, Col: 34}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><meta name=\"description\" content=\"Company Portal\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"><!--begin::Fonts--><link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700\"><!--end::Fonts--><!--begin::Page Custom Styles(used by this page)--><link href=\"assets/css/pages/login/login-1.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Page Custom Styles--><!--begin::Global Theme Styles(used by all pages)--><link href=\"assets/plugins/global/plugins.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/plugins/custom/prismjs/prismjs.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/style.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Global Theme Styles--><!--begin::Layout Themes(used by all pages)--><link href=\"assets/css/themes/layout/header/base/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/header/menu/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/brand/dark.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/aside/dark.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Layout Themes--><link rel=\"shortcut icon\" href=\"asset-corporate-portal/media/logo/logo-small.jpg\">")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><meta name=\"description\" content=\"Company Portal\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"><!--begin::Fonts--><link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700\"><!--end::Fonts--><!--begin::Page Custom Styles(used by this page)--><link href=\"assets/css/pages/login/login-1.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Page Custom Styles--><!--begin::Global Theme Styles(used by all pages)--><link href=\"assets/plugins/global/plugins.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/plugins/custom/prismjs/prismjs.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/style.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Global Theme Styles--><!--begin::Layout Themes(used by all pages)--><link href=\"assets/css/themes/layout/header/base/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/header/menu/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/brand/dark.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/aside/dark.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Layout Themes--><link rel=\"shortcut icon\" href=\"asset-corporate-portal/media/logo/logo-small.jpg\"><!--end::Layout Themes SAS--><link href=\"asset-corporate-portal/css/sas.bundle.css\" rel=\"stylesheet\" type=\"text/css\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
174
views/layout/playground_layout.templ
Normal file
174
views/layout/playground_layout.templ
Normal file
@@ -0,0 +1,174 @@
|
||||
package layout
|
||||
|
||||
// LAYOUT PLAYGROUND
|
||||
templ PlaygroundLayout(title string, css templ.Component, js templ.Component) {
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Template Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme
|
||||
Author: KeenThemes
|
||||
Website: http://www.keenthemes.com/
|
||||
Contact: support@keenthemes.com
|
||||
Follow: www.twitter.com/keenthemes
|
||||
Dribbble: www.dribbble.com/keenthemes
|
||||
Like: www.facebook.com/keenthemes
|
||||
Purchase: https://1.envato.market/EA4JP
|
||||
Renew Support: https://1.envato.market/EA4JP
|
||||
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
|
||||
-->
|
||||
<html lang="en">
|
||||
<!--begin::Head-->
|
||||
<head>
|
||||
<base href="../"/>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Company Portal | { title }</title>
|
||||
<meta name="description" content="Company Portal"/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
<!--begin::Fonts-->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700"
|
||||
/>
|
||||
<!--end::Fonts-->
|
||||
<!--begin::Page Custom Styles(used by this page)-->
|
||||
<link
|
||||
href="assets/css/pages/login/login-1.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Page Custom Styles-->
|
||||
<!--begin::Global Theme Styles(used by all pages)-->
|
||||
<link
|
||||
href="assets/plugins/global/plugins.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/plugins/custom/prismjs/prismjs.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link href="assets/css/style.bundle.css" rel="stylesheet" type="text/css"/>
|
||||
<!--end::Global Theme Styles-->
|
||||
<!--begin::Layout Themes(used by all pages)-->
|
||||
<link
|
||||
href="assets/css/themes/layout/header/base/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/header/menu/light.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/brand/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<link
|
||||
href="assets/css/themes/layout/aside/dark.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--end::Layout Themes-->
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="asset-corporate-portal/media/logo/logo-small.jpg"
|
||||
/>
|
||||
<!--end::Layout Themes SAS-->
|
||||
<link
|
||||
href="asset-corporate-portal/css/sas.bundle.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
@css
|
||||
</head>
|
||||
<!--end::Head-->
|
||||
<!--begin::Body-->
|
||||
<body
|
||||
id="kt_body"
|
||||
class="header-fixed header-mobile-fixed subheader-enabled subheader-fixed subheader-mobile-fixed aside-enabled aside-fixed aside-minimize-hoverable page-loading"
|
||||
>
|
||||
<!--begin::Main-->
|
||||
{ children... }
|
||||
<!--end::Main-->
|
||||
<script>
|
||||
var HOST_URL =
|
||||
"https://preview.keenthemes.com/metronic/theme/html/tools/preview";
|
||||
</script>
|
||||
<!--begin::Global Config(global config for global JS scripts)-->
|
||||
<script>
|
||||
var KTAppSettings = {
|
||||
breakpoints: {
|
||||
sm: 576,
|
||||
md: 768,
|
||||
lg: 992,
|
||||
xl: 1200,
|
||||
xxl: 1400,
|
||||
},
|
||||
colors: {
|
||||
theme: {
|
||||
base: {
|
||||
white: "#ffffff",
|
||||
primary: "#3699FF",
|
||||
secondary: "#E5EAEE",
|
||||
success: "#1BC5BD",
|
||||
info: "#8950FC",
|
||||
warning: "#FFA800",
|
||||
danger: "#F64E60",
|
||||
light: "#E4E6EF",
|
||||
dark: "#181C32",
|
||||
},
|
||||
light: {
|
||||
white: "#ffffff",
|
||||
primary: "#E1F0FF",
|
||||
secondary: "#EBEDF3",
|
||||
success: "#C9F7F5",
|
||||
info: "#EEE5FF",
|
||||
warning: "#FFF4DE",
|
||||
danger: "#FFE2E5",
|
||||
light: "#F3F6F9",
|
||||
dark: "#D6D6E0",
|
||||
},
|
||||
inverse: {
|
||||
white: "#ffffff",
|
||||
primary: "#ffffff",
|
||||
secondary: "#3F4254",
|
||||
success: "#ffffff",
|
||||
info: "#ffffff",
|
||||
warning: "#ffffff",
|
||||
danger: "#ffffff",
|
||||
light: "#464E5F",
|
||||
dark: "#ffffff",
|
||||
},
|
||||
},
|
||||
gray: {
|
||||
"gray-100": "#F3F6F9",
|
||||
"gray-200": "#EBEDF3",
|
||||
"gray-300": "#E4E6EF",
|
||||
"gray-400": "#D1D3E0",
|
||||
"gray-500": "#B5B5C3",
|
||||
"gray-600": "#7E8299",
|
||||
"gray-700": "#5E6278",
|
||||
"gray-800": "#3F4254",
|
||||
"gray-900": "#181C32",
|
||||
},
|
||||
},
|
||||
"font-family": "Poppins",
|
||||
};
|
||||
</script>
|
||||
<!--end::Global Config-->
|
||||
<!--begin::Global Theme Bundle(used by all pages)-->
|
||||
<script src="assets/plugins/global/plugins.bundle.js"></script>
|
||||
<script src="assets/plugins/custom/prismjs/prismjs.bundle.js"></script>
|
||||
<script src="assets/js/scripts.bundle.js"></script>
|
||||
<!--end::Global Theme Bundle-->
|
||||
@js
|
||||
<!--end::Page Scripts-->
|
||||
</body>
|
||||
<!--end::Body-->
|
||||
</html>
|
||||
}
|
||||
73
views/layout/playground_layout_templ.go
Normal file
73
views/layout/playground_layout_templ.go
Normal file
@@ -0,0 +1,73 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package layout
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
// LAYOUT PLAYGROUND
|
||||
func PlaygroundLayout(title string, css templ.Component, js templ.Component) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><!--\r\n\t\tTemplate Name: Metronic - Bootstrap 4 HTML, React, Angular 9 & VueJS Admin Dashboard Theme\r\n\t\tAuthor: KeenThemes\r\n\t\tWebsite: http://www.keenthemes.com/\r\n\t\tContact: support@keenthemes.com\r\n\t\tFollow: www.twitter.com/keenthemes\r\n\t\tDribbble: www.dribbble.com/keenthemes\r\n\t\tLike: www.facebook.com/keenthemes\r\n\t\tPurchase: https://1.envato.market/EA4JP\r\n\t\tRenew Support: https://1.envato.market/EA4JP\r\n\t\tLicense: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.\r\n\t\t--><html lang=\"en\"><!--begin::Head--><head><base href=\"../\"><meta charset=\"utf-8\"><title>Company Portal | ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\layout\playground_layout.templ`, Line: 23, Col: 34}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><meta name=\"description\" content=\"Company Portal\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"><!--begin::Fonts--><link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700\"><!--end::Fonts--><!--begin::Page Custom Styles(used by this page)--><link href=\"assets/css/pages/login/login-1.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Page Custom Styles--><!--begin::Global Theme Styles(used by all pages)--><link href=\"assets/plugins/global/plugins.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/plugins/custom/prismjs/prismjs.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/style.bundle.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Global Theme Styles--><!--begin::Layout Themes(used by all pages)--><link href=\"assets/css/themes/layout/header/base/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/header/menu/light.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/brand/dark.css\" rel=\"stylesheet\" type=\"text/css\"><link href=\"assets/css/themes/layout/aside/dark.css\" rel=\"stylesheet\" type=\"text/css\"><!--end::Layout Themes--><link rel=\"shortcut icon\" href=\"asset-corporate-portal/media/logo/logo-small.jpg\"><!--end::Layout Themes SAS--><link href=\"asset-corporate-portal/css/sas.bundle.css\" rel=\"stylesheet\" type=\"text/css\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = css.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</head><!--end::Head--><!--begin::Body--><body id=\"kt_body\" class=\"header-fixed header-mobile-fixed subheader-enabled subheader-fixed subheader-mobile-fixed aside-enabled aside-fixed aside-minimize-hoverable page-loading\"><!--begin::Main-->")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--end::Main--><script>\r\n var HOST_URL =\r\n \"https://preview.keenthemes.com/metronic/theme/html/tools/preview\";\r\n </script><!--begin::Global Config(global config for global JS scripts)--><script>\r\n var KTAppSettings = {\r\n breakpoints: {\r\n sm: 576,\r\n md: 768,\r\n lg: 992,\r\n xl: 1200,\r\n xxl: 1400,\r\n },\r\n colors: {\r\n theme: {\r\n base: {\r\n white: \"#ffffff\",\r\n primary: \"#3699FF\",\r\n secondary: \"#E5EAEE\",\r\n success: \"#1BC5BD\",\r\n info: \"#8950FC\",\r\n warning: \"#FFA800\",\r\n danger: \"#F64E60\",\r\n light: \"#E4E6EF\",\r\n dark: \"#181C32\",\r\n },\r\n light: {\r\n white: \"#ffffff\",\r\n primary: \"#E1F0FF\",\r\n secondary: \"#EBEDF3\",\r\n success: \"#C9F7F5\",\r\n info: \"#EEE5FF\",\r\n warning: \"#FFF4DE\",\r\n danger: \"#FFE2E5\",\r\n light: \"#F3F6F9\",\r\n dark: \"#D6D6E0\",\r\n },\r\n inverse: {\r\n white: \"#ffffff\",\r\n primary: \"#ffffff\",\r\n secondary: \"#3F4254\",\r\n success: \"#ffffff\",\r\n info: \"#ffffff\",\r\n warning: \"#ffffff\",\r\n danger: \"#ffffff\",\r\n light: \"#464E5F\",\r\n dark: \"#ffffff\",\r\n },\r\n },\r\n gray: {\r\n \"gray-100\": \"#F3F6F9\",\r\n \"gray-200\": \"#EBEDF3\",\r\n \"gray-300\": \"#E4E6EF\",\r\n \"gray-400\": \"#D1D3E0\",\r\n \"gray-500\": \"#B5B5C3\",\r\n \"gray-600\": \"#7E8299\",\r\n \"gray-700\": \"#5E6278\",\r\n \"gray-800\": \"#3F4254\",\r\n \"gray-900\": \"#181C32\",\r\n },\r\n },\r\n \"font-family\": \"Poppins\",\r\n };\r\n </script><!--end::Global Config--><!--begin::Global Theme Bundle(used by all pages)--><script src=\"assets/plugins/global/plugins.bundle.js\"></script><script src=\"assets/plugins/custom/prismjs/prismjs.bundle.js\"></script><script src=\"assets/js/scripts.bundle.js\"></script><!--end::Global Theme Bundle-->")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = js.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!--end::Page Scripts--></body><!--end::Body--></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
21
views/xsample/xsample.templ
Normal file
21
views/xsample/xsample.templ
Normal file
@@ -0,0 +1,21 @@
|
||||
package xsample
|
||||
|
||||
import (
|
||||
"github.com/emarifer/go-templ-project-structure/views/layout"
|
||||
)
|
||||
|
||||
templ HelloWorld(title string) {
|
||||
<div>{ title }</div>
|
||||
}
|
||||
|
||||
templ CssHelo() {
|
||||
}
|
||||
|
||||
templ JsHelo() {
|
||||
}
|
||||
|
||||
templ ShowHelo(title string, cmp templ.Component, css templ.Component, js templ.Component) {
|
||||
@layout.PlaygroundLayout(title, css, js) {
|
||||
@cmp
|
||||
}
|
||||
}
|
||||
131
views/xsample/xsample_templ.go
Normal file
131
views/xsample/xsample_templ.go
Normal file
@@ -0,0 +1,131 @@
|
||||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.663
|
||||
package xsample
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import "context"
|
||||
import "io"
|
||||
import "bytes"
|
||||
|
||||
import (
|
||||
"github.com/emarifer/go-templ-project-structure/views/layout"
|
||||
)
|
||||
|
||||
func HelloWorld(title string) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\xsample\xsample.templ`, Line: 8, Col: 13}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func CssHelo() templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var3 == nil {
|
||||
templ_7745c5c3_Var3 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func JsHelo() templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var4 == nil {
|
||||
templ_7745c5c3_Var4 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func ShowHelo(title string, cmp templ.Component, css templ.Component, js templ.Component) templ.Component {
|
||||
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var5 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var5 == nil {
|
||||
templ_7745c5c3_Var5 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Var6 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
}
|
||||
templ_7745c5c3_Err = cmp.Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
templ_7745c5c3_Err = layout.PlaygroundLayout(title, css, js).Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user