Jelajahi Sumber

TOS in footer (#5222)

* footer added

* register page
maTh 3 tahun lalu
induk
melakukan
59c1405c7d

+ 10 - 3
app/views/auth/formLogin.phtml

@@ -3,7 +3,9 @@
 	<h1><?= _t('gen.auth.login') ?></h1>
 
 	<?php if (!max_registrations_reached()) { ?>
-		<a href="<?= _url('auth', 'register') ?>"><?= _t('gen.auth.registration.ask') ?></a>
+		<div class="link-registration">
+			<a href="<?= _url('auth', 'register') ?>"><?= _t('gen.auth.registration.ask') ?></a>
+		</div>
 	<?php } ?>
 
 	<form id="crypto-form" method="post" action="<?= _url('auth', 'login') ?>">
@@ -39,6 +41,11 @@
 			</button>
 		</div>
 	</form>
-
-	<p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p>
 </main>
+
+<footer class="main-footer">
+	<a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a>
+	<?php if (file_exists(TOS_FILENAME)) { ?>
+		| <a href="<?= _url('index', 'tos') ?>"><?= _t('index.tos.title')?></a>
+	<?php } ?>
+</footer>

+ 7 - 2
app/views/auth/register.phtml

@@ -77,6 +77,11 @@
 			<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.cancel') ?></a>
 		</div>
 	</form>
-
-	<p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p>
 </main>
+
+<footer class="main-footer">
+	<a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a>
+	<?php if (file_exists(TOS_FILENAME)) { ?>
+		| <a href="<?= _url('index', 'tos') ?>"><?= _t('index.tos.title')?></a>
+	<?php } ?>
+</footer>

+ 8 - 0
app/views/index/about.phtml

@@ -45,3 +45,11 @@
 	<h2><?= _t('index.about.credits') ?></h2>
 	<p><?= _t('index.about.credits_content') ?></p>
 </main>
+
+<?php if (!FreshRSS_Auth::hasAccess()) { ?>
+<footer class="main-footer">
+	<?php if (file_exists(TOS_FILENAME)) { ?>
+		<a href="<?= _url('index', 'tos') ?>"><?= _t('index.tos.title')?></a>
+	<?php } ?>
+</footer>
+<?php } ?>

+ 6 - 0
app/views/index/tos.phtml

@@ -27,3 +27,9 @@
 	<h1><?= _t('index.tos.title')?></h1>
 	<?= $this->terms_of_service ?>
 </main>
+
+<?php if (!FreshRSS_Auth::hasAccess()) { ?>
+<footer class="main-footer">
+	<a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a>
+</footer>
+<?php } ?>

+ 12 - 2
p/themes/base-theme/frss.css

@@ -63,7 +63,7 @@ html, body {
 }
 
 main.prompt {
-	margin: 3rem auto;
+	margin: 3rem auto 0;
 	padding: 2rem;
 	max-width: 400px;
 	min-width: 300px;
@@ -71,6 +71,17 @@ main.prompt {
 	text-align: center;
 }
 
+main.prompt .link-registration {
+	padding: 1rem 0 0;
+	margin-bottom: 3rem;
+}
+
+footer.main-footer {
+	margin: 0 2rem 2rem;
+	padding: 1rem;
+	text-align: center;
+}
+
 /*=== Links */
 a {
 	text-decoration: none;
@@ -367,7 +378,6 @@ td.numeric {
 
 .prompt form {
 	margin-top: 2rem;
-	margin-bottom: 3rem;
 	text-align: left;
 }
 

+ 12 - 2
p/themes/base-theme/frss.rtl.css

@@ -63,7 +63,7 @@ html, body {
 }
 
 main.prompt {
-	margin: 3rem auto;
+	margin: 3rem auto 0;
 	padding: 2rem;
 	max-width: 400px;
 	min-width: 300px;
@@ -71,6 +71,17 @@ main.prompt {
 	text-align: center;
 }
 
+main.prompt .link-registration {
+	padding: 1rem 0 0;
+	margin-bottom: 3rem;
+}
+
+footer.main-footer {
+	margin: 0 2rem 2rem;
+	padding: 1rem;
+	text-align: center;
+}
+
 /*=== Links */
 a {
 	text-decoration: none;
@@ -367,7 +378,6 @@ td.numeric {
 
 .prompt form {
 	margin-top: 2rem;
-	margin-bottom: 3rem;
 	text-align: right;
 }