summaryrefslogtreecommitdiff
path: root/assets/css/components/_shortcodes.scss
blob: 52de09997d97ca95a56a581c0080cf0ca57eb254 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/* callouts */

.callout {
  background-color: rgba(var(--block-background-color-rgb), 0.5);
  border-radius: .25rem;
  padding: 1rem 1.25rem;
  line-height: 1.75;

  display: flex;
  gap: .75rem;

  margin: 0.5rem 0;
}

.callout .callout-content p {
  margin: 0;
}

/* quote shortcode */

.quote-card {
  --card-bg: rgba(255,255,255,0.25);
  --card-bg-lighter: rgba(255,255,255,0.1);
  --card-noise: rgba(255,255,255,0.04);

  font-size: 1.5rem;
  font-style: italic;
  text-align: center;
  margin: 5rem 3rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;
  transform: rotate(3deg);
  background-color: rgba(255,255,255,0.35);

  background: linear-gradient(var(--card-bg-lighter), var(--card-bg-lighter)),
    repeating-radial-gradient(var(--card-bg) 0 0.0001%, var(--card-noise) 0 0.0002%) 50% 0 / 2500px 2500px,
    repeating-conic-gradient(var(--card-bg) 0 0.0001%, var(--card-noise) 0 0.0002%) 60% 60% / 2500px 2500px;
  background-blend-mode: normal, difference;
}

@media screen and (max-width: 768px) {
  .quote-card {
    font-size: 1.2rem;
    margin: 3rem 1rem;
  }
}

/* book showcase shortcode */

.book-showcase {
    display: flex;
    gap: 2rem;
    line-height: 1.5;
    margin: 2rem 0
}

.book-showcase .book-cover {
    width: 25%;
    flex-shrink: 0;
}

.book-description-header .book-title {
    margin: 0
}

.book-description-header p {
    font-size: 1rem;
    margin: 0.1rem
}

/* gallery shortcode */

.gallery {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1rem;
  white-space: nowrap;

  & > figure {
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
    img {
      height: 20rem;
      object-fit: cover;
      display: block;
      border-radius: 4px;
    }
  }
  & > p { display: none }

  &.center {
      justify-content: center;
  }
  &.full-width {
      & > figure {
          flex-shrink: unset;
          img {
              width: 100%;
          }
      }
  }
}

/* sidenote shortcode */

@media screen and (max-width: 1199px) {
    .sidenote {
        border: 1px solid var(--block-background-color);
        padding: .75rem 1rem;
        border-radius: 0.5rem;
        line-height: 1.5;
    }
    .sidenote-title {
        font-size: 1rem;
        text-align: right;
        font-style: italic
    }
}

@media screen and (min-width: 1200px) {
    .sidenote {
        position: absolute;
        left: calc(50% + var(--page-width) / 2);
        margin-left: 2rem;
        max-width: 20rem
    }
}

.sidenote-title {
    margin: 0.5rem 0
}

.sidenote-content {
    font-size: 1rem
}