Skip to content

Commit

Permalink
smarter search (#641)
Browse files Browse the repository at this point in the history
* start working on the search

* wip name search

* wip

* wip

* add box api

* add invalid status

* use ens app

* status borders

* support emojis

* fix indicator colors

* properly validate names

* fix mobile invalid label

* fix text

* add arrows

* refactor

* set fmt to match ens-app-v3

* unused dep

* fix

* bump all deps

* fix

* allow single character names

* fix

* fix url

* use external link for .eth names

* Revert "use external link for .eth names"

This reverts commit 309bedf.

* fmt

* use external link for .eth names

---------

Co-authored-by: sugh01 <[email protected]>
  • Loading branch information
talentlessguy and sugh01 authored Nov 11, 2024
1 parent e615538 commit 55aeccc
Show file tree
Hide file tree
Showing 54 changed files with 4,647 additions and 3,954 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"locales"
],
"i18n-ally.keystyle": "nested",
"eslint.experimental.useFlatConfig": true,
"eslint.useFlatConfig": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
Expand Down
88 changes: 44 additions & 44 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import nextPlugin from '@next/eslint-plugin-next';
import stylistic from '@stylistic/eslint-plugin';
import react from '@eslint-react/eslint-plugin';
import { fixupPluginRules } from '@eslint/compat';
import globals from 'globals';
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import nextPlugin from '@next/eslint-plugin-next'
import stylistic from '@stylistic/eslint-plugin'
import react from '@eslint-react/eslint-plugin'
import { fixupPluginRules } from '@eslint/compat'
import globals from 'globals'

const config = tseslint.config(
{
files: ['src/**/*.ts', 'src/*.tsx'],
ignores: ['node_modules', 'dist', '.next'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
{
files: ['src/**/*.ts', 'src/*.tsx'],
ignores: ['node_modules', 'dist', '.next'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
eslint.configs.recommended,
...tseslint.configs.recommended,
react.configs.recommended,
stylistic.configs.customize({
indent: 4,
quotes: 'single',
jsx: true,
semi: true,
}),
{
settings: {
react: {
version: 'detect',
},
},
plugins: {
'@next/next': fixupPluginRules(nextPlugin),
stylistic,
react,
},
rules: {
// Next.js
...nextPlugin.configs.recommended.rules,
'@next/next/no-img-element': 'off',
'stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
},
},
eslint.configs.recommended,
...tseslint.configs.recommended,
react.configs.recommended,
stylistic.configs.customize({
indent: 2,
quotes: 'single',
jsx: true,
semi: false,
}),
{
settings: {
react: {
version: 'detect',
},
},
);
plugins: {
'@next/next': fixupPluginRules(nextPlugin),
stylistic,
react,
},
rules: {
// Next.js
...nextPlugin.configs.recommended.rules,
'@next/next/no-img-element': 'off',
'stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
},
},
)

export default config;
export default config
158 changes: 79 additions & 79 deletions fonts.ts
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
import { Inter, EB_Garamond } from 'next/font/google';
import localFont from 'next/font/local';
import { Inter, EB_Garamond } from 'next/font/google'
import localFont from 'next/font/local'

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

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

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

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

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

const ABCMarist = localFont({
src: [
{
weight: '400',
path: './fonts/serif/regular.woff2',
style: 'normal',
},
{
weight: '400',
path: './fonts/serif/italic.woff2',
style: 'italic',
},
],
variable: '--ens-serif',
fallback: ['var(--ens-serif-fb)', 'serif'],
});
src: [
{
weight: '400',
path: './fonts/serif/regular.woff2',
style: 'normal',
},
{
weight: '400',
path: './fonts/serif/italic.woff2',
style: 'italic',
},
],
variable: '--ens-serif',
fallback: ['var(--ens-serif-fb)', 'serif'],
})

export { inter, ebGaramond, ABCMarist, ABCMonumentGrotesk, ABCMonumentGroteskSemiMono, ABCMonumentGroteskMono };
export { inter, ebGaramond, ABCMarist, ABCMonumentGrotesk, ABCMonumentGroteskSemiMono, ABCMonumentGroteskMono }
7 changes: 5 additions & 2 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"subtitle": "New Internet",
"text": "For every dreamer, creator, and change-maker tired of the old internet, Web3 is here. ENS is more than a protocol - it's a commitment to a better web, built for everyone.",
"input": {
"caption": "Register your .eth name today",
"placeholder": "Find your .eth"
"caption": "Register your name today",
"placeholder": "Find your name",
"register": "Register",
"view": "View",
"invalid": "Invalid"
}
},
"features": {
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,34 @@
"lint:css": "stylelint -c stylelint.config.mjs './src/**/*.css'"
},
"dependencies": {
"@ensdomains/ensjs": "4.0.1-alpha.0",
"clsx": "^2.1.1",
"dune-api-client": "^1.0.1",
"i18next": "^23.11.5",
"i18next": "^23.16.0",
"i18next-resources-to-backend": "^1.2.1",
"next": "^14.2.4",
"next-i18next": "^15.3.0",
"next": "^14.2.15",
"react": "^18.3.1",
"react-countup": "^6.5.3",
"react-dom": "^18.3.1",
"react-external-link": "^2.3.1",
"react-i18next": "^14.1.2",
"typescript": "^5.5.3"
"react-i18next": "^15.0.3",
"typescript": "^5.6.3",
"viem": "^2.21.28"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.5.22",
"@eslint/compat": "^1.1.0",
"@eslint/js": "^9.6.0",
"@next/eslint-plugin-next": "^14.2.4",
"@stylistic/eslint-plugin": "^2.3.0",
"@stylistic/stylelint-plugin": "^2.1.2",
"@types/node": "^20.14.9",
"@types/react": "^18.3.3",
"@types/react-helmet": "^6.1.11",
"eslint": "^9.6.0",
"globals": "^15.8.0",
"@eslint-react/eslint-plugin": "^1.15.0",
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.12.0",
"@next/eslint-plugin-next": "^14.2.15",
"@stylistic/eslint-plugin": "^2.9.0",
"@stylistic/stylelint-plugin": "^3.1.1",
"@types/node": "^22.7.6",
"@types/react": "^18.3.11",
"eslint": "^9.12.0",
"globals": "^15.11.0",
"i18next-locales-sync": "^2.1.0",
"stylelint": "^16.6.1",
"typescript-eslint": "^7.15.0"
"stylelint": "^16.10.0",
"typescript-eslint": "^8.9.0"
},
"repository": {
"type": "git",
Expand All @@ -49,5 +49,5 @@
"bugs": {
"url": "https://github.com/ensdomains/ensdomains-landing/issues"
},
"packageManager": "pnpm@9.0.6"
"packageManager": "pnpm@9.3.0"
}
Loading

0 comments on commit 55aeccc

Please sign in to comment.