Skip to content

Commit

Permalink
card component
Browse files Browse the repository at this point in the history
  • Loading branch information
Bammez committed Feb 27, 2024
1 parent 8657100 commit 6392395
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 8 deletions.
2 changes: 1 addition & 1 deletion projects/ngx-cream-lib/src/lib/card/card.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ a.link-button {
.picture img {
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
}
2 changes: 1 addition & 1 deletion projects/ngx-cream-lib/src/lib/card/card.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="card">
<p class="picture">
<img [src]="'../../../../../assets/img/' + imageName" alt="">
<img [src]="'../../../../../assets/img/' + imageName" [alt]="altImg">
</p>
<div class="card-content">
<c3m-h titleLevel="3">
Expand Down
5 changes: 3 additions & 2 deletions projects/ngx-cream-lib/src/lib/card/card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class CardComponent {
@Input() title: string = '';
// @Input() cardtitleLevel = '';
@Input() imageName = '';
@Input() linkUrl = "";
@Input() labelButton = "";
@Input() linkUrl = '';
@Input() labelButton = '';
@Input() altImg = '';
}
54 changes: 50 additions & 4 deletions src/app/pages/card-page/card-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,68 @@ <h3>Card component</h3>

<c3m-tabs class="block-style" label="Demo and Code">

Check failure on line 4 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Delete `··`
<c3m-tab-panel class="block-style" tabTitle="Demo" [isActive]="true">

Check failure on line 5 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Replace `········` with `····`
<c3m-card title="Card Title" titleLevel="2" imageName="illu.jpg" linkUrl="portal/card" labelButton="Découvrir" cardtitleLevel="5">
<c3m-card title="Card Title" imageName="illu.jpg" linkUrl="portal/card" labelButton="Découvrir" altImg="card image">

Check failure on line 6 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Replace `············<c3m-card·title="Card·Title"·imageName="illu.jpg"·linkUrl="portal/card"·labelButton="Découvrir"` with `······<c3m-card⏎········title="Card·Title"⏎········imageName="illu.jpg"⏎········linkUrl="portal/card"⏎········labelButton="Découvrir"⏎·······`
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus natus quam maxime.

Check failure on line 7 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Replace `··············Lorem·ipsum·dolor·sit·amet,·consectetur·adipisicing·elit.·Repellendus·natus·quam·maxime.·` with `········Lorem·ipsum·dolor·sit·amet,·consectetur·adipisicing·elit.·Repellendus·natus·quam·maxime.`
Repellat atque animi consequatur fugiat perferendis dicta cumque maiores minus rem facilis,

Check failure on line 8 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Replace `··············Repellat·atque·animi·consequatur·fugiat·perferendis·dicta·cumque·maiores·minus·rem·facilis,·` with `········Repellat·atque·animi·consequatur·fugiat·perferendis·dicta·cumque·maiores·minus·rem·facilis,`
ex unde quo laborum sunt cupiditate.

Check failure on line 9 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Delete `······`
</c3m-card>

Check failure on line 10 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Replace `············` with `······`
</c3m-tab-panel>

Check failure on line 11 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Delete `····`
<c3m-tab-panel class="block-style" tabTitle="Application">

Check failure on line 12 in src/app/pages/card-page/card-page.component.html

View workflow job for this annotation

GitHub Actions / Run linters

Delete `····`
<pre>
&lt;c3m-card title=&#34;Card Title&#34;&gt;
&lt;c3m-h titleLevel=&#34;titleLevel&#34;&gt; Title &lt;/c3m-h&gt;
&lt;c3m-card title=&#34;Card Title&#34; imageName=&#34;image name&#34; altImg=&#34;altImg&#34;
linkUrl=&#34;url link&#34; labelButton=&#34;button label&#34;&gt;
&lt;NG-CONTENT&gt;
&lt;a href=&#34;linkUrl&#34;&gt; labelButton &lt;/a&gt;
&lt;/c3m-card&gt;
</pre>

</c3m-tab-panel>
</c3m-tabs>

</section>

<section id="props-n-events">
<h3>Properties and Events</h3>

<table class="adaptable">
<caption>
Properties applicable to the component
<code>c3m-card</code>
</caption>
<tr>
<th scope="col">Name</th>
<th scope="col">Type</th>
<th scope="col">Default</th>
<th scope="col">Description</th>
</tr>
<tr>
<td data-head="Name">title</td>
<td data-head="Type">string</td>
<td data-head="Default">""</td>
<td>Title of the card</td>
</tr>
<tr>
<td data-head="Name">imageName</td>
<td data-head="Type">string</td>
<td data-head="Default">""</td>
<td>Name of the image in the img folder</td>
</tr>
<tr>
<td data-head="Name">linkUrl</td>
<td data-head="Type">string</td>
<td data-head="Default">""</td>
<td>The URL link of the button</td>
</tr>
<tr>
<td data-head="Name">labelButton</td>
<td data-head="Type">string</td>
<td data-head="Default">""</td>
<td>Name of the button</td>
</tr>
<tr>
<td data-head="Name">altImg</td>
<td data-head="Type">string</td>
<td data-head="Default">""</td>
<td>Textual alternative to card image</td>
</tr>
</table>
</section>

0 comments on commit 6392395

Please sign in to comment.