Skip to content

Commit a60461c

Browse files
authored
Merge pull request #9 from thedevdavid/release/0.3.1
chore: bumped version to 0.3.1
2 parents 0bbe947 + a0ba0c1 commit a60461c

File tree

8 files changed

+253
-26
lines changed

8 files changed

+253
-26
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
@thedevdavid.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
128+
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ If you love this template and/or use it, please give it a star on GitHub. This w
3232
- [Image optimization](#image-optimization)
3333
- [Examples](#examples)
3434
- [Features & Roadmap](#features--roadmap)
35+
- [Inspiration & Mentions](#inspiration--mentions)
36+
- [Support](#support)
3537

3638
## Motivation
3739

@@ -41,7 +43,7 @@ So I decided to build a solution that I would use myself. This is the result.
4143

4244
## Getting Started
4345

44-
Here's a [link to a website customizing commit](https://github.com/thedevdavid/website-2023/commit/fb10942d424a1389f9c4c1605849e45ff718656d) with all the changes.
46+
If you want to see how I set up this template for my own digital garden, you can check out [this commit](https://github.com/thedevdavid/website-2023/commit/fb10942d424a1389f9c4c1605849e45ff718656d) with all the changes.
4547

4648
1. Use the repo as a template
4749
2. Install dependencies with `pnpm install`
@@ -112,6 +114,8 @@ You can choose between 3 different hero variants to use in `app/(site)/page.tsx`
112114

113115
Optimize images in seconds for free with ImageOptim. Install on your Mac, then open the `public` folder in Finder. Select all images, right-click, and choose "Open with > ImageOptim". This will optimize all images in the folder.
114116

117+
Note: DO NOT overdo it. You can easily make images look bad with lossy compression algorithms.
118+
115119
## Examples
116120

117121
- [https://davidlevai.com/](https://davidlevai.com/)
@@ -137,25 +141,29 @@ Create a PR and add your digital garden to this list if you're using the templat
137141
- [x] projects page
138142
- [x] about section on homepage
139143
- [x] search & command bar
140-
- [x] Vercel analytics (fathom, simplelytics, vercel)
144+
- [x] Vercel analytics
141145
- [ ] Design improvements (whitespace, layout, etc.)
146+
- [ ] 404, error, and loading pages
147+
- [ ] Code preview component
148+
- [ ] Code highlight improvements (copy code, theme)
142149
- [ ] `manifest.json`
143-
- [ ] newsletter integration
150+
- [ ] newsletter integration (form, api route, keys, welcome page, previous issues)
144151
- [ ] Post series
145152
- [ ] Hidden content (behind email subscription)
146153
- [ ] 100 lighthouse score
147154
- [ ] Command bar fuzzy search in content
148155
- [ ] Pagination
149156
- [ ] SEO improvements
150157
- [ ] Accessibility audit
151-
- [ ] Other analytics providers (fathom, simplelytics, etc.)
158+
- [ ] Other analytics providers (fathom, simplelytics, plausible, umami, etc)
152159
- [ ] TypeScript fixes
153160
- [ ] Redesign uses page
154161
- [ ] Redesign projects page
155162
- [ ] general refactor
156163
- [ ] general cleanup
157164
- [ ] implement content security policies
158165
- [ ] implement a videoask-like solution for the hero section
166+
- [ ] multi-author support (?)
159167
- [ ] Post like counter (?)
160168
- [ ] Visitor counter (?)
161169
- [ ] code playground instead of code highlighting (?)

app/globals.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
--secondary-foreground: 222.2 47.4% 11.2%;
3232

3333
--accent: 210 40% 96.1%;
34-
--accent-foreground: 137, 49%, 29%;
34+
--accent-foreground: 223 94% 66%;
3535

3636
--destructive: 0 100% 50%;
3737
--destructive-foreground: 210 40% 98%;
@@ -64,7 +64,7 @@
6464
--secondary-foreground: 210 40% 98%;
6565

6666
--accent: 216 34% 17%;
67-
--accent-foreground: 210 40% 98%;
67+
--accent-foreground: 223 94% 66%;
6868

6969
--destructive: 0 63% 31%;
7070
--destructive-foreground: 210 40% 98%;

components/mobile-nav.tsx

+24-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import * as React from "react";
44
import Link from "next/link";
5-
import { useRouter } from "next/navigation";
5+
import { usePathname, useRouter } from "next/navigation";
66
import { MobileLinkProps } from "@/types";
77
import { Menu } from "lucide-react";
88

@@ -57,15 +57,35 @@ export function MobileNav() {
5757
}
5858

5959
function MobileLink({ href, onOpenChange, className, children, ...props }: MobileLinkProps) {
60-
const router = useRouter();
60+
const pathname = usePathname();
61+
if (href.toString().startsWith("http")) {
62+
return (
63+
<a
64+
href={href.toString()}
65+
onClick={() => {
66+
onOpenChange?.(false);
67+
}}
68+
target="_blank"
69+
rel="noopener noreferrer"
70+
className={cn(className)}
71+
{...props}
72+
>
73+
{children}
74+
</a>
75+
);
76+
}
6177
return (
6278
<Link
6379
href={href}
6480
onClick={() => {
65-
router.push(href.toString());
6681
onOpenChange?.(false);
6782
}}
68-
className={cn(className)}
83+
className={cn(
84+
className,
85+
href.toString() !== "/" &&
86+
pathname.substring(2).startsWith(href.toString().substring(2)) &&
87+
"font-semibold text-accent-foreground"
88+
)}
6989
{...props}
7090
>
7191
{children}

0 commit comments

Comments
 (0)