Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add carousel component #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class AppComponent {
{ name: 'blockquotes', link: 'bootstrap-prototype/blockquotes' },
{ name: 'breadcrumb', link: 'bootstrap-prototype/breadcrumb' },
{ name: 'buttons', link: 'bootstrap-prototype/buttons' },
{ name: 'carousel', link: 'bootstrap-prototype/carousel'},
{ name: 'collapse', link: 'bootstrap-prototype/collapse' },
{ name: 'dropdowns', link: 'bootstrap-prototype/dropdowns' },
{ name: 'forms', link: 'bootstrap-prototype/forms' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export const ITEMS: any[] =
{ id: 14, name: 'Spinners', link: 'spinners' },
{ id: 15, name: 'Toasts', link: 'toasts' },
{ id: 16, name: 'Tooltips', link: 'tooltips' },
{ id: 17, name: 'Carousel', link: 'carousel' },
];
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ <h2 class="card-title text-primary">Alerts</h2>
<div class="alert alert-info" role="alert">
A simple info alert—check it out!
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert—check it out!
</div>
<hr>
<div class="alert alert-primary" role="alert">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="https://media.giphy.com/media/RfqiR12yhtHpwaItBq/giphy.gif" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="https://media.giphy.com/media/RfqiR12yhtHpwaItBq/giphy.gif" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="https://media.giphy.com/media/RfqiR12yhtHpwaItBq/giphy.gif" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-carousel',
templateUrl: './carousel.component.html',
styleUrls: ['./carousel.component.css']
})
export class CarouselComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AlertsComponent } from './alerts/items.component';
import { BadgeComponent } from './badge/items.component';
import { BlockquotesComponent } from './blockquotes/items.component';
import { BreadcrumbComponent } from './breadcrumb/items.component';
import { CarouselComponent } from './carousel/carousel.component';
import { ButtonsComponent } from './buttons/items.component';
import { TooltipsComponent } from './tooltips/items.component';
import { CollapseComponent } from './collapse/items.component';
Expand All @@ -32,6 +33,7 @@ const routes: Routes = [
{ path: 'badge', component: BadgeComponent },
{ path: 'blockquotes', component: BlockquotesComponent },
{ path: 'breadcrumb', component: BreadcrumbComponent },
{ path: 'carousel', component: CarouselComponent },
{ path: 'buttons', component: ButtonsComponent },
{ path: 'tooltips', component: TooltipsComponent },
{ path: 'collapse', component: CollapseComponent },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { CommonModule } from '@angular/common';

import { ExampleBootstrapPrototypeRoutingModule } from './example-bootstrap-prototype-routing.module';
import { ExampleBootstrapPrototypeComponent } from './example-bootstrap-prototype.component';
import { CarouselComponent } from './carousel/carousel.component';

@NgModule({
declarations: [
ExampleBootstrapPrototypeComponent,
CarouselComponent,
],
exports: [
ExampleBootstrapPrototypeComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<form class="form-inline">
<input #edit aria-label="Searchfield" type="text" name="searchField" [ngModel]="searchField"
class="form-control form-control-sm mb-2 mr-2" id="searchField" placeholder="{{placeholder}}"
style="max-width: 160px;">
style="max-width: 160px;" (keypress)="searching()">
<button aria-label="Search" (click)="searching()" type="submit" class="btn btn-outline-primary btn-sm mb-2"><i
class="fas fa-search"></i></button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<label for="name">Name</label>
<input type="text" class="form-control" id="name" value="Avengers: Endgame">
</div>
<div class="form-group col-md-9">
<label for="name">Subname</label>
<input type="text" class="form-control" id="name" value="Subname">
</div>
<div class="form-group col-md-3">
<label for="releaseDate">Release Date</label>
<input type="text" class="form-control" id="releaseDate" value="April 24, 2019">
Expand Down