-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* content added * extend the default layout component * override default css color variables with own colors
- Loading branch information
Showing
14 changed files
with
192 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
# https://nostr-php.dev website | ||
# Website for https://nostr-php.dev | ||
|
||
This documentation website is created with [VitePress](https://vitepress.dev/). | ||
|
||
## Install packages | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Build | ||
|
||
```bash | ||
npm run docs:build | ||
``` | ||
|
||
All files are generated and saved in `content/.vitepress/dist/` | ||
|
||
## Development | ||
|
||
```bash | ||
npm run docs:dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup> | ||
import DefaultTheme from 'vitepress/theme' | ||
const { Layout } = DefaultTheme | ||
</script> | ||
|
||
<template> | ||
<Layout> | ||
<template #layout-bottom> | ||
<footer class="text-center"> | ||
Released under the MIT License. Supported by OpenSats. | ||
<br /> | ||
<a href="https://github.com/nostrver-se/nostr-php/tree/main/website)" target="_blank">Source Code</a> | ||
</footer> | ||
</template> | ||
</Layout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */ | ||
:root { | ||
--nostrphp-purple: #603d98; | ||
--nostrphp-orange: #f26724; | ||
--vp-home-hero-name-color: var(--nostrphp-orange); | ||
/*--vp-home-hero-name-background: -webkit-linear-gradient( 120deg, var(--nostrphp-purple) 30%, var(--nostrphp-orange) );*/ | ||
--vp-home-hero-image-background-image: linear-gradient( -45deg, #bd34fe 60%, var(--nostrphp-orange) 50% ); | ||
--vp-home-hero-image-filter: blur(70px); | ||
--docsearch-primary-color: var(--nostrphp-orange); | ||
--docsearch-logo-color: var(--nostrphp-orange); | ||
--vp-c-brand-1: var(--nostrphp-orange); | ||
--vp-button-brand-bg: var(--nostrphp-orange); | ||
--vp-button-brand-hover-bg: var(--nostrphp-purple); | ||
--vp-button-brand-active-bg: var(--nostrphp-purple); | ||
} | ||
|
||
footer { | ||
margin: 30px 0; | ||
} | ||
.text-center { | ||
text-align: center; | ||
} | ||
|
||
.image-bg { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
border-radius: 50%; | ||
width: 280px !important; | ||
height: 280px !important; | ||
background-image: var(--vp-home-hero-image-background-image); | ||
filter: var(--vp-home-hero-image-filter); | ||
transform: translate(-50%, -50%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import DefaultTheme from 'vitepress/theme'; | ||
import NostrPHPLayout from './NostrPHPLayout.vue' | ||
import './custom.css'; | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout: NostrPHPLayout, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
Title: Compare Nostr helper libraries | ||
--- | ||
|
||
| Library | [go-nostr](https://github.com/nbd-wtf/go-nostr) | [python-nostr](https://github.com/jeffthibault/python-nostr) | [nostr-flutter](https://pub.dev/documentation/nostr/latest/nostr/nostr-library.html) | nostr-php | [NDK](https://ndk.fyi/docs/) | [nostr-rust](https://rust-nostr.org/) | | ||
| --- |-------------------------------------------------|--------------------------------------------------------------|--------------------------------------------------------------------------------------| --- |------------------------------|---------------------------------------| | ||
| Language | Golang | Python | Dart (Flutter) | PHP | TypeScript | Rust | | ||
| Keypair generation | | | | ✅ | | | | ||
| CLI | | | | ✅ | | ✅ | | ||
| NIP-02 | | | | | | | | ||
| NIP-05 | | | | | | | | ||
| NIP-10 | | | | | | | | ||
| | | | | | | | | ||
| NIP-19 | | | | | | | | ||
| NIP-21 | | | | | | | | ||
| NIP-24 | | | | | | | | ||
| NIP-42 | | | | | | | | ||
| NIP-57 | | | | | | | | ||
| NIP-65 | | | | | | | |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Generate keys | ||
--- | ||
|
||
# Generate keys | ||
|
||
## Create a private key | ||
|
||
```php | ||
$privateKey = new Key(); | ||
$privateKey->generatePrivateKey(); | ||
``` | ||
|
||
## Get public key from a private key | ||
|
||
```php | ||
$key = new Key(); | ||
$private_key_hex = $privateKey->convertToHex($private_key); | ||
$public_key = $key->getPublicKey($private_key_hex); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Get started with Nostr-PHP | ||
--- | ||
|
||
# Get Started | ||
|
||
## Try it out online | ||
|
||
## Prerequisites | ||
* PHP 8.1 or higher | ||
* Composer | ||
|
||
## Installation | ||
|
||
Nostr-PHP can be installed as a package with Composer in your PHP project. | ||
|
||
```bash | ||
composer require nostrverse/nostr-php | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Publish events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Read events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters