getting rid of baseXX, some small fixes. Seems to be usable.

This commit is contained in:
Henry Jameson 2018-03-31 21:14:36 +03:00
parent 936ca1a38c
commit aa0564406a
32 changed files with 761 additions and 636 deletions

View File

@ -33,14 +33,18 @@ body {
font-family: sans-serif;
font-size: 14px;
margin: 0;
color: var(--fg);
}
a {
text-decoration: none;
color: var(--link);
}
button{
user-select: none;
color: var(--faint);
background-color: var(--btn);
border: none;
border-radius: 5px;
cursor: pointer;
@ -50,6 +54,8 @@ button{
font-size: 14px;
font-family: sans-serif;
&:hover {
box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
}
@ -58,8 +64,72 @@ button{
cursor: not-allowed;
opacity: 0.5;
}
&.pressed {
color: var(--faint);
background-color: var(--bg)
}
}
input, textarea, select {
border: none;
border-radius: 5px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 2px black inset;
background-color: var(--lightBg);
color: var(--lightFg);
font-family: sans-serif;
font-size: 14px;
padding: 5px;
// TODO: Restyle <select> in a decent way. Needs different markup
// -webkit-appearance:none;
// -moz-appearance:none;
// appearance:none;
&[type=radio],
&[type=checkbox] {
display: none;
&:checked + label::before {
color: var(--fg);
}
+ label::before {
display: inline-block;
content: '';
transition: color 200ms;
width: 1.1em;
height: 1.1em;
border-radius: 2px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 2px black inset;
margin-right: .5em;
background-color: var(--btn);
vertical-align: baseline;
text-align: center;
line-height: 1.1em;
font-size: 1.1em;
box-sizing: border-box;
color: transparent;
overflow: hidden;
}
}
}
.icon-cancel,
.icon-reply,
.icon-retweet,
.icon-star-empty,
.icon-eye-off,
.icon-binoculars,
.icon-plus-squared,
.icon-spin4 {
color: var(--icon)
}
.container {
display: flex;
flex-wrap: wrap;
@ -73,8 +143,8 @@ button{
.item {
flex: 1;
line-height: 21px;
height: 21px;
line-height: 25px;
height: 25px;
overflow: hidden;
.nav-icon {
@ -132,6 +202,8 @@ main-router {
flex-direction: column;
margin: 0.5em;
background-color: var(--bg);
border-radius: 10px;
box-shadow: 1px 1px 4px rgba(0,0,0,.6);
overflow: hidden;
@ -151,6 +223,7 @@ main-router {
text-align: left;
font-size: 1.3em;
line-height: 24px;
background-color: var(--btn);
}
.panel-footer {
@ -173,6 +246,8 @@ main-router {
nav {
z-index: 1000;
background-color: var(--bg);
color: var(--faint);
box-shadow: 0px 0px 4px rgba(0,0,0,.6);
}

View File

@ -1,6 +1,6 @@
<template>
<div id="app" v-bind:style="style" class="base02-background">
<nav class='container base02-background base05' @click="scrollToTop()" id="nav">
<div id="app" v-bind:style="style">
<nav class='container' @click="scrollToTop()" id="nav">
<div class='inner-nav' :style="logoStyle">
<div class='item'>
<router-link :to="{ name: 'root'}">{{sitename}}</router-link>
@ -14,8 +14,8 @@
</nav>
<div class="container" id="content">
<div class="panel-switcher">
<button @click="activatePanel('sidebar')" class="base02-background base05">Sidebar</button>
<button @click="activatePanel('timeline')" class="base02-background base05">Timeline</button>
<button @click="activatePanel('sidebar')">Sidebar</button>
<button @click="activatePanel('timeline')">Timeline</button>
</div>
<div class="sidebar-flexer" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar'}">
<div class="sidebar-bounds">

View File

@ -1,7 +1,6 @@
$main-color: #f58d2c;
$main-background: white;
$darkened-background: whitesmoke;
$green: #0fa00f;
$blue: #0095ff;
$red: #ff0000;
$green_: #0fa00f;
$blue_: #0095ff;
$red_: #ff0000;

View File

@ -1,5 +1,5 @@
<template>
<div class="attachment base03-border" :class="{[type]: true, loading}" v-show="!isEmpty">
<div class="attachment" :class="{[type]: true, loading}" v-show="!isEmpty">
<a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()">
<img :key="nsfwImage" :src="nsfwImage"/>
</a>
@ -8,10 +8,10 @@
</div>
<a v-if="type === 'image' && !hidden" class="image-attachment" :href="attachment.url" target="_blank">
<StillImage class="base03-border" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
<StillImage referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
</a>
<video class="base03" v-if="type === 'video' && !hidden" :src="attachment.url" controls loop></video>
<video v-if="type === 'video' && !hidden" :src="attachment.url" controls loop></video>
<audio v-if="type === 'audio'" :src="attachment.url" controls></audio>
@ -30,115 +30,111 @@
<script src="./attachment.js"></script>
<style lang="scss">
.attachments {
display: flex;
flex-wrap: wrap;
margin-right: -0.7em;
.attachments {
display: flex;
flex-wrap: wrap;
margin-right: -0.7em;
.attachment.media-upload-container {
.attachment.media-upload-container {
flex: 0 0 auto;
max-height: 300px;
max-width: 100%;
}
.attachment {
flex: 1 0 30%;
margin: 0.5em 0.7em 0.6em 0.0em;
align-self: flex-start;
}
border-style: solid;
border-width: 1px;
border-radius: 5px;
overflow: hidden;
.attachment {
flex: 1 0 30%;
margin: 0.5em 0.7em 0.6em 0.0em;
align-self: flex-start;
border-color: var(--border);
// fixes small gap below video
&.video {
border-style: solid;
border-width: 1px;
border-radius: 5px;
overflow: hidden;
// fixes small gap below video
&.video {
line-height: 0;
}
}
&.html {
&.html {
flex-basis: 90%;
width: 100%;
display: flex;
}
}
&.loading {
&.loading {
cursor: progress;
}
}
.hider {
position: absolute;
margin: 10px;
padding: 5px;
background: rgba(230,230,230,0.6);
font-weight: bold;
z-index: 4;
}
.hider {
position: absolute;
margin: 10px;
padding: 5px;
background: rgba(230,230,230,0.6);
font-weight: bold;
z-index: 4;
}
video {
max-height: 500px;
height: 100%;
width: 100%;
z-index: 0;
}
video {
max-height: 500px;
height: 100%;
width: 100%;
z-index: 0;
}
audio {
width: 100%;
}
audio {
width: 100%;
}
img.media-upload {
margin-bottom: -2px;
max-height: 300px;
max-width: 100%;
}
img.media-upload {
margin-bottom: -2px;
max-height: 300px;
max-width: 100%;
}
.oembed {
width: 100%;
margin-right: 15px;
display: flex;
.oembed {
width: 100%;
margin-right: 15px;
display: flex;
img {
width: 100%;
}
img {
width: 100%;
}
.image {
flex: 1;
img {
border: 0px;
border-radius: 5px;
height: 100%;
object-fit: cover;
}
}
.image {
flex: 1;
img {
border: 0px;
border-radius: 5px;
height: 100%;
object-fit: cover;
}
}
.text {
flex: 2;
margin: 8px;
word-break: break-all;
h1 {
font-size: 14px;
margin: 0px;
}
}
}
.text {
flex: 2;
margin: 8px;
word-break: break-all;
h1 {
font-size: 14px;
margin: 0px;
}
}
}
a.image-attachment {
display: flex;
flex: 1;
a.image-attachment {
display: flex;
flex: 1;
.still-image {
width: 100%;
height: 100%;
}
img {
object-fit: contain;
width: 100%;
height: 100%; /* If this isn't here, chrome will stretch the images */
max-height: 500px;
image-orientation: from-image;
}
}
}
img {
object-fit: contain;
width: 100%;
height: 100%; /* If this isn't here, chrome will stretch the images */
max-height: 500px;
image-orientation: from-image;
}
}
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="chat-panel">
<div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background base04">
<div class="panel panel-default">
<div class="panel-heading timeline-heading">
<div class="title">
{{$t('chat.title')}}
</div>

View File

@ -1,6 +1,6 @@
<template>
<div class="timeline panel panel-default">
<div class="panel-heading base02-background base04 base03-border conversation-heading">
<div class="panel-heading conversation-heading">
{{ $t('timeline.conversation') }}
<span v-if="collapsable" style="float:right;">
<small><a href="#" @click.prevent="$emit('toggleExpanded')">Collapse</a></small>

View File

@ -1,7 +1,7 @@
<template>
<div v-if="canDelete">
<a href="#" v-on:click.prevent="deleteStatus()">
<i class='base09 icon-cancel delete-status'></i>
<i class='icon-cancel delete-status'></i>
</a>
</div>
</template>
@ -14,7 +14,8 @@
.icon-cancel,.delete-status {
cursor: pointer;
&:hover {
color: $red;
color: $red_;
color: var(--red);
}
}
</style>

View File

@ -1,10 +1,10 @@
<template>
<div v-if="loggedIn">
<i :class='classes' class='favorite-button fav-active base09' @click.prevent='favorite()'/>
<i :class='classes' class='favorite-button fav-active' @click.prevent='favorite()'/>
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
</div>
<div v-else>
<i :class='classes' class='favorite-button base09'/>
<i :class='classes' class='favorite-button'/>
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
</div>
</template>
@ -17,10 +17,12 @@
animation-duration: 0.6s;
&:hover {
color: orange;
color: var(--cOrange);
}
}
.favorite-button.icon-star {
color: orange;
color: var(--cOrange);
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="instance-specific-panel">
<div class="panel panel-default base01-background">
<div class="panel panel-default">
<div class="panel-body">
<div v-html="instanceSpecificPanelContent">
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="login panel panel-default base00-background">
<div class="login panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading base02-background base04">
<div class="panel-heading">
{{$t('login.login')}}
</div>
<div class="panel-body">
@ -17,11 +17,11 @@
<div class='form-group'>
<div class='login-bottom'>
<div><router-link :to="{name: 'registration'}" v-if='registrationOpen' class='register'>{{$t('login.register')}}</router-link></div>
<button :disabled="loggingIn" type='submit' class='btn btn-default base04 base02-background'>{{$t('login.login')}}</button>
<button :disabled="loggingIn" type='submit' class='btn btn-default'>{{$t('login.login')}}</button>
</div>
</div>
<div v-if="authError" class='form-group'>
<div class='error base05'>{{authError}}</div>
<div class='error'>{{authError}}</div>
</div>
</form>
</div>
@ -33,38 +33,36 @@
<style lang="scss">
.login-form {
input {
border-width: 1px;
border-style: solid;
border-color: silver;
border-radius: 5px;
padding: 0.1em 0.2em 0.2em 0.2em;
}
input {
border-radius: 5px;
padding: 0.1em 0.2em 0.2em 0.2em;
}
.btn {
min-height: 28px;
width: 10em;
}
.btn {
min-height: 28px;
width: 10em;
}
.error {
border-radius: 5px;
text-align: center;
background-color: rgba(255, 48, 16, 0.65);
min-height: 28px;
line-height: 28px;
}
.error {
border-radius: 5px;
text-align: center;
background-color: rgba(255, 48, 16, 0.65);
background-color: var(--cRed);
min-height: 28px;
line-height: 28px;
}
.register {
flex: 1 1;
}
.register {
flex: 1 1;
}
.login-bottom {
margin-top: 1.0em;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.login-bottom {
margin-top: 1.0em;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}
</style>

View File

@ -1,8 +1,8 @@
<template>
<div class="media-upload" @drop.prevent @dragover.prevent="fileDrag" @drop="fileDrop">
<label class="btn btn-default">
<i class="base09 icon-spin4 animate-spin" v-if="uploading"></i>
<i class="base09 icon-upload" v-if="!uploading"></i>
<i class="animate-spin" v-if="uploading"></i>
<i class="icon-upload" v-if="!uploading"></i>
<input type=file style="position: fixed; top: -100em"></input>
</label>
</div>

View File

@ -1,24 +1,24 @@
<template>
<div class="nav-panel">
<div class="panel panel-default base01-background">
<ul class="base03-border">
<div class="panel panel-default">
<ul>
<li v-if='currentUser'>
<router-link class="base00-background" to='/main/friends'>
<router-link to='/main/friends'>
{{ $t("nav.timeline") }}
</router-link>
</li>
<li v-if='currentUser'>
<router-link class="base00-background" :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
<router-link :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
{{ $t("nav.mentions") }}
</router-link>
</li>
<li>
<router-link class="base00-background" to='/main/public'>
<router-link to='/main/public'>
{{ $t("nav.public_tl") }}
</router-link>
</li>
<li>
<router-link class="base00-background" to='/main/all'>
<router-link to='/main/all'>
{{ $t("nav.twkn") }}
</router-link>
</li>
@ -30,43 +30,44 @@
<script src="./nav_panel.js" ></script>
<style lang="scss">
.nav-panel ul {
list-style: none;
margin: 0;
padding: 0;
}
.nav-panel ul {
list-style: none;
margin: 0;
padding: 0;
}
.nav-panel li {
border-bottom: 1px solid;
border-color: inherit;
padding: 0;
&:first-child a {
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
&:last-child a {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
}
.nav-panel li {
border-bottom: 1px solid;
border-color: var(--border);
background-color: var(--bg);
padding: 0;
&:first-child a {
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
&:last-child a {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
}
.nav-panel li:last-child {
border: none;
}
.nav-panel li:last-child {
border: none;
}
.nav-panel a {
display: block;
padding: 0.8em 0.85em;
&:hover {
background-color: transparent;
}
&.router-link-active {
font-weight: bolder;
background-color: transparent;
&:hover {
text-decoration: underline;
}
}
.nav-panel a {
display: block;
padding: 0.8em 0.85em;
&:hover {
background-color: var(--lightBg);
}
&.router-link-active {
font-weight: bolder;
background-color: var(--lightBg);
&:hover {
text-decoration: underline;
}
}
}
</style>

View File

@ -27,7 +27,7 @@ const Notifications = {
},
hiderStyle () {
return {
background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors['base00']} 80%)`
background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors.bg} 80%)`
}
}
},

View File

@ -4,21 +4,33 @@
// a bit of a hack to allow scrolling below notifications
padding-bottom: 15em;
.panel {
background: var(--bg)
}
.panel-body {
border-color: var(--border)
}
.panel-heading {
// force the text to stay centered, while keeping
// the button in the right side of the panel heading
position: relative;
background: var(--btn);
color: var(--faint);
.read-button {
position: absolute;
right: 0.7em;
height: 1.8em;
line-height: 100%;
background-color: var(--btn);
color: var(--faint);
}
}
.unseen-count {
display: inline-block;
background-color: rgba(255, 16, 8, 0.8);
background-color: var(--cRed);
text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
min-width: 1.3em;
border-radius: 1.3em;
@ -27,6 +39,7 @@
font-size: 0.9em;
text-align: center;
line-height: 1.3em;
padding: 1px;
}
.notification {
@ -48,19 +61,23 @@
overflow: hidden;
.icon-retweet.lit {
color: $green;
color: $green_;
color: var(--cGreen);
}
.icon-user-plus.lit {
color: $blue;
color: $blue_;
color: var(--cBlue);
}
.icon-reply.lit {
color: $blue;
color: $blue_;
color: var(--cBlue);
}
.icon-star.lit {
color: orange;
color: var(--cOrange);
}
.status-content {
@ -134,7 +151,7 @@
}
.unseen {
border-left: 4px solid rgba(255, 16, 8, 0.75);
border-left: 4px solid var(--cRed);
padding-left: 6px;
}
}

View File

@ -1,12 +1,12 @@
<template>
<div class="notifications">
<div class="panel panel-default base00-background">
<div class="panel-heading base02-background base04">
<div class="panel panel-default">
<div class="panel-heading">
<span class="unseen-count" v-if="unseenCount">{{unseenCount}}</span>
{{$t('notifications.notifications')}}
<button v-if="unseenCount" @click.prevent="markAsSeen" class="base04 base02-background read-button">{{$t('notifications.read')}}</button>
<button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
</div>
<div class="panel-body base03-border">
<div class="panel-body">
<div v-for="notification in visibleNotifications" :key="notification" class="notification" :class='{"unseen": !notification.seen}'>
<div>
<a :href="notification.action.user.statusnet_profile_url" target="_blank">

View File

@ -1,21 +1,21 @@
<template>
<div class="post-status-form">
<form @submit.prevent="postStatus(newStatus)">
<div class="form-group base03-border" >
<div class="form-group" >
<textarea @click="setCaret" @keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control" @keydown.down="cycleForward" @keydown.up="cycleBackward" @keydown.shift.tab="cycleBackward" @keydown.tab="cycleForward" @keydown.enter="replaceCandidate" @keydown.meta.enter="postStatus(newStatus)" @keyup.ctrl.enter="postStatus(newStatus)" @drop="fileDrop" @dragover.prevent="fileDrag" @input="resize" @paste="paste"></textarea>
</div>
<div style="position:relative;" v-if="candidates">
<div class="autocomplete-panel base05-background">
<div class="autocomplete-panel">
<div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))">
<div v-if="candidate.highlighted" class="autocomplete base02">
<div v-if="candidate.highlighted" class="autocomplete">
<span v-if="candidate.img"><img :src="candidate.img"></span>
<span v-else>{{candidate.utf}}</span>
<span>{{candidate.screen_name}}<small class="base02">{{candidate.name}}</small></span>
<span>{{candidate.screen_name}}<small>{{candidate.name}}</small></span>
</div>
<div v-else class="autocomplete base04">
<div v-else class="autocomplete">
<span v-if="candidate.img"><img :src="candidate.img"></img></span>
<span v-else>{{candidate.utf}}</span>
<span>{{candidate.screen_name}}<small class="base02">{{candidate.name}}</small></span>
<span>{{candidate.screen_name}}<small>{{candidate.name}}</small></span>
</div>
</div>
</div>
@ -24,18 +24,18 @@
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
<p v-if="isOverLengthLimit" class="error">{{ charactersLeft }}</p>
<p v-else-if="hasStatusLengthLimit" class="base04">{{ charactersLeft }}</p>
<p v-else-if="hasStatusLengthLimit">{{ charactersLeft }}</p>
<button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button>
<button v-else-if="isOverLengthLimit" disabled class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
<button v-if="posting" disabled class="btn btn-default">{{$t('post_status.posting')}}</button>
<button v-else-if="isOverLengthLimit" disabled class="btn btn-default">{{$t('general.submit')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default">{{$t('general.submit')}}</button>
</div>
<div class='error' v-if="error">
Error: {{ error }}
<i class="icon-cancel" @click="clearError"></i>
</div>
<div class="attachments">
<div class="media-upload-container attachment base03-border" v-for="file in newStatus.files">
<div class="media-upload-container attachment" v-for="file in newStatus.files">
<i class="fa icon-cancel" @click="removeMediaFile(file)"></i>
<img class="thumbnail media-upload" :src="file.image" v-if="type(file) === 'image'"></img>
<video v-if="type(file) === 'video'" :src="file.image" controls></video>
@ -51,146 +51,149 @@
<style lang="scss">
.tribute-container {
ul {
padding: 0px;
li {
display: flex;
align-items: center;
}
}
img {
padding: 3px;
width: 16px;
height: 16px;
border-radius: 50%;
}
}
.tribute-container {
ul {
padding: 0px;
li {
display: flex;
align-items: center;
}
}
img {
padding: 3px;
width: 16px;
height: 16px;
border-radius: 50%;
}
}
.post-status-form, .login {
.form-bottom {
display: flex;
padding: 0.5em;
height: 32px;
.post-status-form, .login {
.form-bottom {
display: flex;
padding: 0.5em;
height: 32px;
button {
width: 10em;
}
button {
width: 10em;
}
p {
margin: 0.35em;
padding: 0.35em;
display: flex;
}
}
.error {
border-radius: 5px;
text-align: center;
background-color: rgba(255, 48, 16, 0.65);
padding: 0.25em;
margin: 0.35em;
display: flex;
}
p {
margin: 0.35em;
padding: 0.35em;
display: flex;
}
}
.error {
border-radius: 5px;
text-align: center;
background-color: rgba(255, 48, 16, 0.65);
background-color: var(--cRed);
padding: 0.25em;
margin: 0.35em;
display: flex;
}
.attachments {
padding: 0 0.5em;
.attachments {
padding: 0 0.5em;
.attachment {
position: relative;
margin: 0.5em 0.8em 0.2em 0;
}
.attachment {
position: relative;
border: var(--border);
margin: 0.5em 0.8em 0.2em 0;
}
i {
i {
position: absolute;
margin: 10px;
padding: 5px;
background: rgba(230,230,230,0.6);
border-radius: 5px;
font-weight: bold;
}
}
}
}
.btn {
cursor: pointer;
}
.btn {
cursor: pointer;
}
.btn[disabled] {
cursor: not-allowed;
}
.btn[disabled] {
cursor: not-allowed;
}
.icon-cancel {
cursor: pointer;
}
form {
display: flex;
flex-direction: column;
padding: 0.6em;
}
.icon-cancel {
cursor: pointer;
}
.form-group {
display: flex;
flex-direction: column;
padding: 0.3em 0.5em 0.6em;
line-height:24px;
}
form {
display: flex;
flex-direction: column;
padding: 0.6em;
}
form textarea {
border: solid;
border-width: 1px;
border-color: inherit;
border-radius: 5px;
line-height:16px;
padding: 5px;
resize: none;
overflow: hidden;
}
.form-group {
display: flex;
flex-direction: column;
padding: 0.3em 0.5em 0.6em;
line-height:24px;
}
form textarea:focus {
min-height: 48px;
}
form textarea {
border-radius: 5px;
line-height:16px;
padding: 5px;
resize: none;
overflow: hidden;
}
.btn {
cursor: pointer;
}
form textarea:focus {
min-height: 48px;
}
.btn[disabled] {
cursor: not-allowed;
}
.btn {
cursor: pointer;
}
.icon-cancel {
cursor: pointer;
z-index: 4;
}
.btn[disabled] {
cursor: not-allowed;
}
.autocomplete-panel {
margin: 0 0.5em 0 0.5em;
border-radius: 5px;
position: absolute;
z-index: 1;
box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
min-width: 75%;
}
.icon-cancel {
cursor: pointer;
z-index: 4;
}
.autocomplete {
cursor: pointer;
padding: 0.2em 0.4em 0.2em 0.4em;
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
display: flex;
img {
width: 24px;
height: 24px;
border-radius: 2px;
object-fit: contain;
}
span {
line-height: 24px;
margin: 0 0.1em 0 0.2em;
}
small {
font-style: italic;
}
}
}
.autocomplete-panel {
margin: 0 0.5em 0 0.5em;
border-radius: 5px;
position: absolute;
z-index: 1;
box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
min-width: 75%;
background: var(--btn);
color: var(--lightFg);
}
.autocomplete {
cursor: pointer;
padding: 0.2em 0.4em 0.2em 0.4em;
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
display: flex;
img {
width: 24px;
height: 24px;
border-radius: 2px;
object-fit: contain;
}
span {
line-height: 24px;
margin: 0 0.1em 0 0.2em;
}
small {
margin-left: .5em;
color: var(--faint);
}
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="settings panel panel-default base00-background">
<div class="panel-heading base02-background base04">
<div class="settings panel panel-default">
<div class="panel-heading">
{{$t('registration.registration')}}
</div>
<div class="panel-body">
@ -39,14 +39,14 @@
</div>
-->
<div class='form-group'>
<button :disabled="registering" type='submit' class='btn btn-default base05 base02-background'>{{$t('general.submit')}}</button>
<button :disabled="registering" type='submit' class='btn btn-default'>{{$t('general.submit')}}</button>
</div>
</div>
<div class='terms-of-service' v-html="termsofservice">
</div>
</div>
<div v-if="error" class='form-group'>
<div class='error base05'>{{error}}</div>
<div class='error'>{{error}}</div>
</div>
</form>
</div>
@ -57,63 +57,60 @@
<style lang="scss">
.registration-form {
display: flex;
flex-direction: column;
margin: 0.6em;
.container {
display: flex;
flex-direction: row;
//margin-bottom: 1em;
}
.terms-of-service {
flex: 0 1 50%;
margin: 0.8em;
}
.text-fields {
margin-top: 0.6em;
flex: 1 0;
display: flex;
flex-direction: column;
}
margin: 0.6em;
.form-group {
display: flex;
flex-direction: column;
padding: 0.3em 0.0em 0.3em;
line-height:24px;
}
.container {
display: flex;
flex-direction: row;
//margin-bottom: 1em;
}
form textarea {
border: solid;
border-width: 1px;
border-color: silver;
border-radius: 5px;
line-height:16px;
padding: 5px;
resize: vertical;
}
.terms-of-service {
flex: 0 1 50%;
margin: 0.8em;
}
input {
border-width: 1px;
border-style: solid;
border-color: silver;
border-radius: 5px;
padding: 0.1em 0.2em 0.2em 0.2em;
}
.text-fields {
margin-top: 0.6em;
flex: 1 0;
display: flex;
flex-direction: column;
}
.captcha {
max-width: 350px;
margin-bottom: 0.4em;
}
.form-group {
display: flex;
flex-direction: column;
padding: 0.3em 0.0em 0.3em;
line-height:24px;
}
.btn {
//align-self: flex-start;
//width: 10em;
margin-top: 0.6em;
height: 28px;
form textarea {
border: solid;
border-width: 1px;
border-color: silver;
border-radius: 5px;
line-height:16px;
padding: 5px;
resize: vertical;
}
input {
border-radius: 5px;
padding: 0.1em 0.2em 0.2em 0.2em;
}
.captcha {
max-width: 350px;
margin-bottom: 0.4em;
}
.btn {
//align-self: flex-start;
//width: 10em;
margin-top: 0.6em;
height: 28px;
}
.error {
@ -121,6 +118,7 @@
text-align: center;
margin: 0.5em 0.6em 0;
background-color: rgba(255, 48, 16, 0.65);
background-color: var(--cRed);
min-height: 28px;
line-height: 28px;
}

View File

@ -1,10 +1,10 @@
<template>
<div v-if="loggedIn">
<i :class='classes' class='icon-retweet rt-active base09' v-on:click.prevent='retweet()'></i>
<i :class='classes' class='icon-retweet rt-active' v-on:click.prevent='retweet()'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
<div v-else>
<i :class='classes' class='icon-retweet base09'></i>
<i :class='classes' class='icon-retweet'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
</template>
@ -17,10 +17,12 @@
cursor: pointer;
animation-duration: 0.6s;
&:hover {
color: $green;
color: $green_;
color: var(--cGreen);
}
}
.icon-retweet.retweeted {
color: $green;
color: $green_;
color: var(--cGreen);
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="settings panel panel-default base00-background">
<div class="panel-heading base02-background base04">
<div class="settings panel panel-default">
<div class="panel-heading">
{{$t('settings.settings')}}
</div>
<div class="panel-body">

View File

@ -55,11 +55,6 @@ const Status = {
},
muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) },
isReply () { return !!this.status.in_reply_to_status_id },
borderColor () {
return {
borderBottomColor: this.$store.state.config.colors['base02']
}
},
isFocused () {
// retweet or root of an expanded conversation
if (this.focused) {

View File

@ -1,11 +1,11 @@
<template>
<div class="status-el base00-background" v-if="compact">
<div class="status-el" v-if="compact">
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
<div v-if="loggedIn">
<div class='status-actions'>
<div>
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
<i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
@ -14,12 +14,12 @@
</div>
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying" v-if="replying"/>
</div>
<div class="status-el base00-background base03-border status-fadein" v-else-if="!status.deleted" v-bind:class="[{ 'base01-background': isFocused }, { 'status-conversation': inConversation }]" >
<div class="status-el status-fadein" v-else-if="!status.deleted" v-bind:class="[{ 'status-el_focused': isFocused }, { 'status-conversation': inConversation }]" >
<template v-if="muted">
<div class="media status container muted">
<small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
<small class="muteWords">{{muteWordHits.join(', ')}}</small>
<a href="#" class="unmute" @click.prevent="toggleMute"><i class="base09 icon-eye-off"></i></a>
<a href="#" class="unmute" @click.prevent="toggleMute"><i class="icon-eye-off"></i></a>
</div>
</template>
<template v-if="!muted">
@ -39,7 +39,7 @@
</a>
</div>
<div class="media-body">
<div class="base03-border usercard" v-if="userExpanded">
<div class="usercard" v-if="userExpanded">
<user-card-content :user="status.user" :switcher="false"></user-card-content>
</div>
<div class="user-content">
@ -75,15 +75,15 @@
</h4>
</div>
<div class="heading-icons">
<a href="#" @click.prevent="toggleMute" v-if="unmuted"><i class="base09 icon-eye-off"></i></a>
<a :href="status.external_url" target="_blank" v-if="!status.is_local" class="source_url"><i class="base09 icon-binoculars"></i></a>
<a href="#" @click.prevent="toggleMute" v-if="unmuted"><i class="icon-eye-off"></i></a>
<a :href="status.external_url" target="_blank" v-if="!status.is_local" class="source_url"><i class="icon-binoculars"></i></a>
<template v-if="expandable">
<a href="#" @click.prevent="toggleExpanded" class="expand"><i class="base09 icon-plus-squared"></i></a>
<a href="#" @click.prevent="toggleExpanded" class="expand"><i class="icon-plus-squared"></i></a>
</template>
</div>
</div>
<div class="status-preview base00-background base03-border" v-if="showPreview && preview">
<div class="status-preview" v-if="showPreview && preview">
<StillImage class="avatar" :src="preview.user.profile_image_url_original"/>
<div class="text">
<h4>
@ -93,8 +93,8 @@
<div @click.prevent="linkClicked" class="status-content" v-html="preview.statusnet_html"></div>
</div>
</div>
<div class="status-preview status-preview-loading base00-background base03-border" v-else-if="showPreview">
<i class="base09 icon-spin4 animate-spin"></i>
<div class="status-preview status-preview-loading" v-else-if="showPreview">
<i class="icon-spin4 animate-spin"></i>
</div>
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
@ -108,7 +108,7 @@
<div class='status-actions'>
<div v-if="loggedIn">
<a href="#" v-on:click.prevent="toggleReplying">
<i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
<i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
@ -117,7 +117,7 @@
</div>
</div>
</div>
<div class="status base00-background container" v-if="replying">
<div class="status container" v-if="replying">
<div class="reply-left"/>
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"/>
</div>
@ -128,18 +128,19 @@
<script src="./status.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
@import '../../_variables.scss';
status-text-container {
status-text-container {
display: block;
}
}
.status-preview {
.status-preview {
position: absolute;
max-width: 34em;
padding: 0.5em;
display: flex;
border-color: inherit;
background-color: var(--bg);
border-color: var(--border);
border-style: solid;
border-width: 1px;
border-radius: 4px;
@ -149,182 +150,198 @@
z-index: 50;
.avatar {
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: 50%;
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: 50%;
}
.text {
h4 {
margin-bottom: 0.4em;
small {
font-weight: lighter;
}
}
padding: 0 0.5em 0.5em 0.5em;
}
}
.status-preview-loading {
.text {
h4 {
margin-bottom: 0.4em;
small {
font-weight: lighter;
}
}
padding: 0 0.5em 0.5em 0.5em;
}
}
.status-preview-loading {
display: block;
font-size: 2em;
min-width: 8em;
text-align: center;
}
}
.status-el {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
border-left-width: 0px;
line-height: 18px;
.status-el {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
border-left-width: 0px;
line-height: 18px;
background-color: var(--bg);
border-color: var(--border);
.timeline & {
&_focused {
background-color: var(--lightBg);
}
.usercard {
border-color: var(--border);
}
.timeline & {
border-bottom-width: 1px;
border-bottom-style: solid;
}
}
.notify {
.avatar {
border-width: 3px;
border-style: solid;
}
}
.notify {
.avatar {
border-width: 3px;
border-style: solid;
}
}
.media-body {
flex: 1;
padding-left: 0.5em;
}
.media-body {
flex: 1;
padding-left: 0.5em;
}
.user-content {
.user-content {
min-height: 52px;
padding-top: 1px;
}
min-height: 52px;
padding-top: 1px;
}
.media-heading {
display: flex;
min-height: 1.4em;
margin-bottom: 0.3em;
.media-heading {
display: flex;
min-height: 1.4em;
margin-bottom: 0.3em;
small {
font-weight: lighter;
}
h4 {
margin-right: 0.4em;
}
.name-and-links {
flex: 1 0;
display: flex;
flex-wrap: wrap;
}
.replies {
flex-basis: 100%;
}
}
small {
font-weight: lighter;
}
h4 {
margin-right: 0.4em;
}
.name-and-links {
flex: 1 0;
display: flex;
flex-wrap: wrap;
}
.replies {
flex-basis: 100%;
}
}
.source_url {
.source_url {
}
}
.expand {
margin-right: -0.3em;
}
.expand {
margin-right: -0.3em;
}
a {
display: inline-block;
word-break: break-all;
}
a {
display: inline-block;
word-break: break-all;
}
.status-content {
margin: 3px 15px 4px 0;
max-height: 400px;
overflow-y: auto;
overflow-x: hidden;
.status-content {
margin: 3px 15px 4px 0;
max-height: 400px;
overflow-y: auto;
overflow-x: hidden;
img, video {
max-width: 100%;
max-height: 400px;
vertical-align: middle;
object-fit: contain;
}
img, video {
max-width: 100%;
max-height: 400px;
vertical-align: middle;
object-fit: contain;
}
blockquote {
margin: 0.2em 0 0.2em 2em;
font-style: italic;
}
}
blockquote {
margin: 0.2em 0 0.2em 2em;
font-style: italic;
}
}
p {
margin: 0;
margin-top: 0.2em;
margin-bottom: 0.5em;
}
p {
margin: 0;
margin-top: 0.2em;
margin-bottom: 0.5em;
}
.media-left {
.media-left {
margin: 0.2em 0.3em 0 0;
.avatar {
float: right;
float: right;
border-radius: 5px;
}
}
}
.retweet-info {
padding: 0.7em 0 0 0.6em;
.retweet-info {
padding: 0.7em 0 0 0.6em;
.media-left {
display: flex;
.media-left {
display: flex;
i {
align-self: center;
text-align: right;
flex: 1;
padding-right: 0.3em;
}
}
}
}
i {
align-self: center;
text-align: right;
flex: 1;
padding-right: 0.3em;
}
}
}
.status-fadein {
animation-duration: 0.5s;
animation-name: fadein;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
}
.greentext {
color: green;
}
.status-fadein {
animation-duration: 0.5s;
animation-name: fadein;
}
.status-conversation {
border-left-style: solid;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.status-actions {
padding-top: 0.15em;
width: 100%;
display: flex;
.greentext {
color: green;
}
div, favorite-button {
.status-conversation {
border-left-style: solid;
}
.status-actions {
padding-top: 0.15em;
width: 100%;
display: flex;
div, favorite-button {
max-width: 6em;
flex: 1;
}
}
}
}
.icon-reply:hover {
color: $blue;
.icon-reply:hover {
color: $blue_;
color: var(--cBlue);
}
.icon-reply.icon-reply-active {
color: $blue;
color: $blue_;
color: var(--cBlue);
}
.status .avatar {
@ -373,7 +390,7 @@
.status {
padding: 0.4em 0.7em 0.45em 0.7em;
border-left: 4px rgba(255, 48, 16, 0.65);
border-left: 4px var(--cRed);
border-left-style: inherit;
}

View File

@ -21,10 +21,10 @@ export default {
})
},
mounted () {
this.bgColorLocal = rgbstr2hex(this.$store.state.config.colors['base00'])
this.fgColorLocal = rgbstr2hex(this.$store.state.config.colors['base02'])
this.textColorLocal = rgbstr2hex(this.$store.state.config.colors['base05'])
this.linkColorLocal = rgbstr2hex(this.$store.state.config.colors['base08'])
this.bgColorLocal = rgbstr2hex(this.$store.state.config.colors.bg)
this.fgColorLocal = rgbstr2hex(this.$store.state.config.colors.lightBg)
this.textColorLocal = rgbstr2hex(this.$store.state.config.colors.fg)
this.linkColorLocal = rgbstr2hex(this.$store.state.config.colors.link)
},
methods: {
setCustomTheme () {

View File

@ -7,22 +7,22 @@
<p>{{$t('settings.theme_help')}}</p>
<div class="color-container">
<div class="color-item">
<label for="bgcolor" class="base04 theme-color-lb">{{$t('settings.background')}}</label>
<label for="bgcolor" class="theme-color-lb">{{$t('settings.background')}}</label>
<input id="bgcolor" class="theme-color-cl" type="color" v-model="bgColorLocal">
<input id="bgcolor-t" class="theme-color-in" type="text" v-model="bgColorLocal">
</div>
<div class="color-item">
<label for="fgcolor" class="base04 theme-color-lb">{{$t('settings.foreground')}}</label>
<label for="fgcolor" class="theme-color-lb">{{$t('settings.foreground')}}</label>
<input id="fgcolor" class="theme-color-cl" type="color" v-model="fgColorLocal">
<input id="fgcolor-t" class="theme-color-in" type="text" v-model="fgColorLocal">
</div>
<div class="color-item">
<label for="textcolor" class="base04 theme-color-lb">{{$t('settings.text')}}</label>
<label for="textcolor" class="theme-color-lb">{{$t('settings.text')}}</label>
<input id="textcolor" class="theme-color-cl" type="color" v-model="textColorLocal">
<input id="textcolor-t" class="theme-color-in" type="text" v-model="textColorLocal">
</div>
<div class="color-item">
<label for="linkcolor" class="base04 theme-color-lb">{{$t('settings.links')}}</label>
<label for="linkcolor" class="theme-color-lb">{{$t('settings.links')}}</label>
<input id="linkcolor" class="theme-color-cl" type="color" v-model="linkColorLocal">
<input id="linkcolor-t" class="theme-color-in" type="text" v-model="linkColorLocal">
</div>
@ -40,7 +40,7 @@
</div>
</div>
</div>
<button class="btn base02-background base04" @click="setCustomTheme">{{$t('general.apply')}}</button>
<button class="btn" @click="setCustomTheme">{{$t('general.apply')}}</button>
</div>
</template>
@ -63,6 +63,10 @@
flex: 1 1 0;
align-items: baseline;
margin: 5px 6px 5px 0;
label {
color: var(--faint);
}
}
.theme-color-cl,
.theme-color-in {

View File

@ -1,48 +1,48 @@
<template>
<div class="timeline panel panel-default" v-if="viewing == 'statuses'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="panel-heading timeline-heading">
<div class="title">
{{title}}
</div>
<button @click.prevent="showNewStatuses" class="base05 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError">
<button @click.prevent="showNewStatuses" class="loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError">
{{$t('timeline.show_new')}}{{newStatusCountStr}}
</button>
<div @click.prevent class="base06 error loadmore-text" v-if="timelineError">
<div @click.prevent class="loadmore-text" v-if="timelineError">
{{$t('timeline.error_fetching')}}
</div>
<div @click.prevent class="base04 base02-background loadmore-text" v-if="!timeline.newStatusCount > 0 && !timelineError">
<div @click.prevent class="loadmore-text" v-if="!timeline.newStatusCount > 0 && !timelineError">
{{$t('timeline.up_to_date')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="panel-body">
<div class="timeline">
<status-or-conversation v-for="status in timeline.visibleStatuses" :key="status.id" v-bind:statusoid="status"></status-or-conversation>
<a href="#" v-on:click.prevent='fetchOlderStatuses()' v-if="!timeline.loading">
<div class="base02-background base03-border new-status-notification text-center">{{$t('timeline.load_older')}}</div>
<div class="new-status-notification text-center">{{$t('timeline.load_older')}}</div>
</a>
<div class="base02-background base03-border new-status-notification text-center" v-else>...</div>
<div class="new-status-notification text-center" v-else>...</div>
</div>
</div>
</div>
<div class="timeline panel panel-default" v-else-if="viewing == 'followers'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="panel-heading timeline-heading">
<div class="title">
{{$t('user_card.followers')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="panel-body">
<div class="timeline">
<user-card v-for="follower in followers" :key="follower.id" :user="follower" :showFollows="false"></user-card>
</div>
</div>
</div>
<div class="timeline panel panel-default" v-else-if="viewing == 'friends'">
<div class="panel-heading timeline-heading base02-background base04">
<div class="panel-heading timeline-heading">
<div class="title">
{{$t('user_card.followees')}}
</div>
</div>
<div class="panel-body base01-background">
<div class="panel-body">
<div class="timeline">
<user-card v-for="friend in friends" :key="friend.id" :user="friend" :showFollows="true"></user-card>
</div>
@ -79,13 +79,16 @@
font-size: 14px;
min-width: 6em;
border-radius: 5px;
background-color: transparent;
color: var(--faint);
font-family: sans-serif;
text-align: center;
padding: 0 0.5em 0 0.5em;
opacity: 0.8;
}
.error {
background-color: rgba(255, 48, 16, 0.65);
color: var(--lightFg);
background-color: var(--cRed);
}
}
@ -96,6 +99,7 @@
border-width: 1px 0 0 0;
border-style: solid;
border-radius: 0 0 10px 10px;
border-color: var(--border);
padding: 10px;
z-index: 1;
}

View File

@ -1,5 +1,5 @@
<template>
<div class="card base00-background">
<div class="card">
<a href="#">
<img @click.prevent="toggleUserExpanded" class="avatar" :src="user.profile_image_url">
</a>
@ -21,24 +21,24 @@
<script src="./user_card.js"></script>
<style lang="scss">
.name-and-screen-name {
.name-and-screen-name {
margin-left: 0.7em;
margin-top:0.0em;
margin-right: 2em;
text-align: left;
width: 100%;
}
}
.follows-you {
.follows-you {
margin-left: 2em;
float: right;
}
}
.follows {
.follows {
}
}
.card {
.card {
display: flex;
flex: 1 0;
padding-top: 0.6em;
@ -47,18 +47,17 @@
padding-left: 1em;
border-bottom: 1px solid;
margin: 0;
border-bottom-color: inherit;
border-bottom-color: var(--border);
.avatar {
margin-top: 0.2em;
width:32px;
height: 32px;
border-radius: 50%;
margin-top: 0.2em;
width:32px;
height: 32px;
border-radius: 50%;
}
}
}
.usercard {
.usercard {
width: fill-available;
margin: 0.2em 0 0.7em 0;
border-radius: 10px;
@ -67,6 +66,9 @@
border-width: 1px;
overflow: hidden;
.panel-heading {
background: transparent;
}
p {
margin-bottom: 0;
}

View File

@ -5,7 +5,7 @@ export default {
props: [ 'user', 'switcher' ],
computed: {
headingStyle () {
const color = this.$store.state.config.colors['base00']
const color = this.$store.state.config.colors.bg
if (color) {
const rgb = hex2rgb(color)
console.log(rgb)
@ -17,7 +17,7 @@ export default {
},
bodyStyle () {
return {
background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors['base00']} 80%)`
background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors.bg} 80%)`
}
},
isOtherUser () {

View File

@ -18,30 +18,30 @@
</div>
</div>
<div v-if="isOtherUser" class="user-interactions">
<div v-if="user.follows_you && loggedIn" class="following base06">
<div v-if="user.follows_you && loggedIn" class="following">
{{ $t('user_card.follows_you') }}
</div>
<div class="follow" v-if="loggedIn">
<span v-if="user.following">
<!--Following them!-->
<button @click="unfollowUser" class="base04 base00-background pressed">
<button @click="unfollowUser" class="pressed">
{{ $t('user_card.following') }}
</button>
</span>
<span v-if="!user.following">
<button @click="followUser" class="base05 base02-background">
<button @click="followUser">
{{ $t('user_card.follow') }}
</button>
</span>
</div>
<div class='mute' v-if='isOtherUser'>
<span v-if='user.muted'>
<button @click="toggleMute" class="base04 base00-background pressed">
<button @click="toggleMute" class="pressed">
{{ $t('user_card.muted') }}
</button>
</span>
<span v-if='!user.muted'>
<button @click="toggleMute" class="base05 base02-background">
<button @click="toggleMute">
{{ $t('user_card.mute') }}
</button>
</span>
@ -50,19 +50,19 @@
<form method="POST" :action='subscribeUrl'>
<input type="hidden" name="nickname" :value="user.screen_name">
<input type="hidden" name="profile" value="">
<button click="submit" class="remote-button base05 base02-background">
<button click="submit" class="remote-button">
{{ $t('user_card.remote_follow') }}
</button>
</form>
</div>
<div class='block' v-if='isOtherUser && loggedIn'>
<span v-if='user.statusnet_blocking'>
<button @click="unblockUser" class="base04 base00-background pressed">
<button @click="unblockUser" class="pressed">
{{ $t('user_card.blocked') }}
</button>
</span>
<span v-if='!user.statusnet_blocking'>
<button @click="blockUser" class="base05 base02-background">
<button @click="blockUser">
{{ $t('user_card.block') }}
</button>
</span>
@ -73,19 +73,19 @@
<div class="panel-body profile-panel-body" :style="bodyStyle">
<div class="user-counts">
<div class="user-count">
<a href="#" v-on:click.prevent="setProfileView('statuses')" v-if="switcher"><h5 class="base05">{{ $t('user_card.statuses') }}</h5></a>
<a href="#" v-on:click.prevent="setProfileView('statuses')" v-if="switcher"><h5>{{ $t('user_card.statuses') }}</h5></a>
<h5 v-else>{{ $t('user_card.statuses') }}</h5>
<span class="base05">{{user.statuses_count}} <br><span class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span></span>
<span>{{user.statuses_count}} <br><span class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span></span>
</div>
<div class="user-count">
<a href="#" v-on:click.prevent="setProfileView('friends')" v-if="switcher"><h5 class="base05">{{ $t('user_card.followees') }}</h5></a>
<a href="#" v-on:click.prevent="setProfileView('friends')" v-if="switcher"><h5>{{ $t('user_card.followees') }}</h5></a>
<h5 v-else>{{ $t('user_card.followees') }}</h5>
<span class="base05">{{user.friends_count}}</span>
<span>{{user.friends_count}}</span>
</div>
<div class="user-count">
<a href="#" v-on:click.prevent="setProfileView('followers')" v-if="switcher"><h5 class="base05">{{ $t('user_card.followers') }}</h5></a>
<a href="#" v-on:click.prevent="setProfileView('followers')" v-if="switcher"><h5>{{ $t('user_card.followers') }}</h5></a>
<h5 v-else>{{ $t('user_card.followers') }}</h5>
<span class="base05">{{user.followers_count}}</span>
<span>{{user.followers_count}}</span>
</div>
</div>
<p>{{user.description}}</p>

View File

@ -1,13 +1,13 @@
<template>
<span class="user-finder-container">
<span class="finder-error base05" v-if="error">
<span class="finder-error" v-if="error">
<i class="icon-cancel user-finder-icon" @click="dismissError"/>
{{$t('finder.error_fetching_user')}}
</span>
<i class="icon-spin4 user-finder-icon animate-spin-slow" v-if="loading" />
<a href="#" v-if="hidden"><i class="icon-user-plus user-finder-icon" @click.prevent.stop="toggleHidden"/></a>
<span v-else>
<input class="user-finder-input base03-border" @keyup.enter="findUser(username)" v-model="username" :placeholder="$t('finder.find_user')" id="user-finder-input" type="text"/>
<input class="user-finder-input" @keyup.enter="findUser(username)" v-model="username" :placeholder="$t('finder.find_user')" id="user-finder-input" type="text"/>
<i class="icon-cancel user-finder-icon" @click.prevent.stop="toggleHidden"/>
</span>
</span>
@ -25,9 +25,6 @@
}
.user-finder-input {
border-width: 1px;
border-style: solid;
border-color: inherit;
border-radius: 5px;
max-width: 80%;
padding: 0.1em 0.2em 0.2em 0.2em;
@ -38,5 +35,6 @@
margin: 0.35em;
border-radius: 5px;
padding: 0.25em;
color: var(--faint);
}
</style>

View File

@ -2,7 +2,7 @@
<div class="user-panel">
<div v-if='user' class="panel panel-default" style="overflow: visible;">
<user-card-content :user="user" :switcher="false"></user-card-content>
<div class="panel-footer base00-background">
<div class="panel-footer">
<post-status-form v-if='user'></post-status-form>
</div>
</div>
@ -11,3 +11,11 @@
</template>
<script src="./user_panel.js"></script>
<style lang="scss">
.user-panel {
.panel-heading {
background: transparent;
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div>
<div v-if="user" class="user-profile panel panel-default base00-background">
<div v-if="user" class="user-profile panel panel-default">
<user-card-content :user="user" :switcher="true"></user-card-content>
</div>
<Timeline :title="$t('user_profile.timeline_title')" :timeline="timeline" :timeline-name="'user'" :user-id="userId"/>
@ -16,6 +16,9 @@
flex-basis: 500px;
padding-bottom: 10px;
border-radius: 10px;
.panel-heading {
background: transparent;
}
}
</style>

View File

@ -1,16 +1,16 @@
<template>
<div class="settings panel panel-default base00-background">
<div class="panel-heading base02-background base04">
<div class="settings panel panel-default">
<div class="panel-heading">
{{$t('settings.user_settings')}}
</div>
<div class="panel-body profile-edit">
<div class="setting-item">
<h3>{{$t('settings.name_bio')}}</h3>
<p>{{$t('settings.name')}}</p>
<input class='name-changer base03-border' id='username' v-model="newname"></input>
<input class='name-changer' id='username' v-model="newname"></input>
<p>{{$t('settings.bio')}}</p>
<textarea class="bio base03-border" v-model="newbio"></textarea>
<button :disabled='newname.length <= 0' class="btn btn-default base05 base02-background" @click="updateProfile">{{$t('general.submit')}}</button>
<textarea class="bio" v-model="newbio"></textarea>
<button :disabled='newname.length <= 0' class="btn btn-default" @click="updateProfile">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.avatar')}}</h3>
@ -22,8 +22,8 @@
<div>
<input type="file" @change="uploadFile(0, $event)" ></input>
</div>
<i class="base09 icon-spin4 animate-spin" v-if="uploading[0]"></i>
<button class="btn btn-default base05 base02-background" v-else-if="previews[0]" @click="submitAvatar">{{$t('general.submit')}}</button>
<i class="icon-spin4 animate-spin" v-if="uploading[0]"></i>
<button class="btn btn-default" v-else-if="previews[0]" @click="submitAvatar">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.profile_banner')}}</h3>
@ -35,8 +35,8 @@
<div>
<input type="file" @change="uploadFile(1, $event)" ></input>
</div>
<i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[1]"></i>
<button class="btn btn-default base05 base02-background" v-else-if="previews[1]" @click="submitBanner">{{$t('general.submit')}}</button>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[1]"></i>
<button class="btn btn-default" v-else-if="previews[1]" @click="submitBanner">{{$t('general.submit')}}</button>
</div>
<div class="setting-item">
<h3>{{$t('settings.profile_background')}}</h3>
@ -46,8 +46,8 @@
<div>
<input type="file" @change="uploadFile(2, $event)" ></input>
</div>
<i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[2]"></i>
<button class="btn btn-default base05 base02-background" v-else-if="previews[2]" @click="submitBg">{{$t('general.submit')}}</button>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[2]"></i>
<button class="btn btn-default" v-else-if="previews[2]" @click="submitBg">{{$t('general.submit')}}</button>
</div>
<div class="setting-item" v-if="pleromaBackend">
<h3>{{$t('settings.follow_import')}}</h3>
@ -55,8 +55,8 @@
<form v-model="followImportForm">
<input type="file" ref="followlist" v-on:change="followListChange"></input>
</form>
<i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[3]"></i>
<button class="btn btn-default base05 base02-background" v-else @click="importFollows">{{$t('general.submit')}}</button>
<i class=" icon-spin4 animate-spin uploading" v-if="uploading[3]"></i>
<button class="btn btn-default" v-else @click="importFollows">{{$t('general.submit')}}</button>
<div v-if="followsImported">
<i class="icon-cross" @click="dismissImported"></i>
<p>{{$t('settings.follows_imported')}}</p>
@ -76,8 +76,6 @@
<style lang="scss">
.profile-edit {
.name-changer {
border-width: 1px;
border-style: solid;
border-radius: 5px;
padding: 0.2em 0.2em 0.2em 0.2em;
}
@ -85,11 +83,15 @@
padding: 0.2em 0.5em 0.2em 0.5em;
}
.bio {
border-width: 1px;
border-style: solid;
border-radius: 5px;
margin: 0;
}
input[type=file] {
padding: 5px;
border-radius: 5px;
}
.banner {
max-width: 400px;
border-radius: 5px;

View File

@ -45,12 +45,10 @@ const setStyle = (href, commit) => {
const styleEl = document.createElement('style')
head.appendChild(styleEl)
const styleSheet = styleEl.sheet
// const styleSheet = styleEl.sheet
styleSheet.insertRule(`a { color: ${colors['base08']}`, 'index-max')
styleSheet.insertRule(`body { color: ${colors['base05']}`, 'index-max')
styleSheet.insertRule(`.base05-border { border-color: ${colors['base05']}`, 'index-max')
styleSheet.insertRule(`.base03-border { border-color: ${colors['base03']}`, 'index-max')
// styleSheet.insertRule(`a { color: ${colors['base08']}`, 'index-max')
// styleSheet.insertRule(`body { color: ${colors['base05']}`, 'index-max')
body.style.display = 'initial'
}
@ -74,28 +72,30 @@ const setColors = (col, commit) => {
mod = mod * -1
}
colors['base00'] = rgb2hex(col.bg.r, col.bg.g, col.bg.b) // background
colors['base01'] = rgb2hex((col.bg.r + col.fg.r) / 2, (col.bg.g + col.fg.g) / 2, (col.bg.b + col.fg.b) / 2) // hilighted bg
colors['base02'] = rgb2hex(col.fg.r, col.fg.g, col.fg.b) // panels & buttons
colors['base03'] = rgb2hex(col.fg.r - mod, col.fg.g - mod, col.fg.b - mod) // borders
colors['base04'] = rgb2hex(col.text.r + mod * 2, col.text.g + mod * 2, col.text.b + mod * 2) // faint text
colors['base05'] = rgb2hex(col.text.r, col.text.g, col.text.b) // text
colors['base06'] = rgb2hex(col.text.r - mod, col.text.g - mod, col.text.b - mod) // strong text
colors.bg = rgb2hex(col.bg.r, col.bg.g, col.bg.b) // background
colors.lightBg = rgb2hex((col.bg.r + col.fg.r) / 2, (col.bg.g + col.fg.g) / 2, (col.bg.b + col.fg.b) / 2) // hilighted bg
colors.btn = rgb2hex(col.fg.r, col.fg.g, col.fg.b) // panels & buttons
colors.border = rgb2hex(col.fg.r - mod, col.fg.g - mod, col.fg.b - mod) // borders
colors.faint = rgb2hex(col.text.r + mod * 2, col.text.g + mod * 2, col.text.b + mod * 2) // faint text
colors.fg = rgb2hex(col.text.r, col.text.g, col.text.b) // text
colors.lightFg = rgb2hex(col.text.r - mod, col.text.g - mod, col.text.b - mod) // strong text
colors['base07'] = rgb2hex(col.text.r - mod * 2, col.text.g - mod * 2, col.text.b - mod * 2)
colors['base08'] = rgb2hex(col.link.r, col.link.g, col.link.b) // links
colors['base09'] = rgb2hex((col.bg.r + col.text.r) / 2, (col.bg.g + col.text.g) / 2, (col.bg.b + col.text.b) / 2) // icons
colors.link = rgb2hex(col.link.r, col.link.g, col.link.b) // links
colors.icon = rgb2hex((col.bg.r + col.text.r) / 2, (col.bg.g + col.text.g) / 2, (col.bg.b + col.text.b) / 2) // icons
colors.cBlue = 'blue'
colors.cRed = 'red'
colors.cGreen = 'green'
colors.cYellow = 'yellow'
colors.cOrange = 'orange'
const num = 10
times(num, (n) => {
const color = colors[`base0${num - 1 - n}`]
styleSheet.insertRule(`.base0${num - 1 - n} { color: ${color}`, 'index-max')
styleSheet.insertRule(`.base0${num - 1 - n}-background { background-color: ${color}`, 'index-max')
const colorVars = Object.entries(colors).map(([k, v]) => {
return `--${k}: ${v}`
})
console.log(colorVars)
styleSheet.insertRule(`a { color: ${colors['base08']}`, 'index-max')
styleSheet.insertRule(`body { color: ${colors['base05']}`, 'index-max')
styleSheet.insertRule(`.base05-border { border-color: ${colors['base05']}`, 'index-max')
styleSheet.insertRule(`.base03-border { border-color: ${colors['base03']}`, 'index-max')
styleSheet.insertRule(`body { ${colorVars.join(';')} }`, 'index-max')
// styleSheet.insertRule(`.base05-border { border-color: ${colors['base05']}`, 'index-max')
// styleSheet.insertRule(`.base03-border { border-color: ${colors['base03']}`, 'index-max')
body.style.display = 'initial'
commit('setOption', { name: 'colors', value: colors })