mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 16:00:14 +01:00
feat: remove producthunt banner (#2019)
This commit is contained in:
parent
ae6bcc76a8
commit
a3f5d4f32b
9 changed files with 0 additions and 307 deletions
|
|
@ -1,82 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Akveo. All Rights Reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@import '../../../@theme/styles/themes';
|
|
||||||
|
|
||||||
:host {
|
|
||||||
position: fixed;
|
|
||||||
@include nb-ltr(right, 10px);
|
|
||||||
@include nb-rtl(left, 10px);
|
|
||||||
top: 80px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #dc5425;
|
|
||||||
box-shadow: 0 2px 4px 0 rgba(189, 93, 60, 0.54);
|
|
||||||
z-index: 99999999;
|
|
||||||
|
|
||||||
.heading-with-icon {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
height: auto;
|
|
||||||
width: 77px;
|
|
||||||
margin: 0 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-heading {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-content {
|
|
||||||
padding-top: 36px;
|
|
||||||
padding-bottom: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: auto;
|
|
||||||
padding: 10px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nb-close {
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cta {
|
|
||||||
margin: 8px 0 0;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cta-link {
|
|
||||||
font-size: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 16px;
|
|
||||||
margin: 0 10px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 700;
|
|
||||||
background: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 991px) {
|
|
||||||
top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Akveo. All Rights Reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Component, HostBinding, Inject, OnInit } from '@angular/core';
|
|
||||||
import { NB_WINDOW } from '@nebular/theme';
|
|
||||||
|
|
||||||
const HIDE_BANNER_KEY = 'HIDE_PRODUCT_HUNT_BANNER';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'ngx-release-banner',
|
|
||||||
template: `
|
|
||||||
<div class="heading-with-icon">
|
|
||||||
<img class="icon" src="assets/img/product-hunt-cat.png" alt="Product Hunt">
|
|
||||||
<div class="banner-content">
|
|
||||||
<h2 class="banner-heading">ngx-admin is on Product Hunt today!</h2>
|
|
||||||
<p class="cta">Please
|
|
||||||
<a class="cta-link"
|
|
||||||
href="https://www.producthunt.com/posts/ngx-admin"
|
|
||||||
target="_blank">
|
|
||||||
share
|
|
||||||
</a>
|
|
||||||
your feedback :)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<button class="close-button" aria-label="close" (click)="closeBanner()">
|
|
||||||
<span class="nb-close"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
styleUrls: ['./banner.component.scss'],
|
|
||||||
})
|
|
||||||
export class BannerComponent implements OnInit {
|
|
||||||
|
|
||||||
storage: Storage;
|
|
||||||
|
|
||||||
@HostBinding('attr.hidden')
|
|
||||||
isHidden: true | null = null;
|
|
||||||
|
|
||||||
@HostBinding('attr.dir')
|
|
||||||
dir = 'ltr';
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
@Inject(NB_WINDOW) private window,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.storage = this.window.localStorage;
|
|
||||||
|
|
||||||
this.isHidden = this.storage && this.storage.getItem(HIDE_BANNER_KEY)
|
|
||||||
? true
|
|
||||||
: null;
|
|
||||||
}
|
|
||||||
|
|
||||||
closeBanner() {
|
|
||||||
if (this.storage) {
|
|
||||||
this.storage.setItem(HIDE_BANNER_KEY, 'true');
|
|
||||||
}
|
|
||||||
this.isHidden = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
<nb-layout-column>
|
<nb-layout-column>
|
||||||
<ngx-landing-sections-container></ngx-landing-sections-container>
|
<ngx-landing-sections-container></ngx-landing-sections-container>
|
||||||
<ngx-release-banner></ngx-release-banner>
|
|
||||||
</nb-layout-column>
|
</nb-layout-column>
|
||||||
|
|
||||||
<nb-layout-footer class="footer" fixed>
|
<nb-layout-footer class="footer" fixed>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import { ContactSectionComponent } from './contact-section/contact-section.compo
|
||||||
import { OurProjectsSectionComponent } from './our-projects-section/our-projects-section.component';
|
import { OurProjectsSectionComponent } from './our-projects-section/our-projects-section.component';
|
||||||
import { LandingHomeRoutingModule } from './landing-home-routing.module';
|
import { LandingHomeRoutingModule } from './landing-home-routing.module';
|
||||||
import { NgxLandingSectionsContainerComponent } from './sections-container/ngx-landing-sections-container.component';
|
import { NgxLandingSectionsContainerComponent } from './sections-container/ngx-landing-sections-container.component';
|
||||||
import { BannerComponent } from './banner/banner.component';
|
|
||||||
// components
|
// components
|
||||||
|
|
||||||
const COMPONENTS = [
|
const COMPONENTS = [
|
||||||
|
|
@ -37,7 +36,6 @@ const COMPONENTS = [
|
||||||
OurProjectsSectionComponent,
|
OurProjectsSectionComponent,
|
||||||
SocialSectionComponent,
|
SocialSectionComponent,
|
||||||
ContactSectionComponent,
|
ContactSectionComponent,
|
||||||
BannerComponent,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Akveo. All Rights Reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@import '../../styles/themes';
|
|
||||||
|
|
||||||
:host {
|
|
||||||
position: fixed;
|
|
||||||
@include nb-ltr(right, 1.5rem);
|
|
||||||
@include nb-rtl(left, 1.5rem);
|
|
||||||
top: 20vh;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #dc5425;
|
|
||||||
box-shadow: 0 2px 4px 0 rgba(189, 93, 60, 0.54);
|
|
||||||
z-index: 99999999;
|
|
||||||
|
|
||||||
.heading-with-icon {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
height: auto;
|
|
||||||
width: 77px;
|
|
||||||
margin: 0 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-heading {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-content {
|
|
||||||
padding-top: 36px;
|
|
||||||
padding-bottom: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-button {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: auto;
|
|
||||||
padding: 10px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nb-close {
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cta {
|
|
||||||
margin: 8px 0 0;
|
|
||||||
font-size: 14px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cta-link {
|
|
||||||
font-size: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 16px;
|
|
||||||
margin: 0 10px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 700;
|
|
||||||
background: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Akveo. All Rights Reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Component, HostBinding, Inject, OnInit } from '@angular/core';
|
|
||||||
import { NB_WINDOW } from '@nebular/theme';
|
|
||||||
|
|
||||||
const HIDE_BANNER_KEY = 'HIDE_PRODUCT_HUNT_BANNER';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'ngx-release-banner',
|
|
||||||
template: `
|
|
||||||
<div class="heading-with-icon">
|
|
||||||
<img class="icon" src="assets/images/product-hunt-cat.png" alt="Product Hunt">
|
|
||||||
<div class="banner-content">
|
|
||||||
<h2 class="banner-heading">ngx-admin is on Product Hunt today!</h2>
|
|
||||||
<p class="cta">Please
|
|
||||||
<a class="cta-link"
|
|
||||||
href="https://www.producthunt.com/posts/ngx-admin"
|
|
||||||
target="_blank">
|
|
||||||
share
|
|
||||||
</a>
|
|
||||||
your feedback :)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<button class="close-button" aria-label="close" (click)="closeBanner()">
|
|
||||||
<span class="nb-close"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
styleUrls: ['./banner.component.scss'],
|
|
||||||
})
|
|
||||||
export class BannerComponent implements OnInit {
|
|
||||||
|
|
||||||
storage: Storage;
|
|
||||||
|
|
||||||
@HostBinding('attr.hidden')
|
|
||||||
isHidden: true | null = null;
|
|
||||||
|
|
||||||
@HostBinding('attr.dir')
|
|
||||||
dir = 'ltr';
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
@Inject(NB_WINDOW) private window,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.storage = this.window.localStorage;
|
|
||||||
|
|
||||||
this.isHidden = this.storage && this.storage.getItem(HIDE_BANNER_KEY)
|
|
||||||
? true
|
|
||||||
: null;
|
|
||||||
}
|
|
||||||
|
|
||||||
closeBanner() {
|
|
||||||
if (this.storage) {
|
|
||||||
this.storage.setItem(HIDE_BANNER_KEY, 'true');
|
|
||||||
}
|
|
||||||
this.isHidden = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -58,7 +58,6 @@ import { StateService } from '../../../@core/utils';
|
||||||
<ngx-theme-settings></ngx-theme-settings>
|
<ngx-theme-settings></ngx-theme-settings>
|
||||||
</nb-sidebar>
|
</nb-sidebar>
|
||||||
</nb-layout>
|
</nb-layout>
|
||||||
<ngx-release-banner></ngx-release-banner>
|
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class SampleLayoutComponent implements OnDestroy {
|
export class SampleLayoutComponent implements OnDestroy {
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,6 @@ $nb-themes: nb-register-theme((
|
||||||
ecommerce-card-border-width: 1px,
|
ecommerce-card-border-width: 1px,
|
||||||
|
|
||||||
progress-bar-background: linear-gradient(90deg, #3edd81 0%, #3bddaf 100%),
|
progress-bar-background: linear-gradient(90deg, #3edd81 0%, #3bddaf 100%),
|
||||||
|
|
||||||
release-banner-fg: #ffffff,
|
|
||||||
release-banner-bg: #3366ff,
|
|
||||||
release-banner-cta: release-banner-fg,
|
|
||||||
release-banner-separator: #2454e3,
|
|
||||||
), default, default);
|
), default, default);
|
||||||
|
|
||||||
$nb-themes: nb-register-theme((
|
$nb-themes: nb-register-theme((
|
||||||
|
|
@ -81,11 +76,6 @@ $nb-themes: nb-register-theme((
|
||||||
ecommerce-card-border-width: 1px,
|
ecommerce-card-border-width: 1px,
|
||||||
|
|
||||||
progress-bar-background: linear-gradient(90deg, #00c7c7 0%, #00d977 100%),
|
progress-bar-background: linear-gradient(90deg, #00c7c7 0%, #00d977 100%),
|
||||||
|
|
||||||
release-banner-fg: #3366ff,
|
|
||||||
release-banner-bg: #ffffff,
|
|
||||||
release-banner-cta: #5d72b3,
|
|
||||||
release-banner-separator: #ebedf2,
|
|
||||||
), cosmic, cosmic);
|
), cosmic, cosmic);
|
||||||
|
|
||||||
$nb-themes: nb-register-theme((
|
$nb-themes: nb-register-theme((
|
||||||
|
|
@ -122,9 +112,4 @@ $nb-themes: nb-register-theme((
|
||||||
ecommerce-card-border-width: 1px,
|
ecommerce-card-border-width: 1px,
|
||||||
|
|
||||||
progress-bar-background: linear-gradient(90deg, #ff9f6f 0%, #ff8b97 100%),
|
progress-bar-background: linear-gradient(90deg, #ff9f6f 0%, #ff8b97 100%),
|
||||||
|
|
||||||
release-banner-fg: #ffffff,
|
|
||||||
release-banner-bg: #3366ff,
|
|
||||||
release-banner-cta: release-banner-fg,
|
|
||||||
release-banner-separator: #2454e3,
|
|
||||||
), corporate, corporate);
|
), corporate, corporate);
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ import {
|
||||||
import { DEFAULT_THEME } from './styles/theme.default';
|
import { DEFAULT_THEME } from './styles/theme.default';
|
||||||
import { COSMIC_THEME } from './styles/theme.cosmic';
|
import { COSMIC_THEME } from './styles/theme.cosmic';
|
||||||
import { CORPORATE_THEME } from './styles/theme.corporate';
|
import { CORPORATE_THEME } from './styles/theme.corporate';
|
||||||
import { BannerComponent } from 'app/@theme/components/banner/banner.component';
|
|
||||||
import { CallActionCardComponent } from './components/call-action-card/call-action-card.component';
|
import { CallActionCardComponent } from './components/call-action-card/call-action-card.component';
|
||||||
|
|
||||||
const BASE_MODULES = [CommonModule, FormsModule, ReactiveFormsModule];
|
const BASE_MODULES = [CommonModule, FormsModule, ReactiveFormsModule];
|
||||||
|
|
@ -124,7 +123,6 @@ const COMPONENTS = [
|
||||||
SampleLayoutComponent,
|
SampleLayoutComponent,
|
||||||
ThreeColumnsLayoutComponent,
|
ThreeColumnsLayoutComponent,
|
||||||
TwoColumnsLayoutComponent,
|
TwoColumnsLayoutComponent,
|
||||||
BannerComponent,
|
|
||||||
ToggleSettingsButtonComponent,
|
ToggleSettingsButtonComponent,
|
||||||
CallActionCardComponent,
|
CallActionCardComponent,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue