Skip to content

Commit

Permalink
feat: styles
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhanio committed Nov 15, 2024
1 parent 4a730e9 commit 615d1e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion resume/resume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ projects:
- Typst
- GitHub Actions
highlights:
- Uses Typst to generate this very resume automaticaly and serve it as a static asset
- Uses Typst to generate this very resume automatically and serve it as a static asset
- Parses markdown blog posts and renders them as HTML
- Uses tree-sitter to provide powerful IDE-like syntax highlighting for blog posts
- Implements industry-standard testing and continuous integration using GitHub Actions
Expand Down
2 changes: 1 addition & 1 deletion src/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub async fn post(
doc: DocumentParts,
Path(slug): Path<String>,
) -> SiteResult<Document<impl Renderable>> {
let post = Post::get(&slug).ok_or_else(|| SiteError::PostNotFound(slug))?;
let post = Post::get(&slug).ok_or(SiteError::PostNotFound(slug))?;

Ok(doc.build(
post.title,
Expand Down
6 changes: 3 additions & 3 deletions src/static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async fn og_image() -> SiteResult<(TypedHeader<ContentType>, &'static [u8])> {
async fn post_og_image(
Path(slug): Path<String>,
) -> SiteResult<(TypedHeader<ContentType>, &'static [u8])> {
let post = Post::get(&slug).ok_or_else(|| SiteError::PostNotFound(slug))?;
let post = Post::get(&slug).ok_or(SiteError::PostNotFound(slug))?;

Ok((TypedHeader(ContentType::from(mime::IMAGE_PNG)), post.image))
}
Expand All @@ -79,14 +79,14 @@ include!(concat!(env!("OUT_DIR"), "/assets.rs"));
async fn assets(
Path(asset): Path<String>,
) -> SiteResult<(TypedHeader<ContentType>, &'static [u8])> {
assets::get(&asset).ok_or_else(|| SiteError::AssetNotFound(asset))
assets::get(&asset).ok_or(SiteError::AssetNotFound(asset))
}

include!(concat!(env!("OUT_DIR"), "/fonts.rs"));

#[instrument(level = "trace")]
async fn fonts(Path(font): Path<String>) -> SiteResult<(TypedHeader<ContentType>, &'static [u8])> {
fonts::get(&font).ok_or_else(|| SiteError::PostNotFound(font))
fonts::get(&font).ok_or(SiteError::PostNotFound(font))
}

#[instrument(level = "debug")]
Expand Down
6 changes: 3 additions & 3 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
/* general */

:root {
--color: #101010;
--background-color: #f0f0f0;
--color: #402000;
--background-color: #fff0f8;
}

@media (prefers-color-scheme: dark) {
Expand Down Expand Up @@ -130,7 +130,7 @@ a.box:hover {

:root {
--code-color: #303030;
--code-background-color: #e8e8e8;
--code-background-color: #f8e8f0;

--code-gray: #808080;
--code-red: #d8031a;
Expand Down

0 comments on commit 615d1e8

Please sign in to comment.