Compare commits

..

14 Commits

Author SHA1 Message Date
inpharmaticist 9d73faa362 Update nostr.json
fix formatting
2024-12-10 14:12:18 -08:00
inpharmaticist ccfc2555b4 Update nostr.json
Add carson
2024-12-10 14:08:19 -08:00
inpharmaticist 051c9b4cbd Update nostr.json 2024-12-09 21:44:50 -08:00
inpharmaticist fece8a2932 Create _config.yml 2024-12-09 21:42:54 -08:00
inpharmaticist 12cd5c75d6 Create nostr.json 2024-12-09 21:40:24 -08:00
inpharmaticist 8de9075000 Update index.html 2024-12-09 08:24:39 -08:00
inpharmaticist d8722efe9b Update index.html 2024-12-09 08:06:29 -08:00
inpharmaticist 832913f103 Update index.html 2024-12-09 07:14:36 -08:00
inpharmaticist f612e5cb4c Update index.html
fix links
2024-12-08 15:01:46 -08:00
inpharmaticist f945ef647a Update index.html
Links
2024-12-08 15:00:33 -08:00
inpharmaticist 043c69c5e6 Update index.html
Under construction
2024-12-08 14:58:04 -08:00
inpharmaticist e3ed0f89c1 Create CNAME 2024-12-08 14:47:52 -08:00
inpharmaticist 941a3fc618 First 2021-03-14 15:51:51 -07:00
inpharmaticist a669c4ee47 first commit 2021-03-14 15:50:49 -07:00
29 changed files with 9 additions and 782 deletions
-21
View File
@@ -1,21 +0,0 @@
{
"image": "mcr.microsoft.com/devcontainers/go:1",
"features": {
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "0.132.2"
},
"ghcr.io/devcontainers/features/node:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"mhutchie.git-graph",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"budparr.language-hugo-vscode"
]
}
},
"forwardPorts": [1313]
}
-76
View File
@@ -1,76 +0,0 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.132.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for .GitInfo and .Lastmod
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Setup Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc --minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
-7
View File
@@ -1,7 +0,0 @@
# Hugo output
public/
resources/
.hugo_build.lock
# Editor
.vscode/
-15
View File
@@ -1,15 +0,0 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
tasks:
- name: Install Hugo
before: brew install hugo
init: echo "Your version of Hugo is `hugo version`" && hugo mod tidy
command: hugo server -D -F --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender
ports:
- port: 1313
onOpen: open-preview
-12
View File
@@ -1,12 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"mhutchie.git-graph",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"budparr.language-hugo-vscode"
]
}
+5
View File
@@ -0,0 +1,5 @@
{"names": {
"corey":"c3c7122c63af5281fee3b9338d10ae65b166ffe6f73f1c272c5c1120607731d7"
,"carson":"062e8e022b58cd318eda00ae3b4ef7b790c3b209fad6ba97258613df0aadeb45"
}
}
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Xin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+1 -83
View File
@@ -1,83 +1 @@
# Hextra Starter Template
[![Deploy Hugo site to Pages](https://github.com/imfing/hextra-starter-template/actions/workflows/pages.yaml/badge.svg)](https://github.com/imfing/hextra-starter-template/actions/workflows/pages.yaml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6e83fd88-5ffe-4808-9689-c0f3b100bfe3/deploy-status)](https://app.netlify.com/sites/hextra-starter-template/deploys)
![Vercel Deployment Status](https://img.shields.io/github/deployments/imfing/hextra-starter-template/production?logo=vercel&logoColor=white&label=vercel&labelColor=black&link=https%3A%2F%2Fhextra-starter-template.vercel.app%2F)
🐣 Minimal template for getting started with [Hextra](https://github.com/imfing/hextra)
![hextra-template](https://github.com/imfing/hextra-starter-template/assets/5097752/c403b9a9-a76c-47a6-8466-513d772ef0b7)
[🌐 Demo ↗](https://imfing.github.io/hextra-starter-template/)
## Quick Start
Use this template to create your own repository:
<img src="https://docs.github.com/assets/cb-77734/mw-1440/images/help/repository/use-this-template-button.webp" width=400 />
You can also quickly start developing using the following online development environment:
- [GitHub Codespaces](https://github.com/codespaces)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/imfing/hextra-starter-template)
Create a new codespace and follow the [Local Development](#local-development) to launch the preview
- [Gitpod](https://gitpod.io)
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/imfing/hextra-starter-template)
## Deployment
### GitHub Pages
A GitHub Actions workflow is provided in [`.github/workflows/pages.yaml`](./.github/workflows/pages.yaml) to [publish to GitHub Pages](https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/) for free.
For details, see [Publishing with a custom GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).
Note: in the settings, make sure to set the Pages deployment source to **GitHub Actions**:
<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/99676430-884e-42ab-b901-f6534a0d6eee" width=600 />
[Run the workflow manually](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow) if it's not triggered automatically.
### Netlify
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/imfing/hextra-starter-template)
### Vercel
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fimfing%2Fhextra-starter-template&env=HUGO_VERSION)
Override the configuration:
<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/e2e3cecd-c884-47ec-b064-14f896fee08d" width=600 />
## Local Development
Pre-requisites: [Hugo](https://gohugo.io/getting-started/installing/), [Go](https://golang.org/doc/install) and [Git](https://git-scm.com)
```shell
# Clone the repo
git clone https://github.com/imfing/hextra-starter-template.git
# Change directory
cd hextra-starter-template
# Start the server
hugo mod tidy
hugo server --logLevel debug --disableFastRender -p 1313
```
### Update theme
```shell
hugo mod get -u
hugo mod tidy
```
See [Update modules](https://gohugo.io/hugo-modules/use-modules/#update-modules) for more details.
# inpharmaticist.github.io
-61
View File
@@ -1,61 +0,0 @@
---
title: San Diego Bitcoiners
layout: hextra-home
---
<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-headline >}}
A meet up group
{{< /hextra/hero-headline >}}
</div>
<div class="hx-mb-12">
{{< hextra/hero-subtitle >}}
For beginners and veterans alike.
{{< /hextra/hero-subtitle >}}
</div>
<div class="hx-mb-6">
{{< hextra/hero-button text="Learn more" link="about" >}}
</div>
<div class="hx-mt-6"></div>
{{< hextra/feature-grid >}}
{{< hextra/feature-card
link="about"
icon="users"
title="Community"
subtitle="Learn more about our group."
>}}
{{< hextra/feature-card
link="about/support"
icon="support"
title="Support"
subtitle="Have a question or issue? Get help from someone with experience."
>}}
{{< hextra/feature-card
link="about/events"
icon="calendar"
title="RSVP"
subtitle="View our calendar of events and let us know you're coming."
>}}
{{< hextra/feature-card
link="about/blog"
icon="rss"
title="Blog"
subtitle="Sometimes we post about current events."
>}}
{{< hextra/feature-card
link="about/chat"
icon="support"
title="Group Chat"
subtitle="Between meetups, the chatter is on Signal."
>}}
{{< hextra/feature-card
link="about/contact"
icon="phone"
title="Contact Our Host"
subtitle="Reach out privately."
>}}
{{< /hextra/feature-grid >}}
-14
View File
@@ -1,14 +0,0 @@
---
title: About
toc: false
cascade:
type: docs
next: three_stages
weight: 1
breadcrumbs: false
---
> Bitcoin is different things to different people. <br />
> — Jameson Lopp
Whatever Bitcoin is to you and wherever you are in your Bitcoin journey, the San Diego Bitcoiners are here for you! Born out of the Covid pandemic at a time when Bitcoiners needed to get back to rubbing elbows, this meetup set out to serve as a means to gather folks who were interested in talking and learning about Bitcoin, and _only_ Bitcoin! We currently meet the second Thursday of the month at [Quantum Brewing](https://www.quantumbrewingsd.com/) in Kearny Mesa. We have guest presentations, short demos, and sometimes just hang out and chat with each other.
-12
View File
@@ -1,12 +0,0 @@
---
title: Blog
toc: false
cascade:
type: docs
previous: events
next: chat
weight: 7
breadcrumbs: false
---
Check out our [blog](https://blog.sdbitcoiners.com) where we post event updates and musings on Bitcoin news.
-11
View File
@@ -1,11 +0,0 @@
---
title: Chat
toc: false
cascade:
type: docs
previous: blog
next: friends
weight: 8
breadcrumbs: false
---
We are a part of a [Signal](https://signal.org/) group chat with other local Bitcoin groups. To prevent scammers and bots, we prefer to add people in person. So come to an event and we'll get connected!
-14
View File
@@ -1,14 +0,0 @@
---
title: Contact
toc: false
cascade:
type: docs
previous: support
next: events
weight: 5
breadcrumbs: false
---
Send me a message via Nostr:
{{< nostr-contact npub="npub1youractualkeyhere" >}}
-22
View File
@@ -1,22 +0,0 @@
---
title: Events
toc: false
cascade:
type: docs
previous: contact
next: blog
weight: 6
breadcrumbs: false
---
You can RSVP to our events on [Luma](https://lu.ma/sdbitcoiners)
<iframe
src="https://lu.ma/embed/calendar/cal-EnwhVshZlVjIky1/events"
width="600"
height="450"
frameborder="0"
style="border: 1px solid #bfcbda88; border-radius: 4px;"
allowfullscreen=""
aria-hidden="false"
tabindex="0"
></iframe>
-13
View File
@@ -1,13 +0,0 @@
---
title: Our Friends
toc: false
weight: 9
prev: chat
breadcrumbs: false
---
There are several other Bitcoin meetup groups we are friendly with. Check them out too!
* [Encinitas](https://lu.ma/calendar/cal-3zDGZ6vPHuIqgAO)
* [Escondido](https://lu.ma/calendar/cal-7fsYTR7N4Yfc6Ed)
* Pacific Beach ([Signal group](https://signal.group/#CjQKIJ-FUG7-EWFyFYGLTYAOQlPy3G5y8BPPprtdCP_FPGmyEhDNDsODsn2Hc50lCkHqduQy))
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

-52
View File
@@ -1,52 +0,0 @@
---
title: Support
toc: false
cascade:
type: docs
previous: three_stages
next: contact
weight: 4
breadcrumbs: false
---
|⚠️ Warning|
|-|
|Don't share your seed phrase (aka 12-24 word wallet backup) with anyone you don't want taking your funds.|
Most bitcoiners need _some_ help with or want to learn more about buying, storing, or using Bitcoin. There's often one tool they just haven't had the time to research or try on their own. Or maybe they don't have the confidence to put that feature into practice. There are a multitude of resources on these topics, sharing reliable tools and best practices (such as [bitcoin.page](bitcoin.page), [bitcoiner.guide](bitcoiner.guide), and [BTC Session's](https://www.youtube.com/c/btcsessions) videos), but it could take 100s of hours to find, consume, and understand the info specific to your needs.
Save yourself many hours and potentially a lot of frustration by speaking with someone experienced with self-custody and who understands the trade-offs of the tools available.
<center>
<img src="https://raw.githubusercontent.com/inpharmaticist/beta/refs/heads/main/content/about/headshot.jpeg" alt="Corey" width="200"/>
</center>
My name is Corey (aka Corey San Diego on [X](twitter.com/inpharmaticist) and [Nostr](https://primal.net/p/npub1c0r3ytrr4afgrlhrhyec6y9wvkckdllx7ul3cfevtsgjqcrhx8tsdzqs7w)). I have been the host of the San Diego Bitcoiners meetup since 2021, and a bitcoin enthusiast since 2017. I have spent countless hours reading about, listening to, and experimenting with resources in the space.
I specialize in
1. Mitigating single points of failure
2. Reducing trust
3. Improving privacy
4. Implementing redundancies
5. Executing a maintenance plan
6. Inheritance planning.
I'm here to share what I've learned with you. Cut through the noise and get started today with a better Bitcoin setup. Are you:
* New to Bitcoin?
* Less than 100% confident in your wallet setup?
* Struggling with a new tool?
If you answer _yes_ to any of the questions above, you might benefit from hands-on support from an experienced Bitcoin enthusiast. Reach out for a free consultation. After that, if we identify areas of improvement I will propose recommended changes and walk you through execution.
### Testimonials
{{< hextra/feature-grid >}}
{{< hextra/feature-card
subtitle="I've had the pleasure of working with Corey in the Bitcoin space, and I'm blown away by his expertise and enthusiasm. He took the time to understand my needs, clearly explained tradeoffs, and provided reliable sources to back up his guidance. What's more, he's incredibly responsive and always willing to lend a hand when needed. Corey's passion for Bitcoin is infectious, and his dedication to helping others is unparalleled. If you're looking for a knowledgeable and supportive consultant, Corey is your guy! -K"
>}}
{{< hextra/feature-card
subtitle="Stepping into Bitcoin ownership was terrifying to me in many ways, though I was committed. As my balance grew, so did the risk. I fully understood the responsibility of self-custody. When I met Corey, I was already \"pretty good\". I knew technology, ran my own node, had multi-signature wallets, etc. I was very pleased to gain great insights (and validation) that I was on the right track. Corey highlighted some things that I hadn't considered and expanded my scope of concern. This has greatly improved my comfort level. I continue to benefit from Corey's insights and his immense intellectual curiosity. If you haven't had a conversation with Corey yet - please do! It will likely be the beginning of a highly beneficial relationship. -Dan C"
>}}
{{< hextra/feature-card
subtitle="Corey - the Super Hero of Crypto! Seriously, that's what I thought when I met him - he not only understands and uses cryptocurrency himself, but is also helping other people get excited about it. Corey has been an amazing resource - he patiently answers my questions and has provided invaluable guidance in navigating this new digital frontier. -Tori"
>}}
{{< /hextra/feature-grid >}}
-18
View File
@@ -1,18 +0,0 @@
---
title: Three Stages
toc: false
cascade:
type: docs
prev: about
next: support
weight: 2
breadcrumbs: false
---
[Sparrow Wallet](https://sparrowwallet.com/) (our favorite desktop wallet) is a great resource for self-custodying your bitcoin in a secure and private way for new and seasoned bitcoiners. Their [Best Practices](https://sparrowwallet.com/docs/best-practices.html) section describes three general stages based on the value of your Bitcoin savings:
<center>
<img src="https://raw.githubusercontent.com/inpharmaticist/beta/refs/heads/main/content/about/stages.jpeg" alt="Stages" width="500"/>
</center>
Which stage are you in? Are you ready to optimize or graduate to the next one and need help?
-1
View File
@@ -1 +0,0 @@
-5
View File
@@ -1,5 +0,0 @@
module github.com/imfing/hextra-starter-template
go 1.21
require github.com/imfing/hextra v0.8.6 // indirect
-2
View File
@@ -1,2 +0,0 @@
github.com/imfing/hextra v0.8.6 h1:fpOqzcUs26Lc/ZzowYSBcnpe00d/aZw4HhiHP7ycSks=
github.com/imfing/hextra v0.8.6/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI=
-45
View File
@@ -1,45 +0,0 @@
# Hugo configuration file
title: San Diego Bitcoiners
# import hextra as module
module:
imports:
- path: github.com/imfing/hextra
markup:
# allow raw html
goldmark:
renderer:
unsafe: true
# enable hextra syntax highlight
highlight:
noClasses: false
menu:
main:
- name: Contact ↗
url: "https://formstr.app/f/naddr1qvzqqqr4mqpzpafdewsuthj5k8sfre227a6hyn008meuk2jpdg0gl6ltfp809cpfqy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qghwaehxw309aex2mrp0yh8qunfd4skctnwv46z7qgdwaehxw309ahx7uewd3hkcqg7waehxw309aex2mrp0yhxummnw3ezuamfwfjkgmn9wshx5up0qyw8wumn8ghj7mn0wd68ytfsxyh8jcttd95x7mnwv5hxxmmdqyv8wumn8ghj7un9d3shjtnndehhyapwwdhkx6tpdsq3vamnwvaz7tmjv4kxz7fwdehhxarj9e3xzmnyqyghwumn8ghj7mn0wd68yv339e3k7mgqqcc9yapctyuqa0w6ey?viewKey=c709e0eefda9d435fe65e06dbc2a185fb960133bce208301d0772004f822c216"
weight: 1
- name: Twitter
weight: 2
url: "https://twitter.com/sdbitcoiners"
params:
icon: x-twitter
- name: Nostr
weight: 3
url: "https://primal.net/p/npub1c0r3ytrr4afgrlhrhyec6y9wvkckdllx7ul3cfevtsgjqcrhx8tsdzqs7w"
params:
icon: user-add
params:
navbar:
displayTitle: true
displayLogo: false
footer:
displayCopyright: false
displayPoweredBy: true
page:
width: normal
+3
View File
@@ -0,0 +1,3 @@
Under construction. Please visit our <a href="https://blog.sdbitcoiners.com">blog</a> or our <a href="https://lu.ma/sdbitcoiners">event page</a>.
<br />
<iframe src="https://formstr.app/#/embedded/11ef7eff801eed502bfe671bbc61e9a806aefbaa9fb7f6ee72cdb329200aa936?hideTitleImage=true&hideDescription=true" height="700px" width="480px" frameborder="0" style="border-style:none;box-shadow:0px 0px 2px 2px rgba(0,0,0,0.2);" cellspacing="0" ></iframe>
-256
View File
@@ -1,256 +0,0 @@
<div class="nostr-contact-wrapper not-prose">
<style>
.nostr-contact-wrapper {
max-width: 600px;
margin: 2rem 0;
font-family: inherit;
color: #000;
}
.nostr-contact-wrapper .form-group {
margin-bottom: 1.5rem;
}
.nostr-contact-wrapper label {
display: block;
margin-bottom: 0.5rem;
font-weight: 600;
font-size: 0.9rem;
color: #000;
}
.dark .nostr-contact-wrapper label {
color: #fff;
}
.nostr-contact-wrapper input,
.nostr-contact-wrapper textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #e5e7eb;
border-radius: 0.375rem;
background: white;
font-size: 1rem;
color: #000;
}
.nostr-contact-wrapper input::placeholder,
.nostr-contact-wrapper textarea::placeholder {
color: #6b7280;
}
.dark .nostr-contact-wrapper input,
.dark .nostr-contact-wrapper textarea {
background: #1f2937;
border-color: #4b5563;
color: #fff;
}
.nostr-contact-wrapper small {
display: block;
margin-top: 0.25rem;
color: #374151;
font-size: 0.875rem;
}
.dark .nostr-contact-wrapper small {
color: #9ca3af;
}
.nostr-contact-wrapper button {
background: #111827;
color: white;
padding: 0.75rem 1.5rem;
border-radius: 0.375rem;
font-weight: 600;
width: 100%;
cursor: pointer;
border: none;
}
.nostr-contact-wrapper button:hover {
background: #374151;
}
.dark .nostr-contact-wrapper button {
background: #fff;
color: #000;
}
.dark .nostr-contact-wrapper button:hover {
background: #e5e7eb;
}
.nostr-contact-wrapper button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
#nc-status {
margin-top: 1rem;
padding: 1rem;
border-radius: 0.375rem;
display: none;
}
#nc-status.success {
display: block;
background: #f0fdf4;
border: 1px solid #86efac;
color: #166534;
}
.dark #nc-status.success {
background: #064e3b;
border-color: #059669;
color: #d1fae5;
}
#nc-status.error {
display: block;
background: #fef2f2;
border: 1px solid #fecaca;
color: #991b1b;
}
.dark #nc-status.error {
background: #7f1d1d;
border-color: #dc2626;
color: #fee2e2;
}
</style>
<form id="nostr-contact-form" onsubmit="return false;">
<div class="form-group">
<label for="nc-name">Name</label>
<input type="text" id="nc-name" required>
</div>
<div class="form-group">
<label for="nc-contact">Contact Info</label>
<input type="text" id="nc-contact" placeholder="email@example.com" required>
<small>How you want to be contacted back</small>
</div>
<div class="form-group">
<label for="nc-message">Message</label>
<textarea id="nc-message" rows="5" required></textarea>
</div>
<button type="submit" id="nc-submit">Send Message</button>
</form>
<div id="nc-status"></div>
<script src="https://unpkg.com/nostr-tools@1.17.0/lib/nostr.bundle.js"></script>
<script>
(function() {
// jsonify ensures proper quoting for JavaScript
const RECIPIENT_NPUB = "npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6";
const RELAYS = {{ .Get "relays" | default `["wss://relay.damus.io","wss://nos.lol"]` | jsonify }};
console.log("Debug - npub:", RECIPIENT_NPUB);
console.log("Debug - relays:", RELAYS);
let RECIPIENT_HEX = null;
const statusDiv = document.getElementById('nc-status');
try {
if (typeof window.NostrTools === 'undefined') {
throw new Error("NostrTools library not loaded");
}
const decoded = window.NostrTools.nip19.decode(RECIPIENT_NPUB);
RECIPIENT_HEX = decoded.data;
console.log("Debug - hex pubkey:", RECIPIENT_HEX);
} catch (e) {
console.error("Failed to decode npub:", e);
if (statusDiv) {
statusDiv.innerHTML = '<strong>Configuration error:</strong> ' + e.message;
statusDiv.className = 'error';
statusDiv.style.display = 'block';
}
return; // Stop here - don't attach event listener if config is bad
}
const form = document.getElementById('nostr-contact-form');
const btn = document.getElementById('nc-submit');
if (!form || !btn) {
console.error("Form elements not found");
return;
}
form.addEventListener('submit', async function(e) {
e.preventDefault();
btn.disabled = true;
btn.textContent = 'Sending...';
statusDiv.className = '';
statusDiv.style.display = 'none';
try {
const sk = window.NostrTools.generatePrivateKey();
const pk = window.NostrTools.getPublicKey(sk);
const messageData = {
name: document.getElementById('nc-name').value,
contact: document.getElementById('nc-contact').value,
message: document.getElementById('nc-message').value,
timestamp: new Date().toISOString()
};
const encryptedContent = await window.NostrTools.nip04.encrypt(
sk,
RECIPIENT_HEX,
JSON.stringify(messageData)
);
const event = {
kind: 4,
pubkey: pk,
created_at: Math.floor(Date.now() / 1000),
tags: [['p', RECIPIENT_HEX]],
content: encryptedContent
};
event.id = window.NostrTools.getEventHash(event);
event.sig = window.NostrTools.signEvent(event, sk);
let successCount = 0;
const results = await Promise.all(RELAYS.map(url => {
return new Promise(resolve => {
const ws = new WebSocket(url);
const timeout = setTimeout(() => {
ws.close();
resolve(false);
}, 5000);
ws.onopen = () => {
ws.send(JSON.stringify(['EVENT', event]));
};
ws.onmessage = (msg) => {
try {
const data = JSON.parse(msg.data);
if (data[0] === 'OK' && data[1] === event.id) {
clearTimeout(timeout);
ws.close();
resolve(true);
}
} catch(e) {}
};
ws.onerror = () => {
clearTimeout(timeout);
ws.close();
resolve(false);
};
ws.onclose = () => {
clearTimeout(timeout);
resolve(false);
};
});
}));
successCount = results.filter(r => r).length;
if (successCount > 0) {
statusDiv.innerHTML = '<strong>Message sent!</strong><br>Published to ' + successCount + ' relay(s).';
statusDiv.className = 'success';
form.reset();
} else {
throw new Error('No relays accepted the message. Check console for details.');
}
} catch (error) {
console.error("Send error:", error);
statusDiv.innerHTML = '<strong>Error:</strong> ' + error.message;
statusDiv.className = 'error';
} finally {
btn.disabled = false;
btn.textContent = 'Send Message';
}
});
})();
</script>
</div>
-6
View File
@@ -1,6 +0,0 @@
[build]
publish = "public"
command = "hugo --gc --minify -b ${DEPLOY_PRIME_URL}"
[build.environment]
HUGO_VERSION = "0.132.2"
-14
View File
@@ -1,14 +0,0 @@
{"names": {
"corey":"c3c7122c63af5281fee3b9338d10ae65b166ffe6f73f1c272c5c1120607731d7"
,"carsoda":"062e8e022b58cd318eda00ae3b4ef7b790c3b209fad6ba97258613df0aadeb45"
,"pleb":"8c8432789d8cd31cafe2c61503a832909bc0766484bb05bc0950d3f92014bbad"
,"duncan":"c1831fbe2653f76164421d57db6cee38b8cef8ce6771bc65c12f8543de4b39bf"
,"bryan":"cb43dde247f361c6d3cdaeb543301377838911757b412eac653e5d8aef277171"
,"joe":"69dd82ab809d6d483546949095af1b83614eb5906890796fe8a9d40442a8d58d"
,"kookymonsta":"b3e6ea04acf9e9b769e437ebf2ddf03e2e5bab2a2fe62d3134012dcd3408717d"
,"raymondromero":"aea4efe3c133f721b1739405291256f32c6bbab8644af14a17342c2774472ac4"
,"sundiego":"8e7bf451202ec924ceedae3e55e30b5dd6d80d8450dfd6804314b04266841bc8"
,"jason":"1a8159b9867f9ed55d579d7b942be311a9e9782ce918c6c6d5a2175cdc3dac3c"
,"curt":"30edf5653b0dd0f2ce21fd4a0e790501f42202f288a72327d42a5d3c08b6b350"
}
}
-1
View File
@@ -1 +0,0 @@
include: [".well-known"]