Instantly share code, notes, and snippets.
-
cloud engineering studio
-
23:30
(UTC -05:00) - https://cloudengineering.studio
yokoishioka
/ footer.component.html
Last active
April 2, 2021 13:57
Social Media component in Angular
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
<footer> | |
<ces-social-media ngClass="social-media-footer" [facebook]="{link: 'cloudengineeringstudio', user: 'Cloud Engineering Studio' }" [twitter]="{link: 'CloudEngineeer', user: 'CloudEngineer'}" [linkedIn]="{link: 'cloud-engineering-studio', user: 'Cloud Engineering Studio', company: true}" [medium]="{link:'yoko_65687', user: 'Yoko Ishioka'}"></ces-social-media> | |
© {{ startYear }} - {{ year }} Cloud Engineering Studio by, <a href="https://yokoishioka.com" title="Yoko Ishioka Cloud Engineering Website">Yoko Ishioka</a> | | |
<a routerLink="privacy-policy" routerLinkActive="active" title="{{ name }}'s Privacy Policy">privacy policy</a> | |
</footer> |
yokoishioka
/ footer.component.html
Created
February 6, 2020 01:14
footer for social media component
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
<footer> | |
<ces-social-media ngClass="social-media-footer" [facebook]="{link: 'cloudengineeringstudio', user: 'Cloud Engineering Studio' }" [twitter]="{link: 'CloudEngineeer', user: 'CloudEngineer'}" [linkedIn]="{link: 'cloud-engineering-studio', user: 'Cloud Engineering Studio', company: true}" [medium]="{link:'yoko_65687', user: 'Yoko Ishioka'}"></ces-social-media> | |
© {{ startYear }} - {{ year }} Cloud Engineering Studio by, <a href="https://yokoishioka.com" title="Yoko Ishioka Cloud Engineering Website">Yoko Ishioka</a> | | |
<a routerLink="privacy-policy" routerLinkActive="active" title="{{ name }}'s Privacy Policy">privacy policy</a> | |
</footer> |
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
<div class="social-media" [ngClass]="{'vertical':vertical}"> | |
<div *ngIf="facebook" class="social-media-icon"> | |
<a [href]="facebookLink + facebook.link" target="_blank" rel="noopener" title="view {{ facebook.user }} on facebook"><ces-svg-facebook></ces-svg-facebook></a> | |
</div> | |
<div *ngIf="twitter" class="social-media-icon"> | |
<a [href]="twitterLink + twitter.link" target="_blank" rel="noopener" title="view {{ twitter.user }} on twitter"><ces-svg-twitter></ces-svg-twitter></a> | |
</div> | |
<div *ngIf="linkedIn" class="social-media-icon"> | |
<a *ngIf="linkedIn.company; else altLinkedIn" [href]="linkedInLinkCompany + linkedIn.link" target="_blank" rel="noopener" title="view {{ linkedIn.user }} on twitter"><ces-svg-linkedin></ces-svg-linkedin></a> | |
<ng-template #altLinkedIn> |
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
import { Component, Input } from '@angular/core'; | |
import { SocialMedia } from './social-media'; | |
@Component({ | |
selector: 'ces-social-media', | |
templateUrl: './social-media.component.html', | |
styleUrls: ['./social-media.component.scss'] | |
}) | |
export class SocialMediaComponent { | |
@Input() facebook:SocialMedia; |
yokoishioka
/ button.component.html
Created
February 25, 2020 02:46
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
<button [ngClass]="class" [disabled]="disabled"> | |
<ng-content></ng-content> | |
<ces-svg *ngIf="icon" [type]="icon"></ces-svg> | |
<span *ngIf="label">{{ label }}</span> | |
</button> |
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
import { Component, Input, Renderer2, ElementRef, Output, EventEmitter } from '@angular/core'; | |
@Component({ | |
selector: 'ces-button-hide-parent', | |
templateUrl: './button-hide-parent.component.html', | |
styleUrls: ['./button-hide-parent.component.scss'] | |
}) | |
export class ButtonHideParentComponent { | |
@Input() showIcon: boolean; | |
@Input() label:string; |
yokoishioka
/ button-hide-parent.component.html
Last active
March 4, 2020 06:48
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
<ces-button type="button" class="no-border no-padding" (click)="onClose()"> | |
<span *ngIf="label" class="label">{{ label }}</span> | |
<img *ngIf="showIcon" src="/assets/svgs/button-close.png" alt="button that hides its parent"> | |
<ng-content></ng-content> | |
</ces-button> |
yokoishioka
/ button.component.ts
Created
March 4, 2020 06:41
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
import { Component, Input } from '@angular/core'; | |
@Component({ | |
selector: 'ces-button', | |
templateUrl: './button.component.html', | |
styleUrls: [ | |
'./button.component.scss' | |
] | |
}) |
yokoishioka
/ button.component.scss
Created
March 4, 2020 07:32
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
@import "src/assets/styles/variables.scss"; | |
button { | |
font-size: inherit; | |
background: inherit; | |
color: inherit; | |
text-align: center; | |
padding: 0.5em 1.0em; | |
border: 1px solid; | |
border-radius: $border-radius; |
yokoishioka
/ svg-astronaut.component.ts
Created
March 10, 2020 05:53
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
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'ces-svg-astronaut', | |
templateUrl: '../../../../../../src/assets/images/svgs/astronaut.svg', | |
styleUrls: ['../../svg.component.scss'] | |
}) | |
export class SvgAstronautComponent { | |
constructor() { } |
OlderNewer