-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1505ecb
commit 335e2c6
Showing
8 changed files
with
109 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
<header> | ||
<img | ||
width="200" | ||
alt="Angular Logo" | ||
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" | ||
/> | ||
</header> | ||
<main> | ||
<darkmode-angular /> | ||
</main> | ||
<footer> | ||
<a href="https://github.com/livresaber/darkmode-angular" target="_blank">Version {{appVersion}} @LivreSaber</a> | ||
</footer> | ||
<nucleus-angular-app [config]="configNucleus"> | ||
<div class="content"> | ||
<darkmode-angular /> | ||
</div> | ||
</nucleus-angular-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
footer { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
a { | ||
text-decoration: none; | ||
color: var(--color-text); | ||
} | ||
::ng-deep .content .btn-mode { | ||
position: relative !important; | ||
z-index: 1; | ||
} | ||
|
||
::ng-deep .btn-mode.hiddenLabel { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,46 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import pkg from '../../package.json'; | ||
import { ExampleComponent } from './app.example'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.scss'] | ||
}) | ||
export class AppComponent { | ||
appVersion = pkg.version; | ||
public appVersion; | ||
public angularVersion; | ||
public configNucleus: { | ||
name: string; | ||
github: string; | ||
npm: string; | ||
appVersion: string; | ||
angularVersion: string; | ||
stepsInstall: Array<{ name: string; language: string; content: string }>; | ||
}; | ||
|
||
constructor() { | ||
this.appVersion = pkg.version; | ||
this.angularVersion = pkg.dependencies?.['@angular/core'].replace('^', ''); | ||
this.configNucleus = { | ||
name: 'darkmode-angular', | ||
github: 'https://github.com/livresaber/darkmode-angular', | ||
npm: 'https://www.npmjs.com/package/darkmode-angular', | ||
appVersion: this.appVersion, | ||
angularVersion: this.angularVersion, | ||
stepsInstall: [ | ||
{ | ||
name: 'Install', | ||
language: 'bash', | ||
content: 'npm install darkmode-angular', | ||
}, | ||
{ | ||
name: 'Usage', | ||
language: 'tsx', | ||
content: ExampleComponent, | ||
}, | ||
], | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const ExampleComponent = `// Example Component | ||
import { Component } from '@angular/core'; | ||
import { DarkmodeComponent } from 'darkmode-angular'; | ||
@Component({ | ||
selector: 'app-example', | ||
imports: [DarkmodeComponent], | ||
template: \`<darkmode-angular />\`, | ||
}) | ||
export class AppExample {}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters