Further network layout improvements.

This commit is contained in:
ThePendulum 2020-01-05 02:50:55 +01:00
parent 7c9a9cf83c
commit a16dbbbec0
4 changed files with 135 additions and 99 deletions

View File

@ -45,11 +45,34 @@
</div> </div>
<div class="content-inner"> <div class="content-inner">
<Sites <div
v-if="sites.length" v-if="sites.length"
:sites="sites"
class="compact" class="compact"
/> >
<span
v-if="expanded"
class="expand"
@click="expanded = false"
> collapse</span>
<Sites
:sites="sites"
class="compact"
:class="{ expanded }"
/>
<span
v-if="!expanded"
class="expand"
@click="expanded = true"
>expand </span>
<span
v-if="expanded"
class="expand"
@click="expanded = false"
> collapse</span>
</div>
<Releases :releases="releases" /> <Releases :releases="releases" />
</div> </div>
@ -89,6 +112,7 @@ export default {
sites: null, sites: null,
releases: [], releases: [],
pageTitle: null, pageTitle: null,
expanded: false,
}; };
}, },
mounted, mounted,
@ -119,14 +143,22 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
.content-inner {
padding: 0;
}
.releases {
padding: 1rem;
}
.sidebar { .sidebar {
height: 100%; height: 100%;
width: 18rem; width: 18rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-shrink: 0; flex-shrink: 0;
color: $text-contrast;
border-right: solid 1px $shadow-hint; border-right: solid 1px $shadow-hint;
color: $text-contrast;
overflow: hidden; overflow: hidden;
} }
@ -146,11 +178,8 @@ export default {
filter: $logo-shadow; filter: $logo-shadow;
} }
.sites.compact {
display: none;
}
.header { .header {
background: $profile;
width: 100%; width: 100%;
height: 4rem; height: 4rem;
display: none; display: none;
@ -158,6 +187,19 @@ export default {
border-bottom: solid 1px $shadow-hint; border-bottom: solid 1px $shadow-hint;
} }
.sites.compact {
display: none;
}
.expand {
display: none;
padding: .5rem;
text-align: center;
cursor: pointer;
font-size: .9rem;
font-weight: bold;
}
@media(max-width: $breakpoint) { @media(max-width: $breakpoint) {
.header { .header {
display: flex; display: flex;
@ -165,7 +207,14 @@ export default {
.sites.compact { .sites.compact {
display: flex; display: flex;
padding: 0 1rem 1rem 1rem;
&.expanded {
display: grid;
}
}
.expand {
display: block;
} }
.network { .network {

View File

@ -5,52 +5,42 @@
> >
<FilterBar :fetch-releases="fetchSite" /> <FilterBar :fetch-releases="fetchSite" />
<div class="content-inner"> <div class="header">
<div class="header"> <a
<a v-if="site.url"
v-if="site.url" :href="site.url"
:href="site.url" target="_blank"
target="_blank" rel="noopener noreferrer"
rel="noopener noreferrer" class="title"
class="title" >
<img
:src="`/img/logos/${site.network.slug}/${site.slug}.png`"
:title="site.name"
:alt="site.name"
class="logo"
> >
<object </a>
:data="`/img/logos/${site.network.slug}/${site.slug}.png`"
:title="site.name"
type="image/png"
class="logo"
><h2>{{ site.name }}</h2></object>
<Icon <span class="link">
icon="new-tab" <span class="networklogo-container">
class="icon-href" Part of
/> <a
</a> :href="`/network/${site.network.slug}`"
class="networklogo-link"
<span class="link"> >
<span class="networklogo-container"> <img
Part of :src="`/img/logos/${site.network.slug}/network.png`"
<a :title="site.network.name"
:href="`/network/${site.network.slug}`" :alt="site.network.name"
class="networklogo-link" class="logo"
> >
<object </a>
:data="`/img/logos/${site.network.slug}/network.png`"
:title="site.network.name"
type="image/png"
class="networklogo"
>{{ site.network.name }}</object>
</a>
</span>
</span> </span>
</div> </span>
</div>
<p class="description">{{ site.description }}</p> <div class="content-inner">
<Releases :releases="releases" />
<Releases
:releases="releases"
:context="site.name"
/>
</div> </div>
</div> </div>
</template> </template>
@ -93,19 +83,16 @@ export default {
@import 'theme'; @import 'theme';
.header { .header {
background: $profile;
display: flex; display: flex;
align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
border-bottom: solid 1px $shadow-weak;
} }
.title { .title {
display: inline-flex; padding: 1rem;
align-items: top;
margin: 0 1rem 0 0;
&:hover .icon {
fill: $primary;
}
} }
.heading { .heading {
@ -122,7 +109,7 @@ export default {
.logo { .logo {
width: 20rem; width: 20rem;
max-height: 8rem; max-height: 6rem;
object-fit: contain; object-fit: contain;
margin: 0 .5rem 1rem 0; margin: 0 .5rem 1rem 0;
} }
@ -132,16 +119,6 @@ export default {
align-items: center; align-items: center;
} }
.networklogo {
color: $text;
width: 15rem;
max-height: 6rem;
font-weight: bold;
object-fit: contain;
object-position: 100% 0;
margin: 0 0 0 .5rem;
}
.sites, .sites,
.scenes { .scenes {
display: grid; display: grid;

View File

@ -36,8 +36,7 @@ export default {
grid-template-columns: 1fr; grid-template-columns: 1fr;
overflow-y: auto; overflow-y: auto;
&.compact { &.compact:not(.expanded) {
display: flex;
overflow-x: auto; overflow-x: auto;
.tile { .tile {
@ -45,5 +44,9 @@ export default {
margin: 0 1rem 0 0; margin: 0 1rem 0 0;
} }
} }
&.expanded {
grid-template-columns: repeat(2, .5fr);
}
} }
</style> </style>

View File

@ -520,21 +520,18 @@
/* $primary: #ff886c; */ /* $primary: #ff886c; */
.header[data-v-194630f6] { .header[data-v-194630f6] {
background: #222;
display: -webkit-box; display: -webkit-box;
display: flex; display: flex;
-webkit-box-align: center;
align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
-webkit-box-pack: justify; -webkit-box-pack: justify;
justify-content: space-between; justify-content: space-between;
border-bottom: solid 1px rgba(0, 0, 0, 0.2);
} }
.title[data-v-194630f6] { .title[data-v-194630f6] {
display: -webkit-inline-box; padding: 1rem;
display: inline-flex;
-webkit-box-align: top;
align-items: top;
margin: 0 1rem 0 0;
}
.title:hover .icon[data-v-194630f6] {
fill: #ff6c88;
} }
.heading[data-v-194630f6] { .heading[data-v-194630f6] {
padding: 0; padding: 0;
@ -552,7 +549,7 @@
} }
.logo[data-v-194630f6] { .logo[data-v-194630f6] {
width: 20rem; width: 20rem;
max-height: 8rem; max-height: 6rem;
-o-object-fit: contain; -o-object-fit: contain;
object-fit: contain; object-fit: contain;
margin: 0 .5rem 1rem 0; margin: 0 .5rem 1rem 0;
@ -563,17 +560,6 @@
-webkit-box-align: center; -webkit-box-align: center;
align-items: center; align-items: center;
} }
.networklogo[data-v-194630f6] {
color: #222;
width: 15rem;
max-height: 6rem;
font-weight: bold;
-o-object-fit: contain;
object-fit: contain;
-o-object-position: 100% 0;
object-position: 100% 0;
margin: 0 0 0 .5rem;
}
.sites[data-v-194630f6], .sites[data-v-194630f6],
.scenes[data-v-194630f6] { .scenes[data-v-194630f6] {
display: grid; display: grid;
@ -640,15 +626,16 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
overflow-y: auto; overflow-y: auto;
} }
.sites.compact[data-v-7bebaa3e] { .sites.compact[data-v-7bebaa3e]:not(.expanded) {
display: -webkit-box;
display: flex;
overflow-x: auto; overflow-x: auto;
} }
.sites.compact .tile[data-v-7bebaa3e] { .sites.compact:not(.expanded) .tile[data-v-7bebaa3e] {
width: 15rem; width: 15rem;
margin: 0 1rem 0 0; margin: 0 1rem 0 0;
} }
.sites.expanded[data-v-7bebaa3e] {
grid-template-columns: repeat(2, 0.5fr);
}
/* $primary: #ff886c; */ /* $primary: #ff886c; */
@media (max-width: 1200px) { @media (max-width: 1200px) {
@ -670,6 +657,12 @@
justify-content: stretch; justify-content: stretch;
overflow-y: auto; overflow-y: auto;
} }
.content-inner[data-v-e2e12602] {
padding: 0;
}
.releases[data-v-e2e12602] {
padding: 1rem;
}
.sidebar[data-v-e2e12602] { .sidebar[data-v-e2e12602] {
height: 100%; height: 100%;
width: 18rem; width: 18rem;
@ -679,8 +672,8 @@
-webkit-box-direction: normal; -webkit-box-direction: normal;
flex-direction: column; flex-direction: column;
flex-shrink: 0; flex-shrink: 0;
color: #fff;
border-right: solid 1px rgba(0, 0, 0, 0.1); border-right: solid 1px rgba(0, 0, 0, 0.1);
color: #fff;
overflow: hidden; overflow: hidden;
} }
.sidebar .title[data-v-e2e12602] { .sidebar .title[data-v-e2e12602] {
@ -701,10 +694,8 @@
-webkit-filter: drop-shadow(1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.2)); -webkit-filter: drop-shadow(1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.2));
filter: drop-shadow(1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.2)); filter: drop-shadow(1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.2));
} }
.sites.compact[data-v-e2e12602] {
display: none;
}
.header[data-v-e2e12602] { .header[data-v-e2e12602] {
background: #222;
width: 100%; width: 100%;
height: 4rem; height: 4rem;
display: none; display: none;
@ -712,6 +703,17 @@
justify-content: center; justify-content: center;
border-bottom: solid 1px rgba(0, 0, 0, 0.1); border-bottom: solid 1px rgba(0, 0, 0, 0.1);
} }
.sites.compact[data-v-e2e12602] {
display: none;
}
.expand[data-v-e2e12602] {
display: none;
padding: .5rem;
text-align: center;
cursor: pointer;
font-size: .9rem;
font-weight: bold;
}
@media (max-width: 720px) { @media (max-width: 720px) {
.header[data-v-e2e12602] { .header[data-v-e2e12602] {
display: -webkit-box; display: -webkit-box;
@ -720,7 +722,12 @@
.sites.compact[data-v-e2e12602] { .sites.compact[data-v-e2e12602] {
display: -webkit-box; display: -webkit-box;
display: flex; display: flex;
padding: 0 1rem 1rem 1rem; }
.sites.compact.expanded[data-v-e2e12602] {
display: grid;
}
.expand[data-v-e2e12602] {
display: block;
} }
.network[data-v-e2e12602] { .network[data-v-e2e12602] {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;