Skip to content
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
12 changes: 8 additions & 4 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ const config = {
{
label: 'Discover', to: '#', description: "Discover events, news and projects",
subitems: [
{ label: 'Blog', to: '/blog', description: "Read blog posts from our community", icon: '/assets/menu/near.svg' },
{ label: 'Events', to: '/events', description: "Find what's coming up in the NEAR ecosystem", icon: '/assets/menu/event.png' },
{ label: 'Newsletter', to: '/newsletter', description: "Catch up with the latest news from NEAR", icon: '/assets/menu/newspaper.png' },
{ label: 'Communities', "to": "/communities", description: "Find a NEAR community near you", icon: "/assets/menu/communities.png" },
Expand All @@ -339,12 +340,9 @@ const config = {
},
],
},
{ label: 'Blog', to: '/blog', activeBaseRegex: '/blog', position: 'right' },
{
type: 'html',
position: 'right',
value:
'<a class="navbar__link false" href="#" onclick="google.translate.TranslateElement({pageLanguage: \'en\', includedLanguages: \'af,sq,am,en,fa,ar,ps,ja,zh-CN,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-TW,co,hr,cs,da,nl,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu\'}, \'google_translate_element\');"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" style="vertical-align: text-bottom"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg></a>',
href: 'ask-ai',
},
{
type: 'search',
Expand All @@ -354,6 +352,12 @@ const config = {
position: 'right',
href: 'login',
},
{
type: 'html',
position: 'right',
value:
'<a class="navbar__link false" href="#" onclick="google.translate.TranslateElement({pageLanguage: \'en\', includedLanguages: \'af,sq,am,en,fa,ar,ps,ja,zh-CN,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-TW,co,hr,cs,da,nl,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu\'}, \'google_translate_element\');"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" style="vertical-align: text-bottom"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg></a>',
},
],
},
footer: {
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"crypto-browserify": "^3.12.1",
"docusaurus-plugin-sass": "^0.2.6",
"dotenv": "^17.2.1",
"gleap": "^13.7.3",
"gleap": "^15.0.0",
"lodash": "^4.17.21",
"monaco-editor": "^0.52.2",
"posthog-js": "^1.257.2",
Expand Down
15 changes: 15 additions & 0 deletions website/src/theme/NavbarItem/ai-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styles from './btn.module.css';
import Gleap from 'gleap';

export default function AskAI(props) {
const label = 'Ask AI 📖';
const action = () => { Gleap.askAI() };

if (props.mobile){
return <li className='menu__list-item'>
<button className={`menu__link ${styles.aiBtn}`} onClick={action}>{label}</button>
</li>
}else{
return <button className={`navbar__item navbar__link ${styles.aiBtn}`} onClick={action}>{label}</button>
}
}
18 changes: 18 additions & 0 deletions website/src/theme/NavbarItem/btn.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,22 @@
background-color: color-mix(in srgb, var(--icon-svg-color) 80%, black);
transform: translateY(-2px);
color: #fff;
}

.aiBtn {
border-radius: 1rem;
font-weight: 500;
line-height: 1.5;
font-family: var(--bs-font-sans-serif, 'Poppins', sans-serif);
background-color: var(--docsearch-searchbox-background);
color: var(--docsearch-hit-color);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
border: 2px solid transparent;
padding: 0.35rem 0.6rem;
}

.aiBtn:hover {
box-shadow: var(--docsearch-searchbox-shadow);
color: var(--docsearch-text-color)
}
2 changes: 2 additions & 0 deletions website/src/theme/NavbarItem/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import NavbarItem from '@theme-original/NavbarItem';
import LoginButton from './login-button'
import AskAI from './ai-button';

export default function NavbarItemWrapper(props) {
if (props.href === 'login') return <LoginButton {...props} />
if (props.href === 'ask-ai') return <AskAI {...props} />

const newProps = { ...props };
if ('subitems' in props) newProps.items = props.subitems; // Backward compatibility for subitems
Expand Down
1 change: 0 additions & 1 deletion website/src/theme/NavbarItem/login-button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useState, useEffect } from 'react';
import { useWalletSelector } from '@near-wallet-selector/react-hook';
import styles from './btn.module.css';
Expand Down
10 changes: 10 additions & 0 deletions website/static/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ a.cover-card[target="_blank"]::after {
display: none;
}

// SEARCH
.DocSearch-Button-Key {
width: 15px !important;
height: 16px !important;
}

.DocSearch-Button-Keys {
min-width: calc(27px + .8em) !important;
}

// ============================================================================
// LANDING PAGE STYLES
// ============================================================================
Expand Down
83 changes: 72 additions & 11 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,24 @@
uncontrollable "^8.0.4"
warning "^4.0.3"

"@rrweb/record@^2.0.0-alpha.18":
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/@rrweb/record/-/record-2.0.0-alpha.18.tgz#aeb748dae1928b0cd6d58c33eebb81d126dc5820"
integrity sha512-WbzcybTEqT+cKkOnzYiyaAYvNzAIxTK9f8qNLNOG9lOqWsmi+qu/W7CEdxHmfjlfgXGw/f7bxGZggAWVaizKqg==
dependencies:
"@rrweb/types" "^2.0.0-alpha.18"
rrweb "^2.0.0-alpha.18"

"@rrweb/types@^2.0.0-alpha.18":
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/@rrweb/types/-/types-2.0.0-alpha.18.tgz#e1d9af844cebbf30a2be8808f6cf64f5df3e7f50"
integrity sha512-iMH3amHthJZ9x3gGmBPmdfim7wLGygC2GciIkw2A6SO8giSn8PHYtRT8OKNH4V+k3SZ6RSnYHcTQxBA7pSWZ3Q==

"@rrweb/utils@^2.0.0-alpha.18":
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/@rrweb/utils/-/utils-2.0.0-alpha.18.tgz#7440b425461cf92b8ad9a229db40fa58d456159a"
integrity sha512-qV8azQYo9RuwW4NGRtOiQfTBdHNL1B0Q//uRLMbCSjbaKqJYd88Js17Bdskj65a0Vgp2dwTLPIZ0gK47dfjfaA==

"@saucelabs/theme-github-codeblock@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@saucelabs/theme-github-codeblock/-/theme-github-codeblock-0.2.3.tgz#706a43292f600532271979941b0155db667c2c21"
Expand Down Expand Up @@ -3509,6 +3527,11 @@
dependencies:
"@types/node" "*"

"@types/[email protected]":
version "0.0.7"
resolved "https://registry.yarnpkg.com/@types/css-font-loading-module/-/css-font-loading-module-0.0.7.tgz#2f98ede46acc0975de85c0b7b0ebe06041d24601"
integrity sha512-nl09VhutdjINdWyXxHWN/w9zlNCfr60JUqJbd24YXUuCwgeL0TpFSdElCwb6cxfB6ybE19Gjj4g0jsgkXxKv1Q==

"@types/d3-array@*":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.2.2.tgz#e02151464d02d4a1b44646d0fcdb93faf88fde8c"
Expand Down Expand Up @@ -4226,6 +4249,11 @@
"@webassemblyjs/ast" "1.14.1"
"@xtuc/long" "4.2.2"

"@xstate/fsm@^1.4.0":
version "1.6.5"
resolved "https://registry.yarnpkg.com/@xstate/fsm/-/fsm-1.6.5.tgz#f599e301997ad7e3c572a0b1ff0696898081bea5"
integrity sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw==

"@xtuc/ieee754@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
Expand Down Expand Up @@ -4620,6 +4648,11 @@ base-x@^4.0.0:
resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.1.tgz#817fb7b57143c501f649805cb247617ad016a885"
integrity sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw==

base64-arraybuffer@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc"
integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==

base64-js@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
Expand Down Expand Up @@ -7115,13 +7148,13 @@ github-slugger@^1.5.0:
resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.5.0.tgz#17891bbc73232051474d68bd867a34625c955f7d"
integrity sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==

gleap@^13.7.3:
version "13.9.3"
resolved "https://registry.yarnpkg.com/gleap/-/gleap-13.9.3.tgz#8696d0cf607142d2496da0ffd73161ba1e1d6518"
integrity sha512-kI5/dixlwV4hmJiKKeyf4fL33rGtYR27GdUOTwk8brgOftX2pTGafOQl53zak8kYA2LAHd4FMW5j+V2eQWBRdg==
gleap@^15.0.0:
version "15.0.0"
resolved "https://registry.yarnpkg.com/gleap/-/gleap-15.0.0.tgz#7a2369c4e37e52e30d6f8093bdc4526c4eddc075"
integrity sha512-+i9IlkkJO1KQvvet3aIykxsIz6IcMMridjnZTAbxQIItB7XA9GIXEnmw/c5wjXxIBA58dWPV4nK8DL16L8SAtA==
dependencies:
"@floating-ui/dom" "^1.6.3"
pick-dom-element "^0.2.3"
"@rrweb/record" "^2.0.0-alpha.18"
unique-selector "^0.5.0"

glob-parent@^5.1.2, glob-parent@~5.1.2:
Expand Down Expand Up @@ -9305,6 +9338,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/mipd/-/mipd-0.0.7.tgz#bb5559e21fa18dc3d9fe1c08902ef14b7ce32fd9"
integrity sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg==

mitt@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1"
integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==

mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
Expand Down Expand Up @@ -9917,11 +9955,6 @@ pbkdf2@^3.1.2:
sha.js "^2.4.11"
to-buffer "^1.2.0"

pick-dom-element@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/pick-dom-element/-/pick-dom-element-0.2.3.tgz#5754e686d2533cc94e75b27734475625d8c745b0"
integrity sha512-XBwCZMMnmZAU68lvizuAluOBpImiE3sgXEbrMjBBJ/SjUiHTeep38oiBL8wWMy9ZXxNk6JvmYRUmGiZnCOvUFw==

picocolors@^1.0.0, picocolors@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
Expand Down Expand Up @@ -10539,7 +10572,7 @@ [email protected]:
picocolors "^1.1.1"
source-map-js "^1.2.1"

postcss@^8.4.21, postcss@^8.4.24, postcss@^8.4.33, postcss@^8.5.4:
postcss@^8.4.21, postcss@^8.4.24, postcss@^8.4.33, postcss@^8.4.38, postcss@^8.5.4:
version "8.5.6"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c"
integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==
Expand Down Expand Up @@ -11393,6 +11426,34 @@ rpc-websockets@^9.0.2:
bufferutil "^4.0.1"
utf-8-validate "^5.0.2"

rrdom@^2.0.0-alpha.18:
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/rrdom/-/rrdom-2.0.0-alpha.18.tgz#54726a87053c420ef67b7597a31fef515e372e85"
integrity sha512-fSFzFFxbqAViITyYVA4Z0o5G6p1nEqEr/N8vdgSKie9Rn0FJxDSNJgjV0yiCIzcDs0QR+hpvgFhpbdZ6JIr5Nw==
dependencies:
rrweb-snapshot "^2.0.0-alpha.18"

rrweb-snapshot@^2.0.0-alpha.18:
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/rrweb-snapshot/-/rrweb-snapshot-2.0.0-alpha.18.tgz#b242d079cb07acadd389a56674465a466b111e20"
integrity sha512-hBHZL/NfgQX6wO1D9mpwqFu1NJPpim+moIcKhFEjVTZVRUfCln+LOugRc4teVTCISYHN8Cw5e2iNTWCSm+SkoA==
dependencies:
postcss "^8.4.38"

rrweb@^2.0.0-alpha.18:
version "2.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/rrweb/-/rrweb-2.0.0-alpha.18.tgz#19d96bccba44dc1ee37d0b77b9ca1952682e62b5"
integrity sha512-1mjZcB+LVoGSx1+i9E2ZdAP90fS3MghYVix2wvGlZvrgRuLCbTCCOZMztFCkKpgp7/EeCdYM4nIHJkKX5J1Nmg==
dependencies:
"@rrweb/types" "^2.0.0-alpha.18"
"@rrweb/utils" "^2.0.0-alpha.18"
"@types/css-font-loading-module" "0.0.7"
"@xstate/fsm" "^1.4.0"
base64-arraybuffer "^1.0.1"
mitt "^3.0.0"
rrdom "^2.0.0-alpha.18"
rrweb-snapshot "^2.0.0-alpha.18"

rtlcss@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/rtlcss/-/rtlcss-4.3.0.tgz#f8efd4d5b64f640ec4af8fa25b65bacd9e07cc97"
Expand Down