mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-12 18:12:48 +00:00
client - forum page now responsive - other adjustments as well
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@import '../../scss/mixins';
|
||||
|
||||
.topic-bg {
|
||||
background-image: url('../../assets/topic-bg.gif');
|
||||
background-repeat: repeat-x;
|
||||
@@ -63,16 +65,27 @@
|
||||
padding: 4px;
|
||||
width: 150px;
|
||||
border-right: 1px solid #000000;
|
||||
|
||||
@include breakpoint(mediumOrLess) {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 26px;
|
||||
border-bottom: 1px solid #000000;
|
||||
padding: 3px 6px;
|
||||
|
||||
@include breakpoint(mediumOrLess) {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 26px;
|
||||
border-bottom: 1px solid #000000;
|
||||
padding: 0 6px;
|
||||
color: white;
|
||||
justify-content: space-between;
|
||||
|
||||
&__button {
|
||||
cursor: pointer;
|
||||
@@ -80,6 +93,11 @@
|
||||
& + & {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
@include breakpoint(mediumOrLess) {
|
||||
width: 50px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,4 +116,5 @@
|
||||
.character-name {
|
||||
color: #FFAC04;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ export class Thread extends React.Component<Props, State> {
|
||||
renderUserInfo(reply: ReplyModel) {
|
||||
const { battletag, character_avatar, character_class, character_guild, character_name, character_realm, permissions } = reply.user;
|
||||
return (
|
||||
<div className="reply__user-container">
|
||||
<div className="reply__user-container hide-tiny">
|
||||
<Portrait imageSrc={CharacterService.getAvatar(character_avatar)}/>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div className="character-name">{character_name || battletag}</div>
|
||||
@@ -162,6 +162,18 @@ export class Thread extends React.Component<Props, State> {
|
||||
);
|
||||
}
|
||||
|
||||
renderUserInfoTiny(reply: ReplyModel) {
|
||||
const { battletag, character_class, character_guild, character_name, character_realm, permissions } = reply.user;
|
||||
|
||||
return (
|
||||
<div className="reply__header hide-large">
|
||||
<div className="character-name" style={{ paddingRight: '4px' }}>{character_name || battletag } -</div>
|
||||
{permissions === 'admin' && <div className="blue">Admin Poster</div>}
|
||||
{[character_class, character_guild, character_realm].filter(val => !!val).join(' - ')}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
renderEditbutton(reply: ReplyModel): any {
|
||||
if (get(this.props, 'userStore.user.id') === reply.user_id) {
|
||||
return <a style={{ paddingRight: '10px' }} onClick={() => this.onEditClick(reply)}>Edit</a>;
|
||||
@@ -189,7 +201,9 @@ export class Thread extends React.Component<Props, State> {
|
||||
{this.renderUserInfo(reply)}
|
||||
<div className="flex-1">
|
||||
|
||||
<div className="reply__title">
|
||||
{this.renderUserInfoTiny(reply)}
|
||||
|
||||
<div className="reply__title reply__header">
|
||||
<div>
|
||||
<b>{`${reply.index! + 1}. `}{index > 0 && 'Re: '}{this.state.thread!.title}</b>
|
||||
<small style={{ paddingLeft: '5px' }}>| {this.getTimeFormat(reply.inserted_at)}</small>
|
||||
@@ -252,8 +266,7 @@ export class Thread extends React.Component<Props, State> {
|
||||
<div className="threadTopic-container">
|
||||
<div className="threadTopic">
|
||||
{thread.sticky && <img src={require('../../assets/sticky.gif')} style={{ marginRight: '5px' }}/>}
|
||||
<b>Topic: </b>
|
||||
<small style={{ paddingLeft: '15px', color: 'white' }}>| {this.getTimeFormat(thread!.inserted_at)}</small>
|
||||
<small style={{ color: 'white' }}>{this.getTimeFormat(thread!.inserted_at)}</small>
|
||||
</div>
|
||||
</div>
|
||||
<img src={require('../../assets/forum-index.gif')}
|
||||
|
||||
Reference in New Issue
Block a user