blob: eae9cc0005c7062312e26003ffe5a4a2b6c0df71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
---
interface Props {
header?: string;
footer?: string;
margin?: string;
}
const { header = "", footer = "", margin = "-0.1vw" } = Astro.props;
---
<div class="section" style={`margin: ${margin};`}>
<span class="tag-top">{header}</span>
<span class="tag-bottom">{footer}</span>
<slot />
</div>
<style>
.section {
position: relative;
padding: 1vw;
padding-top: 1.0625vw;
display: flex;
border-style: solid;
border-width: 0.1vw;
border-color: var(--alt);
}
.tag-top {
position: absolute;
top: -0.75vw;
left: 0.625vw;
background-color: var(--background);
padding-right: 0.625vw;
padding-left: 0.625vw;
font-size: 1vw;
color: var(--alt);
}
.tag-bottom {
position: absolute;
bottom: -0.75vw;
left: 0.625vw;
background-color: var(--background);
padding-right: 0.625vw;
padding-left: 0.625vw;
font-size: 1vw;
color: var(--alt);
}
</style>
|