Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Public Resolver #264

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions app/local/content/extras/usertag/Usertag.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import clsx from 'clsx';
import { FC } from 'react';
import {ABCMonumentGroteskSemiMono} from '../../../../src/fonts/index';

export type UsertagVariant = 'full' | 'small';

Expand All @@ -9,17 +11,17 @@ export const Usertag: FC<{
}> = ({ name = 'nick.eth', image = '/nick.eth.png', variant = 'full' }) => {
return (
<div className="not-prose">
<div className="flex h-fit items-center gap-1 overflow-hidden !rounded-full border border-ens-light-border dark:border-ens-dark-border">
<div className={clsx("flex h-fit items-center gap-1 overflow-hidden rounded-md", 'bg-ens-v2-blue-light text-ens-v2-blue-default')}>
{variant == 'full' && (
<div className="aspect-square size-12 overflow-hidden rounded-full p-1">
<div className="aspect-square size-12 overflow-hidden p-1 rounded-md">
<img
src={image}
alt=""
className="rounded-full border border-ens-light-border dark:border-ens-dark-border"
className="rounded-md"
/>
</div>
)}
<div className="px-3 pl-0 font-bold text-ens-light-blue-primary first-of-type:pl-3 dark:text-ens-dark-blue-primary">
<div className={clsx("px-3 pl-0 text-ens-light-blue-primary first-of-type:pl-3 dark:text-ens-dark-blue-primary", ABCMonumentGroteskSemiMono.className)}>
{name}
</div>
</div>
Expand Down
96 changes: 96 additions & 0 deletions app/src/fonts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { EB_Garamond, Erica_One, Inter } from 'next/font/google';
import localFont from 'next/font/local';

export const inter = Inter({
weight: 'variable',
variable: '--ens-sans-fb',
subsets: ['cyrillic'],
});

export const ebGaramond = EB_Garamond({
weight: 'variable',
variable: '--ens-serif-fb',
subsets: ['cyrillic'],
});

export const ericaOne = Erica_One({
weight: '400',
variable: '--ens-title',
subsets: ['latin'],
});

export const ABCMonumentGrotesk = localFont({
src: './variable.woff2',
variable: '--ens-sans',
fallback: ['var(--ens-sans-fb)', 'sans-serif'],
});

export const ABCMonumentGroteskMono = localFont({
src: [
{
weight: '400',
path: './mono/regular.woff2',
style: 'normal',
},
{
weight: '400',
path: './mono/italic.woff2',
style: 'italic',
},
{
weight: '500',
path: './mono/medium.woff2',
style: 'normal',
},
{
weight: '500',
path: './mono/medium-italic.woff2',
style: 'italic',
},
],
variable: '--ens-mono',
});

export const ABCMonumentGroteskSemiMono = localFont({
src: [
{
weight: '400',
path: './semi-mono/regular.woff2',
style: 'normal',
},
{
weight: '400',
path: './semi-mono/italic.woff2',
style: 'italic',
},
{
weight: '500',
path: './semi-mono/medium.woff2',
style: 'normal',
},
{
weight: '500',
path: './semi-mono/medium-italic.woff2',
style: 'italic',
},
],
variable: '--ens-semi-mono',
fallback: ['monospace'],
});

export const ABCMarist = localFont({
src: [
{
weight: '400',
path: './serif/regular.woff2',
style: 'normal',
},
{
weight: '400',
path: './serif/italic.woff2',
style: 'italic',
},
],
variable: '--ens-serif',
fallback: ['var(--ens-serif-fb)', 'serif'],
});
Binary file added app/src/fonts/mono/italic.woff2
Binary file not shown.
Binary file added app/src/fonts/mono/medium-italic.woff2
Binary file not shown.
Binary file added app/src/fonts/mono/medium.woff2
Binary file not shown.
Binary file added app/src/fonts/mono/regular.woff2
Binary file not shown.
Binary file added app/src/fonts/semi-mono/italic.woff2
Binary file not shown.
Binary file added app/src/fonts/semi-mono/medium-italic.woff2
Binary file not shown.
Binary file added app/src/fonts/semi-mono/medium.woff2
Binary file not shown.
Binary file added app/src/fonts/semi-mono/regular.woff2
Binary file not shown.
Binary file added app/src/fonts/serif/italic.woff2
Binary file not shown.
Binary file added app/src/fonts/serif/regular.woff2
Binary file not shown.
Binary file added app/src/fonts/variable.woff2
Binary file not shown.
31 changes: 31 additions & 0 deletions app/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,37 @@ module.exports = {
colors: {
searchbar: '#262929',
ens: {
v2: {
blue: {
light: '#cee1e8',
medium: '#093c52',
dark: '#011a25',
default: '#0080bc',
hover: 'rgba(0,128,188,.8)',
},
magenta: {
light: '#f2c4da',
default: '#f53293',
hover: 'rgba(245,50,148,.8)',
},
green: {
light: '#c5ddcc',
default: '#007c23',
hover: 'rgba(0,124,35,.8)',
},
yellow: {
light: '#f8f6d6',
default: '#fff72f',

},
gray: {
4: '#4a5c63',
3: '#c4c7c8',
2: '#e5e5e5',
1: '#f6f6f6',
},
white: '#f6f6f6',
},
light: {
blue: {
DEFAULT: '#5298FF',
Expand Down
93 changes: 90 additions & 3 deletions docs/resolvers/public.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { WIP } from "@/components/wip/WIP";

{/* * @type {import('@/lib/mdxPageProps').MdxMetaProps} */}
export const meta = {
description: '',
emoji: '🏛️',
contributors: []
description: '',
emoji: '🏛️',
contributors: []
};

# Public Resolver
Expand All @@ -13,6 +13,92 @@ contributors: []

The public resolver is a general-purpose ENS resolver that is suitable for most user needs. It permits the owner of a name to update their records, includes permissions, and stores its data on layer-1 ethereum.

<div className="card1 p-4 flex justify-center items-center overflow-hidden text-xl space-x-2">
<Usertag name="alice.eth" variant="small" />
<div className="bg-ens-v2-blue-light text-ens-v2-blue-default rounded-md px-3 py-2 text-sm font-bold space-y-2">
<div>Public Resolver</div>
{
[
['addr(name, coinType)',
(
<table className="w-full table-fixed">
<thead>
<tr>
<th>name</th>
<th>coinType</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td>luc.eth</td>
<td>60</td>
<td>0x225...c3B5</td>
</tr>
</tbody>
</table>
)], [
'text(name, key)',
(
<table className="w-full table-fixed">
<thead>
<tr>
<th>name</th>
<th>key</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td>luc.eth</td>
<td>avatar</td>
<td className="text-ellipsis">https://avatarservice.xyz/64/luc.eth.webp</td>
</tr>
<tr>
<td>gregskril.eth</td>
<td>description</td>
<td className="text-ellipsis">I like baking and building apps on web3 protocols.</td>
</tr>
</tbody>
</table>
)
],
[
'contenthash(name)',
(
<table className="w-full table-fixed">
<thead>
<tr>
<th>name</th>
<th>value</th>
</tr>
</thead>
<tbody>
<tr>
<td>luc.eth</td>
<td>ipfs://bafybeihkg2...</td>
</tr>
<tr>
<td>vitalik.eth</td>
<td>ipfs://bafybeidvfb...</td>
</tr>
</tbody>
</table>
)
]
].map(([name, value], index) => (
<div className="space-y-1">
<div className="-ml-4 bg-ens-v2-magenta-light text-ens-v2-magenta-default px-2 rounded-md w-fit">{name}</div>
<div className="text-xs max-w-md whitespace-nowrap">
{value}
<span className="text-center w-[80%] block">{'...'}</span>
</div>
</div>
))
}
</div>
</div>

Most ENS names registered through the ENS Manager will use the latest version of the public resolver by default.
Names that resolve to a supported public resolver are editable from within the ENS Manager.

Expand All @@ -39,3 +125,4 @@ The public resolver supports the following features:
## Permissions

The public resolver supports the notion of a "owner" and "manager".

Loading