Skip to content

Commit 508862d

Browse files
authored
Merge pull request #5 from byzocker-de/dev_v4
Merge Dev v4
2 parents b18d235 + 8af5eb6 commit 508862d

File tree

14 files changed

+3577
-8126
lines changed

14 files changed

+3577
-8126
lines changed

package-lock.json

Lines changed: 3109 additions & 8019 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13-
"@astrojs/sitemap": "^3.1.2",
14-
"astro": "^2.7.1",
15-
"astro-auto-import": "^0.4.4",
13+
"@astrojs/sitemap": "^3.7.1",
14+
"astro": "^6.0.4",
15+
"astro-auto-import": "^0.5.1",
1616
"astro-robots-txt": "^1.0.0",
17-
"dayjs": "^1.11.10",
18-
"reusify": "^1.0.4"
17+
"dayjs": "^1.11.20",
18+
"reusify": "^1.1.0"
1919
}
2020
}
Lines changed: 1 addition & 0 deletions
Loading

public/icons/gmail-light.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

public/icons/immich-light.svg

Lines changed: 1 addition & 0 deletions
Loading

public/icons/matrix-light.svg

Lines changed: 1 addition & 0 deletions
Loading

public/icons/nextcloud-light.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/LinkAction.astro

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
interface Props {
3+
href: string;
4+
src: string;
5+
alt?: string;
6+
label?: string;
7+
target?: string;
8+
rel?: string;
9+
}
10+
11+
const { href, src, alt = '', label = '', target = '_blank', rel = 'noopener noreferrer' } =
12+
Astro.props as Props;
13+
const isSvg = typeof src === 'string' && src.toLowerCase().endsWith('.svg');
14+
---
15+
16+
<a class="link-action" href={href} target={target} rel={rel}>
17+
{isSvg ? (
18+
<span
19+
class="link-action__svg"
20+
role="img"
21+
aria-label={alt}
22+
style={`--svg-url: url('${src}')`}>
23+
</span>
24+
) : (
25+
<img class="link-action__img" src={src} alt={alt} />
26+
)}
27+
{label && <span class="link-action__label">{label}</span>}
28+
</a>
29+
30+
<style>
31+
.link-action {
32+
display: flex;
33+
flex-direction: column;
34+
align-items: center;
35+
text-decoration: none;
36+
max-width: 100%;
37+
38+
/* background-color: red; */
39+
40+
}
41+
42+
.link-action__img {
43+
display: block;
44+
max-width: 4rem;
45+
height: auto;
46+
}
47+
48+
.link-action__svg{
49+
display: block;
50+
width: 4rem;
51+
height: 4rem;
52+
background-color: var(--logo-color, currentColor);
53+
-webkit-mask: var(--svg-url) no-repeat center/contain;
54+
mask: var(--svg-url) no-repeat center/contain;
55+
-webkit-mask-size: contain;
56+
mask-size: contain;
57+
-webkit-mask-repeat: no-repeat;
58+
mask-repeat: no-repeat;
59+
-webkit-mask-position: center;
60+
mask-position: center;
61+
}
62+
63+
.link-action__label {
64+
margin-top: 0.25rem;
65+
margin-bottom: 0rem;
66+
margin-left:0;
67+
margin-right:0;
68+
text-align: center;
69+
font-size: 1.5rem;
70+
color: inherit;
71+
}
72+
a{
73+
padding: 1rem;
74+
}
75+
</style>

src/components/LinkContainer.astro

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
interface Props {
3+
title?: string;
4+
isWider?: boolean;
5+
}
6+
7+
let cwidth;
8+
const { title, isWider} = Astro.props;
9+
10+
if (isWider == true){
11+
cwidth = '28rem';
12+
} else {
13+
cwidth = '20rem';
14+
}
15+
16+
17+
18+
let width = cwidth;
19+
20+
---
21+
22+
<div id="container" class="container" style={`width: ${width}`}>
23+
<h2 class="container-title">{title}</h2>
24+
<div class="container-slot"><slot /></div>
25+
</div>
26+
27+
<script define:vars={{width}}>
28+
// if (window.matchMedia("(max-width: 1200px)").matches) {
29+
// width = '20rem';
30+
// document.getElementById('container').style.width = width;
31+
// } else{
32+
// width = cwidth;
33+
// document.getElementById('container').style.width = width;
34+
// }
35+
</script>
36+
37+
38+
<style>
39+
40+
.container-title{
41+
padding-top: 1rem;
42+
padding-bottom: .5rem;
43+
padding-left: 1rem;
44+
padding-right: 1rem;
45+
font-size: 3rem;
46+
font-weight: 700;
47+
text-align: center;
48+
margin: 0 0 1rem 0;
49+
}
50+
.container-slot{
51+
text-align: center;
52+
flex: 1;
53+
display: flex;
54+
align-items: center;
55+
justify-content: center;
56+
}
57+
/* ensure slotted content (e.g. .fourlink-parent) centers vertically */
58+
.container-slot > * {
59+
align-self: center;
60+
}
61+
.container{
62+
/* background: rgba(var(--container-bg-color) / .5); */
63+
background: var(--container-bg-color);
64+
border-radius: 10px;
65+
border: 1px solid var(--container-border-color);
66+
display: flex;
67+
flex-direction: column;
68+
min-height: 10rem;
69+
max-width: 100%;
70+
padding: 1rem; /* move padding here so background fills cell */
71+
box-sizing: border-box;
72+
height: 100%; /* fill the grid cell */
73+
transition: border-color 0.3s;
74+
/* background-color: red; */
75+
}
76+
.container:hover{
77+
border: 1px solid var(--container-border-hover-color);
78+
transition: border-color 0.3s ease;
79+
/* background-color: red; */
80+
}
81+
82+
@media (max-width: 1200px){
83+
.container{
84+
max-width: 20rem;
85+
}
86+
}
87+
</style>

0 commit comments

Comments
 (0)