1c013aa8d8
* If a Certified member deletes the final picture from their gallery page, their Certification Photo will be automatically rejected and they are instructed to begin the process again from the beginning. * Add nice Alert and Confirm modals around the website in place of the standard browser feature. Note: the inline confirm on submit buttons are still using the standard feature for now, as intercepting submit buttons named "intent" causes problems in getting the final form to submit.
426 lines
20 KiB
HTML
426 lines
20 KiB
HTML
{{define "title"}}Untitled{{end}}
|
|
{{define "content"}}{{end}}
|
|
{{define "scripts"}}{{end}}
|
|
{{define "base"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" type="text/css" href="/static/css/bulma.min.css?build={{.BuildHash}}">
|
|
<!-- Bulma theme CSS -->
|
|
{{- if eq .WebsiteTheme "light" -}}
|
|
<link rel="stylesheet" type="text/css" href="/static/css/bulma-no-dark-mode.min.css?build={{.BuildHash}}">
|
|
{{- else if eq .WebsiteTheme "dark" -}}
|
|
<link rel="stylesheet" type="text/css" href="/static/css/bulma-dark-theme.css?build={{.BuildHash}}">
|
|
{{- end -}}
|
|
|
|
<!-- nonshy bulma theme overrides -->
|
|
<link rel="stylesheet" href="/static/css/theme.css?build={{.BuildHash}}">
|
|
{{- if or (eq .WebsiteTheme "dark") (ne .WebsiteTheme "light") -}}
|
|
<link rel="stylesheet" type="text/css" href="/static/css/dark-theme.css" {{if ne .WebsiteTheme "dark"}}media="(prefers-color-scheme: dark)"{{end}}>
|
|
{{- end -}}
|
|
|
|
<!-- User theme hue -->
|
|
{{- if and .LoggedIn (.CurrentUser.GetProfileField "website-theme-hue") }}
|
|
{{- $WebsiteThemeHue := .CurrentUser.GetProfileField "website-theme-hue" }}
|
|
<link rel="stylesheet" type="text/css" href="/static/css/theme-{{$WebsiteThemeHue}}.css">
|
|
|
|
<!-- Dark theme mixin -->
|
|
{{- if or (eq .WebsiteTheme "dark") (ne .WebsiteTheme "light") -}}
|
|
<link rel="stylesheet" type="text/css" href="/static/css/theme-{{$WebsiteThemeHue}}-dark.css" {{if ne .WebsiteTheme "dark"}}media="(prefers-color-scheme: dark)"{{end}}>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
<link rel="stylesheet" href="/static/fontawesome-free-6.6.0-web/css/all.css">
|
|
<link rel="manifest" href="/manifest.json">
|
|
<title>{{template "title" .}} - {{ .Title }}</title>
|
|
</head>
|
|
<body class="has-navbar-fixed-top">
|
|
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="/">
|
|
{{ PrettyTitle }}
|
|
</a>
|
|
|
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
</a>
|
|
</div>
|
|
|
|
<div id="navbarBasicExample" class="navbar-menu">
|
|
<div class="navbar-start">
|
|
{{if not .LoggedIn}}
|
|
<a class="navbar-item" href="/">
|
|
<span class="icon"><i class="fa fa-home"></i></span>
|
|
<span>Home</span>
|
|
</a>
|
|
|
|
<a class="navbar-item" href="/about">
|
|
About
|
|
</a>
|
|
|
|
<a class="navbar-item" href="/features">
|
|
Features
|
|
</a>
|
|
|
|
<a class="navbar-item" href="/faq">
|
|
FAQ
|
|
</a>
|
|
{{end}}
|
|
|
|
{{if .LoggedIn}}
|
|
<a class="navbar-item px-1" href="/me">
|
|
<span class="icon"><i class="fa fa-house-user"></i></span>
|
|
<span>Home</span>
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/chat">
|
|
<span class="icon"><i class="fa fa-message"></i></span>
|
|
<span>Chat</span>
|
|
{{if .NavChatStatistics.UserCount}}<span class="nonshy-navbar-notification-tag is-link ml-1">{{.NavChatStatistics.UserCount}}</span>{{end}}
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/forum">
|
|
<span class="icon"><i class="fa fa-comments"></i></span>
|
|
<span>Forum</span>
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/photo/gallery">
|
|
<span class="icon"><i class="fa fa-image"></i></span>
|
|
<span>Gallery</span>
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/friends{{if gt .NavFriendRequests 0}}?view=requests{{end}}">
|
|
<span class="icon"><i class="fa fa-user-group"></i></span>
|
|
<span>Friends</span>
|
|
{{if .NavFriendRequests}}<span class="nonshy-navbar-notification-tag is-warning ml-1">{{FormatNumberShort .NavFriendRequests}}</span>{{end}}
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/messages">
|
|
<span class="icon"><i class="fa fa-envelope"></i></span>
|
|
<span>Messages</span>
|
|
{{if .NavUnreadMessages}}<span class="nonshy-navbar-notification-tag is-warning ml-1">{{FormatNumberShort .NavUnreadMessages}}</span>{{end}}
|
|
</a>
|
|
|
|
<a class="navbar-item px-1" href="/members">
|
|
<span class="icon"><i class="fa fa-people-group"></i></span>
|
|
<span>People</span>
|
|
</a>
|
|
{{end}}
|
|
|
|
<div id="navbar-more" class="navbar-item has-dropdown is-hoverable">
|
|
<a class="navbar-link">
|
|
More
|
|
</a>
|
|
|
|
<div class="navbar-dropdown is-active">
|
|
<a class="navbar-item" href="/members?sort=distance">
|
|
<span class="icon"><i class="fa fa-location-dot"></i></span>
|
|
<span>Who's Nearby</span>
|
|
</a>
|
|
<hr class="navbar-divider">
|
|
<a class="navbar-item" href="/about">
|
|
<span class="icon"><i class="fa fa-circle-info"></i></span>
|
|
<span>About {{PrettyTitle}}</span>
|
|
</a>
|
|
<a class="navbar-item" href="/faq">
|
|
<span class="icon"><i class="fa fa-circle-question"></i></span>
|
|
<span>FAQ</span>
|
|
</a>
|
|
<a class="navbar-item" href="/tos">
|
|
<span class="icon"><i class="fa fa-list"></i></span>
|
|
<span>Terms of Service</span>
|
|
</a>
|
|
<a class="navbar-item" href="/tos/photos">
|
|
<span class="icon"><i class="fa fa-list"></i></span>
|
|
<span>Photo Policy</span>
|
|
</a>
|
|
<a class="navbar-item" href="/privacy">
|
|
<span class="icon"><i class="fa fa-file-shield"></i></span>
|
|
<span>Privacy Policy</span>
|
|
</a>
|
|
<a class="navbar-item" href="/contact">
|
|
<span class="icon"><i class="fa fa-message"></i></span>
|
|
<span>Contact</span>
|
|
</a>
|
|
<hr class="navbar-divider">
|
|
<a class="navbar-item" href="/contact?intent=report">
|
|
<span class="icon"><i class="fa fa-triangle-exclamation"></i></span>
|
|
<span>Report an issue</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar-end">
|
|
{{if .LoggedIn }}
|
|
<div id="navbar-user" class="navbar-item has-dropdown is-hoverable">
|
|
<a class="navbar-link" href="/me{{if .NavUnreadNotifications}}#notifications{{end}}">
|
|
<div class="columns is-mobile is-gapless">
|
|
<div class="column is-narrow">
|
|
<figure class="image is-24x24 mr-2">
|
|
{{if gt .CurrentUser.ProfilePhoto.ID 0}}
|
|
<img src="{{PhotoURL .CurrentUser.ProfilePhoto.CroppedFilename}}" class="is-rounded">
|
|
{{else}}
|
|
<img src="/static/img/shy.png" class="is-rounded has-background-warning">
|
|
{{end}}
|
|
</figure>
|
|
</div>
|
|
<div class="column">
|
|
{{.CurrentUser.Username}}
|
|
{{if .NavUnreadNotifications}}
|
|
<span class="nonshy-navbar-notification-tag is-warning ml-1">{{FormatNumberShort .NavUnreadNotifications}}</span>
|
|
{{end}}
|
|
{{if .NavAdminNotifications}}
|
|
{{if and (.NavCertificationPhotos) (not .NavAdminFeedback)}}
|
|
<span class="nonshy-navbar-notification-tag is-success ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{else if and .NavCertificationPhotos .NavAdminFeedback}}
|
|
<span class="nonshy-navbar-notification-tag is-mixed ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{else}}
|
|
<span class="nonshy-navbar-notification-tag is-danger ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<div class="navbar-dropdown is-right is-hoverable">
|
|
<a class="navbar-item" href="/me{{if .NavUnreadNotifications}}#notifications{{end}}">
|
|
<span class="icon"><i class="fa fa-home-user"></i></span>
|
|
<span>Dashboard</span>
|
|
{{if .NavUnreadNotifications}}
|
|
<span class="nonshy-navbar-notification-tag is-warning ml-1">
|
|
<span class="icon"><i class="fa fa-bell"></i></span>
|
|
<span>{{FormatNumberShort .NavUnreadNotifications}}</span>
|
|
</span>
|
|
{{end}}
|
|
</a>
|
|
<a class="navbar-item" href="/u/{{.CurrentUser.Username}}">
|
|
<span class="icon"><i class="fa fa-user"></i></span>
|
|
<span>My Profile</span>
|
|
</a>
|
|
<a class="navbar-item" href="/u/{{.CurrentUser.Username}}/photos">
|
|
<span class="icon"><i class="fa fa-image"></i></span>
|
|
<span>My Photos</span>
|
|
</a>
|
|
<a class="navbar-item" href="/photo/upload">
|
|
<span class="icon"><i class="fa fa-upload"></i></span>
|
|
<span>Upload Photo</span>
|
|
</a>
|
|
<a class="navbar-item" href="/photo/private">
|
|
<span class="icon"><i class="fa fa-eye"></i></span>
|
|
<span>Private Photos</span>
|
|
</a>
|
|
<a class="navbar-item" href="/notes/me">
|
|
<span class="icon"><i class="fa fa-pen-to-square"></i></span>
|
|
<span>My User Notes</span>
|
|
</a>
|
|
<a class="navbar-item" href="/settings">
|
|
<span class="icon"><i class="fa fa-gear"></i></span>
|
|
<span>Settings</span>
|
|
</a>
|
|
{{if .CurrentUser.IsAdmin}}
|
|
<a class="navbar-item has-text-danger" href="/admin">
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
<span>Admin</span>
|
|
{{if .NavAdminNotifications}}
|
|
<!-- Color code them by the type -->
|
|
{{if and (.NavCertificationPhotos) (not .NavAdminFeedback)}}
|
|
<span class="nonshy-navbar-notification-tag is-success ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{else if and .NavCertificationPhotos .NavAdminFeedback}}
|
|
<span class="nonshy-navbar-notification-tag is-mixed ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{else}}
|
|
<span class="nonshy-navbar-notification-tag is-danger ml-1">{{FormatNumberShort .NavAdminNotifications}}</span>
|
|
{{end}}
|
|
{{end}}
|
|
</a>
|
|
{{end}}
|
|
{{if .SessionImpersonated}}
|
|
<a href="/admin/unimpersonate" class="navbar-item has-text-danger">
|
|
<span class="icon"><i class="fa fa-ghost"></i></span>
|
|
<span>Unimpersonate</span>
|
|
</a>
|
|
{{end}}
|
|
<a class="navbar-item" href="/logout">
|
|
<span class="icon"><i class="fa fa-arrow-right-from-bracket"></i></span>
|
|
<span>Log out</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{{ else }}
|
|
<div class="navbar-item">
|
|
<div class="buttons">
|
|
<a class="button is-primary" href="/signup">
|
|
<strong>Sign up</strong>
|
|
</a>
|
|
<a class="button is-light" href="/login">
|
|
Log in
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Mobile: notifications badge next to hamburger menu -->
|
|
{{if .LoggedIn}}
|
|
<div class="mobile nonshy-mobile-notification">
|
|
{{if .CurrentUser.Certified}}
|
|
<a class="tag {{if gt .NavChatStatistics.UserCount 0}}is-link{{else}}is-grey{{end}} py-4"
|
|
href="/chat">
|
|
<span class="icon"><i class="fa fa-message"></i></span>
|
|
{{if gt .NavChatStatistics.UserCount 0}}
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavChatStatistics.UserCount}}</small>
|
|
{{end}}
|
|
</a>
|
|
|
|
<a class="tag is-grey py-4"
|
|
href="/forum">
|
|
<span class="icon"><i class="fa fa-comments"></i></span>
|
|
</a>
|
|
|
|
<a class="tag is-grey py-4"
|
|
href="/photo/gallery">
|
|
<span class="icon"><i class="fa fa-image"></i></span>
|
|
</a>
|
|
{{end}}
|
|
|
|
<a class="tag {{if gt .NavFriendRequests 0}}is-warning nonshy-navbar-notification{{else}}is-grey{{end}} py-4"
|
|
href="/friends{{if gt .NavFriendRequests 0}}?view=requests{{end}}">
|
|
<span class="icon"><i class="fa fa-user-group"></i></span>
|
|
{{if gt .NavFriendRequests 0}}
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavFriendRequests}}</small>
|
|
{{end}}
|
|
</a>
|
|
|
|
<a class="tag {{if gt .NavUnreadMessages 0}}is-warning nonshy-navbar-notification{{else}}is-grey{{end}} py-4" href="/messages">
|
|
<span class="icon"><i class="fa fa-envelope"></i></span>
|
|
{{if gt .NavUnreadMessages 0}}
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadMessages}}</small>
|
|
{{end}}
|
|
</a>
|
|
|
|
{{if gt .NavUnreadNotifications 0}}
|
|
<a class="tag is-warning nonshy-navbar-notification py-4" href="/me#notifications">
|
|
<span class="icon"><i class="fa fa-bell"></i></span>
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadNotifications}}</small>
|
|
</a>
|
|
{{end}}
|
|
|
|
{{if gt .NavAdminNotifications 0}}
|
|
<!-- Color code them by the type -->
|
|
{{if and (.NavCertificationPhotos) (not .NavAdminFeedback)}}
|
|
<a class="tag is-success py-4" href="/admin">
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavAdminNotifications}}</small>
|
|
</a>
|
|
{{else if and .NavCertificationPhotos .NavAdminFeedback}}
|
|
<a class="tag is-mixed py-4" href="/admin">
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavAdminNotifications}}</small>
|
|
</a>
|
|
{{else}}
|
|
<a class="tag is-danger py-4" href="/admin">
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavAdminNotifications}}</small>
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="container is-fullhd">
|
|
{{if .Flashes}}
|
|
<div class="notification block is-success">
|
|
<!-- <button class="delete"></button> -->
|
|
|
|
{{range .Flashes}}
|
|
<div class="block">{{.}}</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if .Errors}}
|
|
<div class="notification block is-danger">
|
|
<!-- <button class="delete"></button> -->
|
|
|
|
{{range .Errors}}
|
|
<div class="block">{{.}}</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{template "content" .}}
|
|
|
|
<div class="block p-4 has-text-centered has-text-grey">
|
|
© {{.YYYY}} {{.Title}}
|
|
<div class="columns">
|
|
<div class="column">
|
|
<a href="/">Home</a>
|
|
</div>
|
|
<div class="column">
|
|
<a href="/about">About</a>
|
|
</div>
|
|
{{if .LoggedIn}}
|
|
<div class="column">
|
|
<a href="/me">User Dashboard</a>
|
|
</div>
|
|
<div class="column">
|
|
<a href="/u/{{.CurrentUser.Username}}">My Profile</a>
|
|
</div>
|
|
<div class="column">
|
|
<a href="/settings">Settings</a>
|
|
</div>
|
|
<div class="column">
|
|
<a href="/logout">Log out</a>
|
|
</div>
|
|
{{else}}
|
|
<div class="column">
|
|
<a href="/login">Log in</a>
|
|
</div>
|
|
<div class="column">
|
|
<a href="/signup">Sign up</a>
|
|
</div>
|
|
{{end}}
|
|
<div class="column">
|
|
<small class="has-text-grey is-size-7"><i class="fa-regular fa-clock"></i> {{RunTime .Request}}</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/static/js/bulma.js?build={{.BuildHash}}"></script>
|
|
<script type="text/javascript" src="/static/js/likes.js?build={{.BuildHash}}"></script>
|
|
<script type="text/javascript" src="/static/js/vue-3.2.45.js"></script>
|
|
<script type="text/javascript" src="/static/js/htmx-1.9.12.min.js"></script>
|
|
<script type="text/javascript" src="/static/js/slim-forms.js?build={{.BuildHash}}"></script>
|
|
{{if not .SessionImpersonated -}}
|
|
{{- /* Disable web push script if impersonated, so an admin doesn't subscribe to user's notifications */ -}}
|
|
<script type="text/javascript" src="/static/js/web-push.js?build={{.BuildHash}}"></script>
|
|
{{- end}}
|
|
{{template "scripts" .}}
|
|
|
|
<!-- Alert modal -->
|
|
{{template "alert-modal"}}
|
|
|
|
<!-- Likes modal -->
|
|
{{template "like-modal"}}
|
|
|
|
<!-- Right-click modal -->
|
|
{{template "right-click-modal" .}}
|
|
|
|
<!-- PWA loading indicator -->
|
|
<div id="nonshy-pwa-loader">
|
|
<strong class="tag is-info py-4 px-3">
|
|
<i class="fa fa-spinner fa-spin mr-2"></i>
|
|
Loading...
|
|
</strong>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|