Skip to content

Commit fe49b9d

Browse files
committed
Start adding app chrome.
1 parent c35ee61 commit fe49b9d

File tree

7 files changed

+90
-0
lines changed

7 files changed

+90
-0
lines changed

src/pg/app/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `<pg-app>`
2+
3+
The `pg-app` component is a wrapper that allows an app icon and tabs.
4+
5+
```typescript
6+
import '@pictogrammers/components/pg/app';
7+
```
8+
9+
```html
10+
<pg-app></pg-app>
11+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:host {
2+
3+
}
4+
5+
.example {
6+
border: 10px solid #EEE;
7+
height: 10rem;
8+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="example">
2+
<pg-app>
3+
<div slot="top">Top Bar</div>
4+
<div slot="side">
5+
Sidebar
6+
</div>
7+
<div slot="main">
8+
Content Area
9+
</div>
10+
<div slot="main">
11+
Content Area
12+
</div>
13+
<div slot="home">
14+
Home is the initial page containing helpful info.
15+
</div>
16+
</pg-app>
17+
</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Component, Part, Prop } from '@pictogrammers/element';
2+
3+
import template from './basic.html';
4+
import style from './basic.css';
5+
6+
@Component({
7+
selector: 'x-pg-app-basic',
8+
template,
9+
style
10+
})
11+
export default class XPgAppBasic extends HTMLElement {
12+
13+
}

src/pg/app/app.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:host {
2+
display: contents;
3+
}
4+
5+
[part=grid] {
6+
display: grid;
7+
grid-template-columns: auto;
8+
}
9+
10+
[part=header] {
11+
display: flex;
12+
}

src/pg/app/app.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div part="grid">
2+
<header part="header">
3+
<button part="logo">
4+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none">
5+
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 5H22V6H30V24H27L29 34H25L23.7998 28H20V31H16V28H12.2002L11 34H7L9 24H6V6H14V5H16V2H20V5ZM12.5996 26H16V24H13L12.5996 26ZM20 26H23.4004L23 24H20V26ZM8 22H28V8H8V22Z" fill="#453C4F"/>
6+
<path d="M22 19H14V11H22V19Z" fill="#453C4F"/>
7+
</svg>
8+
</button>
9+
<slot name="top"></slot>
10+
</header>
11+
<slot name="side"></slot>
12+
<slot name="main"></slot>
13+
<slot name="home"></slot>
14+
</div>

src/pg/app/app.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, Part, Prop } from '@pictogrammers/element';
2+
3+
import template from './app.html';
4+
import style from './app.css';
5+
6+
@Component({
7+
selector: 'pg-app',
8+
style,
9+
template
10+
})
11+
export default class PgApp extends HTMLElement {
12+
@Part() $logo: HTMLButtonElement;
13+
14+
15+
}

0 commit comments

Comments
 (0)