Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
feat(component): stepbar & scrollspy added
Browse files Browse the repository at this point in the history
  • Loading branch information
BehnooshShiva committed Aug 5, 2020
1 parent 42f9e80 commit 7fd0cef
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { DocAlertComponent } from './docs/alert.component';
import { DocCarouselComponent } from './docs/carousel.component';
import { DocSwiperComponent } from './docs/swiper.component';
import { DocSpinnerComponent } from './docs/spinner.component';
import { DocScrollspyComponent } from './docs/scrollspy.component';
import { DocStepbarComponent } from './docs/stepbar.component';
import { DocCollapseComponent } from './docs/collapse.component';
import { DocDatepickerComponent } from './docs/datepicker.component';
import { DocProgressBarComponent } from './docs/progress-bar.component';
Expand Down Expand Up @@ -154,6 +156,14 @@ const routes: Routes = [{
path: 'documentation/spinners',
component: DocSpinnerComponent
},
{
path: 'documentation/scrollspy',
component: DocScrollspyComponent
},
{
path: 'documentation/stepbar',
component: DocStepbarComponent
},
{
path: 'documentation/progress',
component: DocProgressBarComponent
Expand Down
10 changes: 9 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DemoJumbotronComponent } from './demos/jumbotron.component';
import { DemoMediaComponent } from './demos/media.component';
import { DemoOrangePopinComponent } from './demos/orange-popin.component';
import { DemoListGroupComponent } from './demos/list-group.component';
import { DemoLocalNavigationComponent } from './demos/local-navigation.Component';
import { DemoLocalNavigationComponent } from './demos/local-navigation.component';
import { DemoBreadcrumbComponent } from './demos/breadcrumb.component';
import { DemoButtonsComponent } from './demos/buttons.component';
import { DemoModalComponent } from './demos/modal.component';
Expand All @@ -41,11 +41,13 @@ import { DemoOSwitchComponent } from './demos/o-switch.component';
import { DemoOToggleComponent } from './demos/o-toggle.component';
import { DemoSwiperComponent } from './demos/swiper.component';
import { DemoSpinnerComponent } from './demos/spinner.component';
import { DemoStepbarComponent } from './demos/stepbar.component';
import { DemoTableComponent } from './demos/table.component';
import { DemoTimepickerComponent } from './demos/timepicker.component';
import { DemoONavbarComponent } from './demos/o-navbar.component';
import { DemoNavbarComponent } from './demos/navbar.component';
import { DemoRatingComponent } from './demos/rating.component';
import { DemoScrollspyComponent } from './demos/scrollspy.component';
import { DemoTypeaheadComponent } from './demos/typeahead.component';
import { DocAccordionComponent } from './docs/accordion.component';
import { DocBadgeComponent } from './docs/badge.component';
Expand All @@ -71,6 +73,8 @@ import { DocAlertComponent } from './docs/alert.component';
import { DocCarouselComponent } from './docs/carousel.component';
import { DocSwiperComponent } from './docs/swiper.component';
import { DocSpinnerComponent } from './docs/spinner.component';
import { DocScrollspyComponent } from './docs/scrollspy.component';
import { DocStepbarComponent } from './docs/stepbar.component';
import { DocCollapseComponent } from './docs/collapse.component';
import { DocDatepickerComponent } from './docs/datepicker.component';
import { DocProgressBarComponent } from './docs/progress-bar.component';
Expand Down Expand Up @@ -121,8 +125,10 @@ import { ScrollTopModule } from 'ng-boosted';
DemoPopoverComponent,
DemoProgressBarComponent,
DemoRatingComponent,
DemoScrollspyComponent,
DemoSwiperComponent,
DemoSpinnerComponent,
DemoStepbarComponent,
DemoTableComponent,
DemoTabsComponent,
DemoTimepickerComponent,
Expand Down Expand Up @@ -157,6 +163,8 @@ import { ScrollTopModule } from 'ng-boosted';
DocPopoverComponent,
DocSwiperComponent,
DocSpinnerComponent,
DocScrollspyComponent,
DocStepbarComponent,
DocProgressBarComponent,
DocNavbarComponent,
DocONavbarComponent,
Expand Down
10 changes: 9 additions & 1 deletion src/app/boostwatch/boostwatch.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import { DemoTabsComponent } from '../demos/tabs.component';
import { DemoPaginationComponent } from '../demos/pagination.component';
import { DemoTooltipComponent } from '../demos/tooltip.component';
import { DemoPopoverComponent } from '../demos/popover.component';
import { DemoSpinnerComponent } from './demos/spinner.component';
import { DemoSpinnerComponent } from '../demos/spinner.component';
import { DemoStepbarComponent } from '../demos/stepbar.component';
import { DemoAlertComponent } from '../demos/alert.component';
import { DemoCarouselComponent } from '../demos/carousel.component';
import { DemoOCalendarComponent } from '../demos/o-calendar.component';
Expand All @@ -34,6 +35,7 @@ import { DemoDropdownComponent } from '../demos/dropdown.component';
import { DemoOSwitchComponent } from '../demos/o-switch.component';
import { DemoOToggleComponent } from '../demos/o-toggle.component';
import { DemoRatingComponent } from '../demos/rating.component';
import { DemoScrollspyComponent } from '../demos/scrollspy.component';
import { DemoSwiperComponent } from '../demos/swiper.component';
import { DemoButtonsComponent } from '../demos/buttons.component';
import { DemoNavbarComponent } from '../demos/navbar.component';
Expand Down Expand Up @@ -75,6 +77,8 @@ import { DocPopoverComponent } from '../docs/popover.component';
import { DocCarouselComponent } from '../docs/carousel.component';
import { DocSwiperComponent } from '../docs/swiper.component';
import { DocSpinnerComponent } from '../docs/spinner.component';
import { DocScrollspyComponent } from '../docs/scrollspy.component';
import { DocStepbarComponent } from '../docs/stepbar.component';
import { DocProgressBarComponent } from '../docs/progress-bar.component';
import { DocONavbarComponent } from '../docs/o-navbar.component';
import { DocScrollUpComponent } from '../docs/scroll-up.component';
Expand Down Expand Up @@ -127,8 +131,10 @@ describe('BoostwatchComponent', () => {
DemoPopoverComponent,
DemoProgressBarComponent,
DemoRatingComponent,
DemoScrollspyComponent,
DemoSwiperComponent,
DemoSpinnerComponent,
DemoStepbarComponent,
DemoTableComponent,
DemoTabsComponent,
DemoTimepickerComponent,
Expand Down Expand Up @@ -169,6 +175,8 @@ describe('BoostwatchComponent', () => {
DocPopoverComponent,
DocSwiperComponent,
DocSpinnerComponent,
DocScrollspyComponent,
DocStepbarComponent,
DocProgressBarComponent,
DocONavbarComponent,
DocOScrollTopComponent,
Expand Down
58 changes: 58 additions & 0 deletions src/app/demos/scrollspy.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<nav role="navigation" id="navbar-example2" class="navbar navbar-dark">
<a class="navbar-brand" href="#"><img src="assets/img/orange_logo.svg" class="d-inline-block align-bottom mr-3" alt="Back to homepage" title="Back to homepage" width="50" height="50" loading="lazy"/></a>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="#fat">@fat</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#mdo">@mdo</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="#one">one</a>
<a class="dropdown-item" href="#two">two</a>
<div role="separator" class="dropdown-divider"></div>
<a class="dropdown-item" href="#three">three</a>
</div>
</li>
</ul>
</nav>
<div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example">
<h4 id="fat">@fat</h4>
<p>
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui.
Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure.
Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic.
Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
</p>
<h4 id="mdo">@mdo</h4>
<p>
Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero.
Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl.
Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.
</p>
<h4 id="one">one</h4>
<p>
Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam.
High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.
</p>
<h4 id="two">two</h4>
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam.
Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse.
Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad.
Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
</p>
<h4 id="three">three</h4>
<p>
Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever.
Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure.
Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic.
Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda.
Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip.
Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit.
VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
</p>
</div>
8 changes: 8 additions & 0 deletions src/app/demos/scrollspy.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Component } from '@angular/core';

@Component({
selector: 'demo-scrollspy',
templateUrl: './scrollspy.component.html'
})

export class DemoScrollspyComponent {}
20 changes: 20 additions & 0 deletions src/app/demos/stepbar.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<nav role="navigation" class="o-stepbar" aria-label="Checkout process">
<p class="float-left mt-2 mr-2 font-weight-bold d-sm-none">Step</p>
<ol>
<li class="stepbar-item">
<a class="stepbar-link" href="#" title="1. Sign in">Sign in</a>
</li>
<li class="stepbar-item current">
<a class="stepbar-link" href="#" title="2. Review" aria-current="step">Review</a>
</li>
<li class="stepbar-item">
<a class="stepbar-link" href="#" title="3. Delivery">Delivery</a>
</li>
<li class="stepbar-item">
<a class="stepbar-link" href="#" title="4. Payment">Payment</a>
</li>
<li class="stepbar-item">
<a class="stepbar-link" href="#" title="5. Place order">Place order</a>
</li>
</ol>
</nav>
7 changes: 7 additions & 0 deletions src/app/demos/stepbar.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component ({
selector: 'demo-stepbar',
templateUrl: './stepbar.component.html'
})
export class DemoStepbarComponent {}
2 changes: 2 additions & 0 deletions src/app/docs-menu/docs-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/popover">Popover</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/progress">Progressbar</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/rating">Rating</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/scrollspy">Scrollspy</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/scroll-up">Scroll Up</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/spinners">Spinners</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/stepbar">Stepbar</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/table">Table</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/tabs">Tabset</a></li>
<li class="nav-item"><a class="nav-link py-md-2 px-md-0" routerLinkActive="active" routerLink="/documentation/timepicker">Timepicker</a></li>
Expand Down
20 changes: 20 additions & 0 deletions src/app/docs/scrollspy.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component } from '@angular/core';

@Component({
selector: 'doc-scrollspy',
template: `
<docs-wrapper component="Scrollspy">
<p class="mt-4">Check the <a target="_blank" rel="noopener noreferrer"
href="https://boosted.orange.com/docs/4.5/components/spinners">ng-bootstrap's original component documentation</a>.</p>
<h3>Demo</h3>
<demo-scrollspy></demo-scrollspy>
<code-box [snippets]="demoSnippets"></code-box>
</docs-wrapper>
`
})
export class DocScrollspyComponent {
public demoSnippets = {
markup: require('!!prismjs-loader?lang=html!../demos/scrollspy.component.html'),
typescript: require('!!prismjs-loader?lang=typescript!../demos/scrollspy.component.ts')
};
}
20 changes: 20 additions & 0 deletions src/app/docs/stepbar.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component } from '@angular/core';

@Component({
selector: 'doc-stepbar',
template: `
<docs-wrapper component="Stepbar">
<p class="mt-4">Check the <a target="_blank" rel="noopener noreferrer"
href="https://boosted.orange.com/docs/4.5/components/stepbar">ng-bootstrap's original component documentation</a>.</p>
<h3>Demo</h3>
<demo-stepbar></demo-stepbar>
<code-box [snippets]="demoSnippets"></code-box>
</docs-wrapper>
`
})
export class DocStepbarComponent {
public demoSnippets = {
markup: require('!!prismjs-loader?lang=html!../demos/stepbar.component.html'),
typescript: require('!!prismjs-loader?lang=typescript!../demos/stepbar.component.ts')
};
}
7 changes: 7 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,11 @@ pre {
}
}

.scrollspy-example {
position: relative;
height: 200px;
margin-top: .5rem;
overflow: auto;
}


0 comments on commit 7fd0cef

Please sign in to comment.