Skip to content

Commit 9c52d0a

Browse files
committed
feat: author cards.
1 parent 7a9a214 commit 9c52d0a

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

public/stories/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ The `books.piml` file is a PIML document that, when parsed, results in an object
3636
```piml
3737
(authors)
3838
> (author)
39-
(name) fezcode
39+
(name) Samil
40+
(alias) fezcode
4041
(website) https://fezcode.com
42+
(image) https://avatars.githubusercontent.com/u/49845895?v=4
43+
> (author)
44+
(name) Sabri
45+
(alias) TheLastRoadRunner
46+
(website) https://github.com/TheLastRoadRunner
47+
(image) https://avatars.githubusercontent.com/u/99679216?v=4
48+
# more authors.
4149
4250
(books)
4351
> (book)
@@ -72,7 +80,9 @@ The `books.piml` file is a PIML document that, when parsed, results in an object
7280
### Author Object Properties:
7381

7482
* `name` (String): The name of the author.
83+
* `alias` (String): A unique alias for the author, used to link episodes to this author.
7584
* `website` (String, Optional): The website or URL associated with the author.
85+
* `image` (String): A URL to the author's profile picture.
7686

7787
### Book Object Properties:
7888

@@ -86,7 +96,7 @@ The `books.piml` file is a PIML document that, when parsed, results in an object
8696
* `id` (Number): A unique identifier for the episode within its book.
8797
* `filename` (String): The relative path to the plain text file containing the episode's content. This path is relative to the `public/stories/` directory (e.g., `book-one/episode1.txt`).
8898
* `title` (String): The title of the episode.
89-
* `author` (String): The author of the episode.
99+
* `author` (String): The alias of the author of the episode, matching an `alias` in the `authors` section.
90100
* `date` (String): The original release date of the episode.
91101
* `updated` (String): The last update date of the episode.
92102

src/styles/dnd.css

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
text-align: center;
1818
background-size: cover;
1919
background-position: center;
20+
background-attachment: fixed; /* Keep it fixed relative to viewport */
2021
position: relative;
2122
}
2223

@@ -232,7 +233,7 @@
232233

233234
.dnd-card h3 {
234235
font-family: 'Grenze Gotisch', cursive;
235-
font-size: 2rem;
236+
font-size: 2.5rem;
236237
color: #ff9d7e;
237238
margin-bottom: 1rem;
238239
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
@@ -250,7 +251,7 @@
250251

251252
.dnd-author-card {
252253
background-color: rgba(50, 30, 30, 0.7); /* Similar to about card */
253-
padding: 1.5rem;
254+
padding: 2.5rem 1.5rem;
254255
width: 350px; /* Fixed width for consistency with dnd-card */
255256
border: 1px solid rgba(255, 255, 255, 0.1);
256257
border-radius: 8px;
@@ -266,6 +267,28 @@
266267
gap: 0.5rem;
267268
}
268269

270+
.dnd-author-card::before,
271+
.dnd-author-card::after {
272+
content: '';
273+
position: absolute;
274+
left: 0;
275+
right: 0;
276+
height: 30px; /* Adjusted height for author card */
277+
background-image: url('../../public/images/stories/border.jpg');
278+
background-size: cover;
279+
background-position: center;
280+
opacity: 0.3;
281+
z-index: 0;
282+
}
283+
284+
.dnd-author-card::before {
285+
top: 0px;
286+
}
287+
288+
.dnd-author-card::after {
289+
bottom: 0px;
290+
}
291+
269292
.dnd-author-image {
270293
width: 100px;
271294
height: 100px;

0 commit comments

Comments
 (0)