Move files and add minor fixes
This commit is contained in:
parent
6fbc15c402
commit
51c8d06569
16 changed files with 89 additions and 105 deletions
23
src/page/image-button/image-button.html.ts
Normal file
23
src/page/image-button/image-button.html.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { url } from '../../types/url';
|
||||
import './image-button.scss';
|
||||
|
||||
export const ImageButtonFactory =
|
||||
(
|
||||
svg: string,
|
||||
title: string,
|
||||
{ shouldDownload = false }: { shouldDownload?: boolean } = {}
|
||||
) =>
|
||||
(href: url) =>
|
||||
`
|
||||
<a class="image-button"
|
||||
href="${href}"
|
||||
rel="noopener"
|
||||
target="_blank"
|
||||
${shouldDownload ? 'download' : ''}
|
||||
>
|
||||
<div class="svg-container">
|
||||
${svg}
|
||||
</div>
|
||||
<p>${title}</p>
|
||||
</a>
|
||||
`;
|
||||
23
src/page/image-button/image-button.scss
Normal file
23
src/page/image-button/image-button.scss
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
@use '../../style/mixins' as *;
|
||||
|
||||
.image-button {
|
||||
@include image-button(var(--icon-size));
|
||||
|
||||
> .svg-container {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
@include square(var(--icon-size));
|
||||
|
||||
> svg {
|
||||
transition: stroke var(--transition-time), transform var(--transition-time);
|
||||
}
|
||||
}
|
||||
|
||||
> p {
|
||||
padding-bottom: var(--small-margin);
|
||||
font-size: 0.9rem;
|
||||
font-style: italic;
|
||||
padding: 0 8px 8px 8px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue