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

no issue, just a curiosity #58

Open
krivokapic opened this issue Sep 18, 2024 · 1 comment
Open

no issue, just a curiosity #58

krivokapic opened this issue Sep 18, 2024 · 1 comment

Comments

@krivokapic
Copy link

krivokapic commented Sep 18, 2024

Hi, I recently discovered your awesome ReMastered site and I really like the 'minimal' theme of vanilla JS,HTML and CSS. Found this project you made and after playing around with it, I am wondering:

Is RepMastered made with gowut?

When I inspected the home page or the News page, they are made from divs, navs, header, details, canvas, etc. tags, and yet showcase.go renders everything as a table/tr/td(since NewWindow is a tableView and Server only has AddWin method, so if I am not mistaken, you can't 'get away' from tables). Looking into writer.go, there are only constants for table, tr, td, span. So if RepMastered is built using gowut, how did it bypass tableview?
I tried making a details element like the News page on RepMastered, and it too ends up in a deep td.

package main

import (
	"github.com/icza/gowut/gwu"
)

func main() {
	win := gwu.NewWindow("main", "Test GUI Window")
	win.Style().SetFullWidth()

	detailsHtml := gwu.NewHTML(`<details open="">
		<summary><span>August 26, 2024</span>UMS AI team detection extended to AI Hunters games!</summary>
		<div>
			<p>Changes and new features:</p>
			<ul>
				<li>
					The <span class="highlight">UMS AI team detection feature has been extended to AI Hunters games.</span><br>
					for example, and statistics will be calculated accordingly (instead of games being counted as unknown).
				</li>
			</ul>
		</div>
	</details>`)
	win.Add(detailsHtml)

	server := gwu.NewServer("guitest", "localhost:8081")
	server.SetText("Test GUI App")
	server.AddWin(win)
	server.Start("")
}

Anyway, I also wanted to get more familiar with golang and this project is a good starting point to play around.
ps. RepMastered is one of my favourite websites now :)

@icza
Copy link
Owner

icza commented Sep 19, 2024

Hi!

No, RepMastered is not using gowut. As your initial gut tells: it's vanilla JS, HTML and CSS. The backend uses HTML templates, the standard lib's html/template.

Client side interaction is coded in vanilla JS, including the Game analyzer (the charts, the Map view animation etc.).

I'm glad you like it.

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

No branches or pull requests

2 participants