Fixed footer layout (#12840)

* Fixed footer layout

* Fixed footer layout using bootstrap responsive typography
This commit is contained in:
Vipul Khandelwal
2020-12-13 23:09:31 +05:30
committed by GitHub
parent f06fefe9c0
commit 9ebf435c82

View File

@@ -6,16 +6,12 @@
<div class="row"> <div class="row">
<div class="col-12 col-md-2"> <div class="col-12 col-md-2">
<h3> <h3>
<a <a href="https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8"
href="https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8" target="_blank">{{ $t('mobileIOS') }}</a>
target="_blank"
>{{ $t('mobileIOS') }}</a>
</h3> </h3>
<h3> <h3>
<a <a href="https://play.google.com/store/apps/details?id=com.habitrpg.android.habitica"
href="https://play.google.com/store/apps/details?id=com.habitrpg.android.habitica" target="_blank">{{ $t('mobileAndroid') }}</a>
target="_blank"
>{{ $t('mobileAndroid') }}</a>
</h3> </h3>
</div> </div>
<div class="col-12 col-md-2"> <div class="col-12 col-md-2">
@@ -27,16 +23,12 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<a <a href="https://habitica.wordpress.com/"
href="https://habitica.wordpress.com/" target="_blank">{{ $t('companyBlog') }}</a>
target="_blank"
>{{ $t('companyBlog') }}</a>
</li> </li>
<li> <li>
<a <a href="http://blog.habitrpg.com/"
href="http://blog.habitrpg.com/" target="_blank">{{ $t('tumblr') }}</a>
target="_blank"
>{{ $t('tumblr') }}</a>
</li> </li>
<li> <li>
<router-link to="/static/faq"> <router-link to="/static/faq">
@@ -44,10 +36,8 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<a <a href="http://habitica.fandom.com/wiki/Whats_New"
href="http://habitica.fandom.com/wiki/Whats_New" target="_blank">{{ $t('oldNews') }}</a>
target="_blank"
>{{ $t('oldNews') }}</a>
</li> </li>
<!-- Commenting out merch page see https://github.com/HabitRPG/habitica/issues/12039 <!-- Commenting out merch page see https://github.com/HabitRPG/habitica/issues/12039
<li> <li>
@@ -72,10 +62,8 @@
<h3>{{ $t('footerCommunity') }}</h3> <h3>{{ $t('footerCommunity') }}</h3>
<ul> <ul>
<li> <li>
<a <a target="_blank"
target="_blank" href="/static/community-guidelines">{{ $t('communityGuidelines') }}</a>
href="/static/community-guidelines"
>{{ $t('communityGuidelines') }}</a>
</li> </li>
<li> <li>
<router-link to="/hall/contributors"> <router-link to="/hall/contributors">
@@ -83,31 +71,23 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link <router-link to="/groups/guild/a29da26b-37de-4a71-b0c6-48e72a900dac">
to="/groups/guild/a29da26b-37de-4a71-b0c6-48e72a900dac"
>
{{ $t('reportBug') }} {{ $t('reportBug') }}
</router-link> </router-link>
</li> </li>
<li> <li>
<a <a href="https://docs.google.com/forms/d/e/1FAIpQLScPhrwq_7P1C6PTrI3lbvTsvqGyTNnGzp1ugi1Ml0PFee_p5g/viewform?usp=sf_link"
href="https://docs.google.com/forms/d/e/1FAIpQLScPhrwq_7P1C6PTrI3lbvTsvqGyTNnGzp1ugi1Ml0PFee_p5g/viewform?usp=sf_link" target="_blank">{{ $t('requestFeature') }}</a>
target="_blank"
>{{ $t('requestFeature') }}</a>
</li> </li>
<li v-html="$t('communityExtensions')"></li> <li v-html="$t('communityExtensions')"></li>
<li v-html="$t('communityForum')"></li> <li v-html="$t('communityForum')"></li>
<li> <li>
<a <a href="https://www.facebook.com/Habitica"
href="https://www.facebook.com/Habitica" target="_blank">{{ $t('communityFacebook') }}</a>
target="_blank"
>{{ $t('communityFacebook') }}</a>
</li> </li>
<li> <li>
<a <a href="https://www.instagram.com/habitica"
href="https://www.instagram.com/habitica" target="_blank">{{ $t('communityInstagram') }}</a>
target="_blank"
>{{ $t('communityInstagram') }}</a>
</li> </li>
</ul> </ul>
</div> </div>
@@ -117,57 +97,39 @@
<h3>{{ $t('footerDevs') }}</h3> <h3>{{ $t('footerDevs') }}</h3>
<ul> <ul>
<li> <li>
<a <a href="/apidoc"
href="/apidoc" target="_blank">{{ $t('APIv3') }}</a>
target="_blank"
>{{ $t('APIv3') }}</a>
</li> </li>
<li> <li>
<a <a :href="getDataDisplayToolUrl"
:href="getDataDisplayToolUrl" target="_blank">{{ $t('dataDisplayTool') }}</a>
target="_blank"
>{{ $t('dataDisplayTool') }}</a>
</li> </li>
<li> <li>
<a <a href="http://habitica.fandom.com/wiki/Guidance_for_Blacksmiths"
href="http://habitica.fandom.com/wiki/Guidance_for_Blacksmiths" target="_blank">{{ $t('guidanceForBlacksmiths') }}</a>
target="_blank"
>{{ $t('guidanceForBlacksmiths') }}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="col-6 social"> <div class="col-6 social">
<h3>{{ $t('footerSocial') }}</h3> <h3>{{ $t('footerSocial') }}</h3>
<div class="icons"> <div class="icons">
<a <a class="social-circle"
class="social-circle" href="https://twitter.com/habitica"
href="https://twitter.com/habitica" target="_blank">
target="_blank" <div class="social-icon svg-icon"
> v-html="icons.twitter"></div>
<div
class="social-icon svg-icon"
v-html="icons.twitter"
></div>
</a> </a>
<a <a class="social-circle"
class="social-circle" href="https://www.instagram.com/habitica/"
href="https://www.instagram.com/habitica/" target="_blank">
target="_blank" <div class="social-icon svg-icon instagram"
> v-html="icons.instagram"></div>
<div
class="social-icon svg-icon instagram"
v-html="icons.instagram"
></div>
</a> </a>
<a <a class="social-circle"
class="social-circle" href="https://www.facebook.com/Habitica"
href="https://www.facebook.com/Habitica" target="_blank">
target="_blank" <div class="social-icon facebook svg-icon"
> v-html="icons.facebook"></div>
<div
class="social-icon facebook svg-icon"
v-html="icons.facebook"
></div>
</a> </a>
</div> </div>
</div> </div>
@@ -177,31 +139,21 @@
{{ $t('donateText3') }} {{ $t('donateText3') }}
</div> </div>
<div class="col-12 col-md-4"> <div class="col-12 col-md-4">
<button <button v-if="user"
v-if="user" class="btn btn-contribute btn-front btn-flat"
class="btn btn-contribute btn-front btn-flat" @click="donate()">
@click="donate()" <div class="svg-icon heart"
> v-html="icons.heart"></div>
<div
class="svg-icon heart"
v-html="icons.heart"
></div>
<div class="text"> <div class="text">
{{ $t('companyDonate') }} {{ $t('companyDonate') }}
</div> </div>
</button> </button>
<div <div v-else
v-else class="btn btn-contribute btn-front btn-flat">
class="btn btn-contribute btn-front btn-flat" <a href="http://habitica.fandom.com/wiki/Contributing_to_Habitica"
> target="_blank">
<a <div class="svg-icon heart"
href="http://habitica.fandom.com/wiki/Contributing_to_Habitica" v-html="icons.heart"></div>
target="_blank"
>
<div
class="svg-icon heart"
v-html="icons.heart"
></div>
<div class="text">{{ $t('companyContribute') }}</div> <div class="text">{{ $t('companyContribute') }}</div>
</a> </a>
</div> </div>
@@ -215,108 +167,64 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-md-5"> <div class="col-12 col-md-5 text-center text-md-left">
© 2020 Habitica. All rights reserved. © 2020 Habitica. All rights reserved.
<div <div v-if="IS_PRODUCTION && isUserLoaded"
v-if="!IS_PRODUCTION && isUserLoaded" class="debug float-left">
class="debug float-left" <button class="btn btn-primary"
> @click="debugMenuShown = !debugMenuShown">
<button
class="btn btn-primary"
@click="debugMenuShown = !debugMenuShown"
>
Toggle Debug Menu Toggle Debug Menu
</button> </button>
<div <div v-if="debugMenuShown"
v-if="debugMenuShown" class="debug-group">
class="debug-group" <a class="btn btn-secondary"
> @click="setHealthLow()">Health = 1</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addMissedDay(1)">+1 Missed Day</a>
@click="setHealthLow()" <a class="btn btn-secondary"
>Health = 1</a> @click="addMissedDay(2)">+2 Missed Days</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addMissedDay(8)">+8 Missed Days</a>
@click="addMissedDay(1)" <a class="btn btn-secondary"
>+1 Missed Day</a> @click="addMissedDay(32)">+32 Missed Days</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addTenGems()">+10 Gems</a>
@click="addMissedDay(2)" <a class="btn btn-secondary"
>+2 Missed Days</a> @click="addHourglass()">+1 Mystic Hourglass</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addGold()">+500GP</a>
@click="addMissedDay(8)" <a class="btn btn-secondary"
>+8 Missed Days</a> @click="plusTenHealth()">+ 10HP</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addMana()">+MP</a>
@click="addMissedDay(32)" <a class="btn btn-secondary"
>+32 Missed Days</a> @click="addLevelsAndGold()">+Exp +GP +MP</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" @click="addExp()">+Exp</a>
@click="addTenGems()" <a class="btn btn-secondary"
>+10 Gems</a> @click="addOneLevel()">+1 Level</a>
<a <a class="btn btn-secondary"
class="btn btn-secondary" tooltip="+1000 to boss quests. 300 items to collection quests"
@click="addHourglass()" @click="addQuestProgress()">Quest Progress Up</a>
>+1 Mystic Hourglass</a> <a class="btn btn-secondary"
<a @click="makeAdmin()">Make Admin</a>
class="btn btn-secondary" <a class="btn btn-secondary"
@click="addGold()" @click="openModifyInventoryModal()">Modify Inventory</a>
>+500GP</a>
<a
class="btn btn-secondary"
@click="plusTenHealth()"
>+ 10HP</a>
<a
class="btn btn-secondary"
@click="addMana()"
>+MP</a>
<a
class="btn btn-secondary"
@click="addLevelsAndGold()"
>+Exp +GP +MP</a>
<a
class="btn btn-secondary"
@click="addExp()"
>+Exp</a>
<a
class="btn btn-secondary"
@click="addOneLevel()"
>+1 Level</a>
<a
class="btn btn-secondary"
tooltip="+1000 to boss quests. 300 items to collection quests"
@click="addQuestProgress()"
>Quest Progress Up</a>
<a
class="btn btn-secondary"
@click="makeAdmin()"
>Make Admin</a>
<a
class="btn btn-secondary"
@click="openModifyInventoryModal()"
>Modify Inventory</a>
</div> </div>
</div> </div>
</div> </div>
<div class="col-12 col-md-2 text-center"> <div class="col-12 col-md-2 text-center">
<div <div class="logo svg-icon"
class="logo svg-icon" v-html="icons.gryphon"></div>
v-html="icons.gryphon"
></div>
</div> </div>
<div class="col-12 col-md-5 text-right"> <div class="col-12 col-md-5 text-center text-md-right my-1">
<span class="ml-4"> <span class="ml-4">
<a <a target="_blank"
target="_blank" href="/static/privacy">{{ $t('privacy') }}</a>
href="/static/privacy"
>{{ $t('privacy') }}</a>
</span> </span>
<span class="ml-4"> <span class="ml-4">
<a <a target="_blank"
target="_blank" href="/static/terms">{{ $t('terms') }}</a>
href="/static/terms"
>{{ $t('terms') }}</a>
</span> </span>
</div> </div>
</div> </div>
@@ -325,154 +233,140 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.footer-row { .footer-row {
margin: 0; margin: 0;
flex: 0 1 auto; flex: 0 1 auto;
z-index: 10; z-index: 10;
}
footer {
color: #c3c0c7;
padding-bottom: 3em;
a {
color: #2995cd;
} }
}
footer { h3 {
color: #c3c0c7; color: #878190;
padding-bottom: 3em; }
ul {
a { padding-left: 0;
color: #2995cd; list-style-type: none;
} }
} li {
margin-bottom: 0.5em;
}
.social {
h3 { h3 {
color: #878190; text-align: right;
} }
}
ul { .icons {
padding-left: 0; display: flex;
list-style-type: none; justify-content: flex-end;
} flex-shrink: 1;
}
li { // smaller than desktop
margin-bottom: .5em; @media only screen and (max-width: 992px) {
}
.social {
h3 {
text-align: right;
}
}
.icons {
display: flex;
justify-content: flex-end;
flex-shrink: 1;
}
// smaller than desktop
@media only screen and (max-width: 992px) {
.social-circle {
height: 32px !important;
width: 32px !important;
margin-left: 0.75em !important;
}
}
.social-circle { .social-circle {
width: 40px; height: 32px !important;
height: 40px; width: 32px !important;
border-radius: 50%; margin-left: 0.75em !important;
background-color: #c3c0c7; }
}
//mobile view
@media screen and (max-width: 770px) {
.footer-main {
display: flex; display: flex;
margin-left: 1em; flex-direction: column;
&:first-child {
margin-left: 0;
}
&:hover {
background-color: #a5a1ac;
}
.social-icon {
color: #e1e0e3;
width: 16px;
margin: auto;
}
} }
.logo-container {
.logo { order: 1;
width: 24px; }
height: 24px; }
margin: 0 auto; .social-circle {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #c3c0c7;
display: flex;
margin-left: 1em;
&:first-child {
margin-left: 0;
}
&:hover {
background-color: #a5a1ac;
}
.social-icon {
color: #e1e0e3; color: #e1e0e3;
width: 16px;
margin: auto;
} }
}
.debug-group { .logo {
position: absolute; width: 24px;
background: #fff; height: 24px;
top: -300px; margin: 0 auto;
border-radius: 2px; color: #e1e0e3;
padding: 2em; }
} .debug-group {
position: absolute;
.btn-contribute { background: #fff;
background: #c3c0c7; top: -300px;
box-shadow: none; border-radius: 2px;
border-radius: 4px; padding: 2em;
font-family: Roboto Condensed,sans-serif; }
.btn-contribute {
&:hover { background: #c3c0c7;
background: #a5a1ac; box-shadow: none;
border-radius: 4px;
.text { font-family: Roboto Condensed, sans-serif;
color: white; &:hover {
} background: #a5a1ac;
} .text {
color: white;
a {
display: flex;
}
.heart {
max-height: 25px;
width: 18px;
margin-right: .5em;
margin-bottom: .2em;
}
.text, .heart {
display: inline-block;
vertical-align: bottom;
} }
} }
a {
display: flex;
}
.heart {
max-height: 25px;
width: 18px;
margin-right: 0.5em;
margin-bottom: 0.2em;
}
.text,
.heart {
display: inline-block;
vertical-align: bottom;
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
.heart svg { .heart svg {
margin-top: .1em; margin-top: 0.1em;
} }
.facebook svg {
.facebook svg { width: 10px;
width: 10px; margin: 0 auto;
margin: 0 auto; }
} footer {
&.expanded {
footer { padding-left: 6em;
&.expanded { padding-right: 6em;
padding-left: 6em; padding-top: 3em;
padding-right: 6em; background: #e1e0e3;
padding-top: 3em; color: #878190;
background: #e1e0e3; min-height: 408px;
a {
color: #878190; color: #878190;
min-height: 408px; }
.logo {
a { color: #c3c0c7;
color: #878190;
}
.logo {
color: #c3c0c7;
}
} }
} }
}
</style> </style>
<script> <script>
@@ -480,17 +374,14 @@ import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import { mapState } from '@/libs/store'; import { mapState } from '@/libs/store';
import * as Analytics from '@/libs/analytics'; import * as Analytics from '@/libs/analytics';
import gryphon from '@/assets/svg/gryphon.svg'; import gryphon from '@/assets/svg/gryphon.svg';
import twitter from '@/assets/svg/twitter.svg'; import twitter from '@/assets/svg/twitter.svg';
import facebook from '@/assets/svg/facebook.svg'; import facebook from '@/assets/svg/facebook.svg';
import instagram from '@/assets/svg/instagram.svg'; import instagram from '@/assets/svg/instagram.svg';
import heart from '@/assets/svg/heart.svg'; import heart from '@/assets/svg/heart.svg';
import buyGemsModal from './payments/buyGemsModal.vue';
import buyGemsModal from './payments/buyGemsModal';
const IS_PRODUCTION = process.env.NODE_ENV === 'production'; // eslint-disable-line no-process-env const IS_PRODUCTION = process.env.NODE_ENV === 'production'; // eslint-disable-line no-process-env
export default { export default {
components: { components: {
buyGemsModal, buyGemsModal,
@@ -514,7 +405,6 @@ export default {
getDataDisplayToolUrl () { getDataDisplayToolUrl () {
const base = 'https://oldgods.net/habitrpg/habitrpg_user_data_display.html'; const base = 'https://oldgods.net/habitrpg/habitrpg_user_data_display.html';
if (!this.user) return null; if (!this.user) return null;
return `${base}?uuid=${this.user._id}`; return `${base}?uuid=${this.user._id}`;
}, },
}, },
@@ -531,13 +421,10 @@ export default {
}, },
async addMissedDay (numberOfDays) { async addMissedDay (numberOfDays) {
if (!window.confirm(`Are you sure you want to reset the day by ${numberOfDays} day(s)?`)) return; // eslint-disable-line no-alert if (!window.confirm(`Are you sure you want to reset the day by ${numberOfDays} day(s)?`)) return; // eslint-disable-line no-alert
const date = moment(this.user.lastCron).subtract(numberOfDays, 'days').toDate(); const date = moment(this.user.lastCron).subtract(numberOfDays, 'days').toDate();
await axios.post('/api/v4/debug/set-cron', { await axios.post('/api/v4/debug/set-cron', {
lastCron: date, lastCron: date,
}); });
// @TODO: Notification.text('-' + numberOfDays + ' day(s), remember to refresh'); // @TODO: Notification.text('-' + numberOfDays + ' day(s), remember to refresh');
// @TODO: Sync user? // @TODO: Sync user?
}, },
@@ -576,7 +463,6 @@ export default {
const two = three / 10; const two = three / 10;
const one = Math.round(two) * 10; const one = Math.round(two) * 10;
exp = this.user.stats.exp + one; exp = this.user.stats.exp + one;
this.$store.dispatch('user:set', { this.$store.dispatch('user:set', {
'stats.exp': exp, 'stats.exp': exp,
}); });
@@ -588,18 +474,16 @@ export default {
}, },
async addQuestProgress () { async addQuestProgress () {
await axios.post('/api/v4/debug/quest-progress'); await axios.post('/api/v4/debug/quest-progress');
// @TODO: Notification.text('Quest progress increased'); // @TODO: Notification.text('Quest progress increased');
// @TODO: User.sync(); // @TODO: User.sync();
}, },
async makeAdmin () { async makeAdmin () {
await axios.post('/api/v4/debug/make-admin'); await axios.post('/api/v4/debug/make-admin');
// @TODO: Notification.text('You are now an admin! // @TODO: Notification.text('You are now an admin!
// Go to the Hall of Heroes to change your contributor level.'); // Go to the Hall of Heroes to change your contributor level.');
// @TODO: sync() // @TODO: sync()
}, },
openModifyInventoryModal () { openModifyInventoryModal () {
this.$root.$emit('bv::show::modal', 'modify-inventory'); this.$root.$emit('bv::show::modal', 'modify-inventory');
}, },
donate () { donate () {