eeeeh
This commit is contained in:
		
							parent
							
								
									a89f289bcb
								
							
						
					
					
						commit
						c8078e8829
					
				
							
								
								
									
										15
									
								
								src/emptypage.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/emptypage.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import "github.com/maxence-charriere/go-app/v9/pkg/app"
 | 
			
		||||
 | 
			
		||||
type EmptyPage struct {
 | 
			
		||||
	app.Compo
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func NewEmptyPage() *EmptyPage {
 | 
			
		||||
	return &EmptyPage{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (e *EmptyPage) Render() app.UI {
 | 
			
		||||
	return app.Head().Body()
 | 
			
		||||
}
 | 
			
		||||
@ -17,9 +17,13 @@ func main() {
 | 
			
		||||
	homepage := NewHomepage()
 | 
			
		||||
	aboutpage := NewAboutPage()
 | 
			
		||||
	galaxiespage := NewGalaxiesPage()
 | 
			
		||||
	undertalePage := NewUndertalePage()
 | 
			
		||||
	emptyPage := NewEmptyPage()
 | 
			
		||||
	app.Route("/", homepage)
 | 
			
		||||
	app.Route("/about", aboutpage)
 | 
			
		||||
	app.Route("/galaxies", galaxiespage)
 | 
			
		||||
	app.Route("/undertale", undertalePage)
 | 
			
		||||
	app.Route("/empty", emptyPage)
 | 
			
		||||
 | 
			
		||||
	app.Handle(getHTML, handleGetHTML)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -20,6 +20,11 @@ func (n *navbar) Render() app.UI {
 | 
			
		||||
			app.Li().Body(
 | 
			
		||||
				app.A().Href("/galaxies").Text("Galaxies"),
 | 
			
		||||
			),
 | 
			
		||||
			app.Li().
 | 
			
		||||
				Style("display", "none").
 | 
			
		||||
				Body(
 | 
			
		||||
					app.A().Href("/undertale").Text("Undertale"),
 | 
			
		||||
				),
 | 
			
		||||
		),
 | 
			
		||||
	).Class("navbar")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								src/undertale.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								src/undertale.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import "github.com/maxence-charriere/go-app/v9/pkg/app"
 | 
			
		||||
 | 
			
		||||
type UndertalePage struct {
 | 
			
		||||
	app.Compo
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TODO: Autoplay Megalovania
 | 
			
		||||
 | 
			
		||||
func NewUndertalePage() *UndertalePage {
 | 
			
		||||
	return &UndertalePage{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (u *UndertalePage) Render() app.UI {
 | 
			
		||||
	return newPage().
 | 
			
		||||
		Title("Undertale").
 | 
			
		||||
		LeftBar(
 | 
			
		||||
			newHTMLBlock().
 | 
			
		||||
				Class("left").
 | 
			
		||||
				Class("leftbarblock a").
 | 
			
		||||
				Src("/web/blocks/snippets/bannerpanel.html"),
 | 
			
		||||
		).
 | 
			
		||||
		Main(
 | 
			
		||||
			newHTMLBlock().
 | 
			
		||||
				Class("right").
 | 
			
		||||
				Class("contentblock").
 | 
			
		||||
				Src("/web/blocks/pages/undertale.html"),
 | 
			
		||||
		)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										1
									
								
								web/blocks/pages/undertale.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								web/blocks/pages/undertale.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
<p>Test</p>
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user