diff options
Diffstat (limited to 'web/template')
| -rw-r--r-- | web/template/footer.tmpl | 40 | ||||
| -rw-r--r-- | web/template/frontend.tmpl | 5 | ||||
| -rw-r--r-- | web/template/header.tmpl | 32 | ||||
| -rw-r--r-- | web/template/profile.tmpl | 15 | ||||
| -rw-r--r-- | web/template/thread.tmpl | 15 | 
5 files changed, 45 insertions, 62 deletions
diff --git a/web/template/footer.tmpl b/web/template/footer.tmpl index f95d8b71b..075682f60 100644 --- a/web/template/footer.tmpl +++ b/web/template/footer.tmpl @@ -1,19 +1,25 @@ -	<!-- footer.tmpl --> -	<footer> -		<div id="version"> -			GoToSocial: <span class="accent">{{.instance.Version}}</span><br> -			<a href="https://github.com/superseriousbusiness/gotosocial">Source Code</a> -		</div> -		<div id="contact"> -			{{ if .instance.ContactAccount }} -			Contact: <a href="{{.instance.ContactAccount.URL}}" class="nounderline">{{.instance.ContactAccount.Username}}</a><br> -			{{ end }} -		</div> -		<div id="email"> -			{{ if .instance.Email }} -			Email: <a href="mailto:{{.instance.Email}}" class="nounderline">{{.instance.Email}}</a><br> -			{{ end }} -		</div> -	</footer> +		<!-- footer.tmpl --> +		<footer> +			<div id="version"> +				GoToSocial: <span class="accent">{{.instance.Version}}</span><br> +				<a href="https://github.com/superseriousbusiness/gotosocial">Source Code</a> +			</div> +			<div id="contact"> +				{{ if .instance.ContactAccount }}  +				Contact: <a href="{{.instance.ContactAccount.URL}}" class="nounderline">{{.instance.ContactAccount.Username}}</a><br> +				{{ end }} +			</div> +			<div id="email"> +				{{ if .instance.Email }}  +				Email: <a href="mailto:{{.instance.Email}}" class="nounderline">{{.instance.Email}}</a><br> +				{{ end }} +			</div> +		</footer> +	</div> +	{{ if .javascript }} +	{{ range .javascript }} +		<script src="{{.}}"></script> +	{{ end }} +	{{ end }}  </body>  </html>
\ No newline at end of file diff --git a/web/template/frontend.tmpl b/web/template/frontend.tmpl new file mode 100644 index 000000000..b667bc191 --- /dev/null +++ b/web/template/frontend.tmpl @@ -0,0 +1,5 @@ +{{ template "header.tmpl" .}} +<main class="lightgray"> +	<div id="root"></div> +</main> +{{ template "footer.tmpl" .}}
\ No newline at end of file diff --git a/web/template/header.tmpl b/web/template/header.tmpl index 72f17d2a4..86f5cca89 100644 --- a/web/template/header.tmpl +++ b/web/template/header.tmpl @@ -1,29 +1,31 @@  <!DOCTYPE html> -<!-- Header tmpl --> +<!-- header.tmpl -->  <html lang="en">  <head>  	<meta charset="UTF-8">  	<meta http-equiv="X-UA-Compatible" content="IE=edge">  	<meta name="viewport" content="width=device-width, initial-scale=1.0"> -	<meta name="og:title" content="GoToSocial Testing Instance"> -	<meta name="og:description" content=""> +	<meta name="og:title" content="{{.instance.Title}} - GoToSocial"> +	<meta name="og:description" content="{{.instance.ShortDescription}}">  	<meta name="viewport" content="width=device-width, initial-scale=1.0"> -	<link rel="stylesheet" href="/assets/base.css"> +	<link rel="stylesheet" href="/assets/dist/_colors.css"> +	<link rel="stylesheet" href="/assets/dist/base.css">  	{{range .stylesheets}}<link rel="stylesheet" href="{{.}}">  	{{end}}  	<link rel="shortcut icon" href="/assets/logo.png" type="image/png">  	<title>{{.instance.Title}} - GoToSocial</title>  </head>  <body> -	<a href="/" class="nounderline"> -		<header> -			<img src="/assets/logo.png" alt="Instance Logo"/> -			<div> -				<h1> -					{{.instance.Title}} -				</h1> -			</div> -			<div></div> -		</header> -	</a>
\ No newline at end of file +	<div class="page"> +		<a href="/" class="nounderline"> +			<header> +				<img src="/assets/logo.png" alt="Instance Logo"/> +				<div> +					<h1> +						{{.instance.Title}} +					</h1> +				</div> +				<div></div> +			</header> +		</a> diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index 71914b7e7..b1c3aa571 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -31,19 +31,4 @@  		{{end}}  	</div>  </main> -<script> -	Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) => { -		let checkbox = document.getElementById(label.htmlFor); -		function update() { -			if(checkbox.checked) { -				label.innerHTML = "Show more"; -			} else { -				label.innerHTML = "Show less"; -			} -		} -		update(); - -		label.addEventListener("click", () => {setTimeout(update, 1)}); -	}); -</script>  {{ template "footer.tmpl" .}} diff --git a/web/template/thread.tmpl b/web/template/thread.tmpl index b6b91fd31..d0f003b91 100644 --- a/web/template/thread.tmpl +++ b/web/template/thread.tmpl @@ -16,19 +16,4 @@  		{{end}}  	</div>  </main> -<script> -	Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) => { -		let checkbox = document.getElementById(label.htmlFor); -		function update() { -			if(checkbox.checked) { -				label.innerHTML = "Show more"; -			} else { -				label.innerHTML = "Show less"; -			} -		} -		update(); - -		label.addEventListener("click", () => {setTimeout(update, 1)}); -	}); -</script>  {{ template "footer.tmpl" .}}
\ No newline at end of file  | 
