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

refactor: website v2 (alpha) #9

Merged
merged 19 commits into from
Jun 23, 2023
Merged

refactor: website v2 (alpha) #9

merged 19 commits into from
Jun 23, 2023

Conversation

alexiscolin
Copy link
Member

Website v2 (alpha)

New website design, new layout and new marketing content (related to gnolang/gno#818)

Design

  • responsive
  • dark theme
  • fonts
  • CSS components (jumbotron, stacks, columns, tabs...)

Marketing contents

  • events page
  • language page
  • ecosystem page
  • new GoR content (with tabs/accordion)
  • Grant program
  • SEO content (title / description)

Code

  • remove duplicate code
  • components
  • new CSS architecture (CUBE)

@alexiscolin
Copy link
Member Author

@moul here is the PR to review. It's a partial copy/paste from the Gno repo 818 PR.

@alexiscolin alexiscolin marked this pull request as draft June 16, 2023 17:42
main.go Outdated Show resolved Hide resolved
static/font/.DS_Store Outdated Show resolved Hide resolved
pages/HOME.md Show resolved Hide resolved
views/funcs.html Outdated Show resolved Hide resolved
views/realm_render.html Outdated Show resolved Hide resolved
views/realm_help.html Outdated Show resolved Hide resolved
views/package_file.html Outdated Show resolved Hide resolved
views/package_dir.html Outdated Show resolved Hide resolved
pages/EVENTS.md Outdated Show resolved Hide resolved
pages/EVENTS.md Outdated Show resolved Hide resolved
pages/ECOSYSTEM.md Outdated Show resolved Hide resolved
pages/ECOSYSTEM.md Outdated Show resolved Hide resolved
pages/EVENTS.md Outdated Show resolved Hide resolved
Comment on lines +15 to +24
## Phase I. (ongoing)

- <button id="tab-1" type="button" role="tab" aria-selected="true" aria-controls="tabpanel-1">Evaluation DAO (30%)</button>

- <button id="tab-2" type="button" role="tab" aria-selected="false" aria-controls="tabpanel-2" tabindex="-1">Tutorials (80%)</button>

- <button id="tab-3" type="button" role="tab" aria-selected="false" aria-controls="tabpanel-3" tabindex="-1">Governance Module (25%)</button>

</div>
<div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should skip this part from the website and do it directly on contracts.

Please, keep the rest of the informative things that always make sense; we'll move the dynamic part to a realm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another idea, we do it with pure markdown on a repo managed by devrels cc @waymobetta.

and this page is just informative + linking to the repo; and later we replace the manual repo with smart contracts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moul Do you mean we should keep something like we currently have here: https://gno.land/game-of-realms + link ?


<div class="accordion gor-accordion">

<button type="button" aria-expanded="false" class="accordion-trigger is-muted" aria-controls="acc-1" id="accpanel-1"> &#9745; <span class="is-finished">Clarifying this issue</span> — [100%&nbsp;completed] </button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it starts going too far in terms of being non-markdown centric

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moul I agree, I was not in favor of using HTML/CSS in Markdown, and it's still my opinion. it's really hard to read... That's why the UI lib use a markdown friendly way to use components.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is temporary

Comment on lines +11 to +16
<div class="stack">

[About Gno.land](/about)
[Explore Github repo](https://github.com/gnolang)

</div><!-- end stack-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div class="stack">
[About Gno.land](/about)
[Explore Github repo](https://github.com/gnolang)
</div><!-- end stack-->
<div class="stack">
[About Gno.land](/about)
[Explore Github repo](https://github.com/gnolang)
</div><!-- end stack-->

grouped by goal looks better to me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moul Yeah, but it's not possible. As I told you in the previous Gno PR, HTML in markdown is a nightmare because of MD writing convention:

But I agree, like I said in a meeting we had earlier, using div in markdown is not very user friendly as we don't have indentation and we must follow line break + space convention that are not common in HTML... That's why our futur component lib should help here.

If I do that, the inner markdown will not be rendered as markdown but as HTML

Capture d’écran 2023-06-19 à 19 35 57

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so yeah, maybe not the best solution for long term; let's keep this for now.

I think we should do something more markdownish, like https://marp.app/.

CleanShot 2023-06-22 at 18 04 12@2x

pages/LANGUAGE.md Outdated Show resolved Hide resolved

Using Gno, developers can rapidly accelerate application development and adopt a modular structure by reusing and reassembling existing modules without building from scratch. They can embed one structure inside another in an intuitive way while preserving localism, and the language specification is simple, successfully balancing practicality and minimalism.

The Go language is so well designed that the Gno smart contract system will become the new gold standard for smart contract development and other blockchain applications. As a programming language that is universally adopted, secure, composable, and complete, Gno is essential for the broader adoption of web3 and its sustainable growth.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page needs to be completed, and I suggest removing it or replacing it with something shorter with a disclaimer.

Ideally, we should update this kind of docs on the main repo, and www.gno.land should link to the up-to-date documentation or synchronize.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me ask to Christina, she is the one who wrote the text and I don't know what was her needs/goals here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

synchronized is better for UX as we are currently redirecting our users in so many different websites, that looks similar but without the same navbar. It becomes tricky to navigate in these situations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moul It seems that Adriana requested it as she needs it for applying for the TM. Christina will reach you out about that.

pages/HOME.md Outdated Show resolved Hide resolved
views/funcs.html Show resolved Hide resolved
views/funcs.html Outdated Show resolved Hide resolved
alexiscolin and others added 2 commits June 19, 2023 19:05
Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
alexiscolin and others added 7 commits June 19, 2023 19:27
Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
@alexiscolin alexiscolin marked this pull request as ready for review June 19, 2023 16:46
margin-bottom: 2.5rem;
}

.accordion-trigger {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving all these for now;

would be good to have as goal the creation of a framework for user gno.land generated markdown to benefit from standard minimal components, so please help curate the classes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaekwon Yes, it's exactly what these classes are built for. I have already started generating this UI lib in this PR. Nevertheless, due to our website release deadline, I had to rollover, re-prioritize the website over the lib and use the classes only (before using the UI lib soon asap).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, it actually started with smart contracts, that's a joint effort between alexis and I to make a UI framework for smart contract developers.

Also linked with:

font-weight: 400;
font-display: swap;
src: url("inter/Inter-Regular.woff2?v=3.19") format("woff2"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have to use non-standard fonts? I can understand for monospace.

we can maybe support non-standard non-monospace fonts if we're sure that the fonts will load only after everything else loads first (not in parallel, but explicitly last).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made some tests and I think we can avoid use non-standard sans-serif font if we use a good font fallback system such as: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"

But besides the fonts, I can understand your wish to improve the website loading speed, I've pushed some optimizations that give us good results.

  • preloading rendering javascript ressources
  • preloading Roboto font and make a good use of HTTP/2 request multiplexing.
  • remove useless fonts and blocking style
  • minify css ressource
  • add images sizes to avoid HTML/CSSOM reflow - repaint events
  • reorganize JS files

I think we can go further with a little bit of time and tests, but the Google Lighthouse standards give use good results for now (keeping in mind it's local)

Capture d’écran 2023-06-23 à 14 20 54

{{ define "header_logo" }}
<a id="logo" href="/"><img src="/static/img/logo.png" alt="Gno.land" title="Gno.land" height="38" /></a>
{{ end }}
<span></span>
Copy link
Contributor

@jaekwon jaekwon Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these needed? if so please add some comment why, otherwise delete

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaekwon, These span elements are used for burger button icon (in mobile). I also don't like empty html code and prefer pseudo-element instead, but it more convenient for this kind of icons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok please add a comment.

class="validate"
target="_self"
>
<label for="mce-EMAIL"><img src="/static/img/ico-email.svg" alt="email" /><span>Subscribe by email:</span></label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no script, no tracking, great

<pre id="source">
{{ .Data.MainContent }}
</pre>
<div id="header">{{ template "header_logo" }} {{ template "header_buttons" }}</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if what was desired was {{- -}} or not, I think {{- -}} removes preceding and trailing whitespaces if i remember correctly. anyways if you already knew that, never mind.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right (if it's same as in Hugo framework).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's the html/template golang package; hugo is using it extensively and extends the builtin functions.

it's a gem from Golang which is super simple and powerful for code/page/whatever generation.

@alexiscolin
Copy link
Member Author

We might add a module bundler or a task runner to improve front-end work (DX)

@moul
Copy link
Member

moul commented Jun 23, 2023

We might add a module bundler or a task runner to improve front-end work (DX)

feel free to add whatever as soon as it's not mandatory to make changes, but just an extended comfort for advanced developers.

@moul
Copy link
Member

moul commented Jun 23, 2023

Merging so we can deploy.

@alexiscolin feel free to make updates in new PRs, and now I suggest smaller PRs when possible. Thanks for you work.

@moul moul merged commit 5742032 into gnolang:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants