Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pages
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxx IT Solutions
pages
Commits
7f3c6be9
Commit
7f3c6be9
authored
Dec 20, 2021
by
Christian Fruth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
.gitignore
+0
-0
.npmrc
+0
-0
boxx-pages.css
+3
-0
boxx-pages.ts
+40
-0
No files found.
.gitignore
0 → 100644
View file @
7f3c6be9
.npmrc
0 → 100644
View file @
7f3c6be9
boxx-pages.css
0 → 100644
View file @
7f3c6be9
:host
>
::slotted
(
:not
(
.selected
))
{
display
:
none
!important
;
}
boxx-pages.ts
0 → 100644
View file @
7f3c6be9
import
{
customElement
,
property
}
from
"lit/decorators"
;
import
{
Layout
}
from
"Frontend/views/view"
;
import
{
html
,
PropertyValues
}
from
"lit"
;
import
styles
from
'./boxx-pages.css'
;
/**
* Created with IntelliJ IDEA.
* User: Christian Fruth
* Date: 20.12.21
* Time: 11:15
*/
@
customElement
(
'boxx-pages'
)
export
class
Pages
extends
Layout
{
@
property
({
type
:
Number
,
reflect
:
true
})
selected
:
number
=
0
;
static
get
styles
()
{
return
[
styles
];
}
render
():
unknown
{
return
html
`<slot></slot>`
;
}
protected
update
(
changedProperties
:
PropertyValues
)
{
super
.
update
(
changedProperties
);
if
(
changedProperties
.
has
(
'selected'
))
{
this
.
selectedChanged
();
}
}
private
selectedChanged
():
void
{
for
(
let
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
const
page
=
this
.
children
[
i
];
const
pageSelected
=
i
==
this
.
selected
;
page
.
classList
.
toggle
(
'selected'
,
pageSelected
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment