mobile design improvements

This commit is contained in:
Avris 2021-01-21 18:56:08 +01:00
parent e170c939db
commit ba4edb0ecd
4 changed files with 36 additions and 5 deletions

View File

@ -43,5 +43,6 @@
bottom: $spacer; bottom: $spacer;
right: $spacer; right: $spacer;
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
z-index: 1030;
} }
</style> </style>

View File

@ -2,6 +2,22 @@
<section class="table-responsive"> <section class="table-responsive">
<table :class="['table table-striped table-hover', fixed ? 'table-fixed-' + columns : '']"> <table :class="['table table-striped table-hover', fixed ? 'table-fixed-' + columns : '']">
<thead ref="thead"> <thead ref="thead">
<tr>
<td :colspan="columns + 1">
<nav v-if="pages > 1">
<ul class="pagination pagination-sm justify-content-center mb-0">
<li v-for="p in pagesRange" :class="['page-item', p.page === page ? 'active' : '', p.enabled ? '' : 'disabled']">
<a v-if="p.enabled" class="page-link" href="#" @click.prevent="page = p.page">
{{p.text}}
</a>
<span v-else class="page-link">
{{p.text}}
</span>
</li>
</ul>
</nav>
</td>
</tr>
<tr v-if="count"> <tr v-if="count">
<td :colspan="columns"> <td :colspan="columns">
<T>table.count</T>: <T>table.count</T>:
@ -31,7 +47,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td :colspan="columns"> <td :colspan="columns + 1">
<nav v-if="pages > 1"> <nav v-if="pages > 1">
<ul class="pagination pagination-sm justify-content-center"> <ul class="pagination pagination-sm justify-content-center">
<li v-for="p in pagesRange" :class="['page-item', p.page === page ? 'active' : '', p.enabled ? '' : 'disabled']"> <li v-for="p in pagesRange" :class="['page-item', p.page === page ? 'active' : '', p.enabled ? '' : 'disabled']">

View File

@ -14,16 +14,17 @@
<T>profile.edit</T> <T>profile.edit</T>
</nuxt-link> </nuxt-link>
</div> </div>
<div class="list-group" v-if="Object.keys(profiles).length > 1"> <div v-if="Object.keys(profiles).length > 1" class="locale-list">
<a :href="`https://pronouns.page/@${username}`" v-if="$user() && $user().username === username" <a :href="`https://pronouns.page/@${username}`" v-if="$user() && $user().username === username"
class="list-group-item list-group-item-action small px-4 py-2 text-center" class="btn btn-outline-secondary btn-sm mb-1 mr-1"
> >
<Icon v="external-link"/> <Icon v="external-link"/>
pronouns.page/@{{username}} pronouns.page/@{{username}}
</a> </a>
<br/>
<LocaleLink v-for="(options, locale) in locales" :key="locale" v-if="profiles[locale] !== undefined" <LocaleLink v-for="(options, locale) in locales" :key="locale" v-if="profiles[locale] !== undefined"
:locale="locale" :link="`/@${username}`" :locale="locale" :link="`/@${username}`"
:class="['list-group-item list-group-item-action small px-4 py-2 text-center', locale === config.locale ? 'active disabled' : '']"> :class="['btn', locale === config.locale ? 'btn-primary disabled' : 'btn-outline-primary', 'btn-sm', 'mb-1 mr-1']">
{{options.name}} {{options.name}}
</LocaleLink> </LocaleLink>
</div> </div>
@ -231,4 +232,11 @@
padding-left: calc(#{$list-group-item-padding-x} - 2px); padding-left: calc(#{$list-group-item-padding-x} - 2px);
} }
} }
@include media-breakpoint-up('md', $grid-breakpoints) {
.locale-list {
max-width: 16rem;
text-align: right;
}
}
</style> </style>

View File

@ -56,7 +56,7 @@
</a> </a>
</h4> </h4>
<ul class="list-unstyled member-list"> <ul class="list-unstyled member-list">
<li v-for="member in members" class="mb-2 d-flex"> <li v-for="member in members" class="mb-3 d-flex">
<a :href="`https://pronouns.page/@${member.username}`"> <a :href="`https://pronouns.page/@${member.username}`">
<Avatar :user="member" dsize="4rem"/> <Avatar :user="member" dsize="4rem"/>
</a> </a>
@ -109,6 +109,12 @@
font-size: $small-font-size; font-size: $small-font-size;
} }
} }
@include media-breakpoint-down('md', $grid-breakpoints) {
figure {
float: none !important;
margin: 0 auto;
}
}
.bigger { .bigger {
font-size: 2rem; font-size: 2rem;