DEVELOPMENT ENVIRONMENT

~liljamo/tixe

ce1418144772b35371c69f577d48d7d3adab06f4 — Jonni Liljamo 1 year, 28 days ago ff544f5
feat: tab title, tailwind reformat, a todo
M handlers/login.go => handlers/login.go +1 -1
@@ 9,6 9,6 @@ import (
)

func Login(c *gin.Context) {
	html := template.TmplEngine.Render("login.tmpl", map[string]interface{}{"notauthed": true, "oidcloginvisual": config.TixeConfig.OidcLoginVisual})
	html := template.TmplEngine.Render("login.tmpl", map[string]interface{}{"title": "login","notauthed": true, "oidcloginvisual": config.TixeConfig.OidcLoginVisual})
	c.Data(http.StatusOK, "text/html", html)
}

M handlers/settings.go => handlers/settings.go +1 -1
@@ 24,6 24,6 @@ func Settings(c *gin.Context) {
	settingsData := SettingsData {
	}

	html := template.TmplEngine.Render("settings.tmpl", map[string]interface{}{"user": user, "data": settingsData})
	html := template.TmplEngine.Render("settings.tmpl", map[string]interface{}{"title": "settings", "user": user, "data": settingsData})
	c.Data(http.StatusOK, "text/html", html)
}

M middlewares/auth.go => middlewares/auth.go +1 -0
@@ 9,6 9,7 @@ import (

func IsAuthenticated(c *gin.Context) {
	if sessions.Default(c).Get("profile") == nil {
		// TODO: This should probably be validated somehow... DB lookup or something.
		c.Redirect(http.StatusSeeOther, "/login")
	} else {
		c.Next()

M static/styles.css => static/styles.css +9 -9
@@ 558,6 558,11 @@ video {
  width: 1rem;
}

.w-fit {
  width: -moz-fit-content;
  width: fit-content;
}

.w-full {
  width: 100%;
}


@@ 567,11 572,6 @@ video {
  width: max-content;
}

.w-fit {
  width: -moz-fit-content;
  width: fit-content;
}

.min-w-max {
  min-width: -moz-max-content;
  min-width: max-content;


@@ 658,6 658,10 @@ video {
  stroke: #facc15;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}


@@ 666,10 670,6 @@ video {
  padding: 1rem;
}

.p-1 {
  padding: 0.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;

M template/templates/common/base.tmpl => template/templates/common/base.tmpl +2 -0
@@ 7,6 7,8 @@
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<link rel="stylesheet" type="text/css" href="/static/styles.css">

	<title>{{ .title }}</title>
</head>
<body>
	<main>

M tixe.go => tixe.go +1 -1
@@ 34,7 34,7 @@ func handleNoRoute(c *gin.Context) {
	session := sessions.Default(c)
	user := session.Get("user")

	html := template.TmplEngine.Render("404.tmpl", map[string]interface{}{"user": user})
	html := template.TmplEngine.Render("404.tmpl", map[string]interface{}{"title": "404", "user": user})
	c.Data(http.StatusNotFound, "text/html", html)
}