summaryrefslogtreecommitdiff
path: root/assets/css/components/_post.scss
blob: 4c05841a6a4cc0a468f6ff128403c6b4657192fd (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
140
141
142
143

/* post */

.post-header {
  margin-bottom: 2rem;

  .post-title {
    font-size: 2rem;
    font-weight: 900;
    filter: url(#x);
  }

  .post-subtitle {
    display: block;
    color: var(--secondary-text-color);
    font-style: italic;
    font-size: 1.2rem;
  }
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;

    .post-date, .post-tag {
      color: var(--secondary-text-color)
    }

    .post-category {
        @include postCategoryPill;
    }
}

.page-content {
  min-height: 60%;
}

.post-content {
  margin-bottom: 50px;
  line-height: 2
}

#post-page-header {
    margin: 0 auto;
    margin-bottom: 2rem;
    max-width: var(--page-width);

    .title-image {
        width: 10rem;
    }
}

#post-page-header.with-banner {
    .title-image-container {
        @include roundSticker;
        transform: rotate(7deg);

        position: absolute;
        z-index: 5;
        right: 0.25rem;
        top: 0.25rem;
        width: 3rem;
        padding: 0.5rem;

        @media screen and (min-width: 640px) {
            right: 0.5rem;
            top: 0.5rem;
            width: 4rem;
            padding: 1rem;
        }

        @media screen and (min-width: 768px) {
            width: 6rem;
            left: calc(50vw + var(--page-width) / 2 - 7rem);
            top: calc(var(--page-margin-y) - 2rem);
        }

        @media screen and (min-width: 768px) {
            width: 6rem;
            left: calc(50vw + var(--page-width) / 2 - 7rem);
            top: calc(var(--page-margin-y) - 2rem);
        }

        @media screen and (min-width: 1200px) {
            width: 8rem;
            left: calc(50vw + var(--page-width) / 2 - 5rem);
        }

        .title-image {
            width: 100%;
        }
    }
}

/* related posts */

.related-posts {
    .related-posts-list {
        padding-inline-start: 0;
        .related-posts-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            .related-post-subtitle {
                color: var(--secondary-text-color);
            }
            .related-post-reading-time {
                font-family: var(--mono-font-family);
                color: var(--secondary-text-color);
                font-size: 0.9rem;
            }
        }
    }
}

.post-bottom-navigation {
    ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        li {
            &:not(:nth-child(2)) {
                width: 37.5%;
            }
            &:nth-child(3) {
                text-align: right;
            }
            a {
                color: var(--secondary-text-color);
                text-decoration: none;
                &:hover {
                    color: var(--primary-color);
                }
            }
        }
    }
}