mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Refactor CSS pt. 1 (remove custom css in favour of Bootstrap's)
This commit is contained in:
@@ -74,7 +74,7 @@ class BoardP extends React.Component<Props> {
|
|||||||
const { filters } = posts;
|
const { filters } = posts;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="boardContainer">
|
<div className="boardContainer d-flex justify-content-between align-items-start">
|
||||||
<div className="sidebar">
|
<div className="sidebar">
|
||||||
<NewPost
|
<NewPost
|
||||||
board={board}
|
board={board}
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ import * as React from 'react';
|
|||||||
|
|
||||||
import NewPostForm from './NewPostForm';
|
import NewPostForm from './NewPostForm';
|
||||||
import Spinner from '../shared/Spinner';
|
import Spinner from '../shared/Spinner';
|
||||||
|
import {
|
||||||
|
TitleText,
|
||||||
|
MutedText,
|
||||||
|
DangerText,
|
||||||
|
SuccessText,
|
||||||
|
} from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IBoard from '../../interfaces/IBoard';
|
import IBoard from '../../interfaces/IBoard';
|
||||||
|
|
||||||
@@ -134,14 +140,14 @@ class NewPost extends React.Component<Props, State> {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="box sidebar-box newBoardContainer">
|
<div className="newBoardContainer sidebarBox">
|
||||||
<span className="boardName">{board.name}</span>
|
<TitleText>{board.name}</TitleText>
|
||||||
<span className="boardDescription">{board.description}</span>
|
<MutedText>{board.description}</MutedText>
|
||||||
{
|
{
|
||||||
isLoggedIn ?
|
isLoggedIn ?
|
||||||
<button
|
<button
|
||||||
onClick={this.toggleForm}
|
onClick={this.toggleForm}
|
||||||
className={`submitBtn btn btn-${showForm ? 'outline-' : ''}dark`}>
|
className={`submitBtn btn btn-${showForm ? 'outline-' : ''}dark my-2`}>
|
||||||
{ showForm ? 'Cancel' : 'Submit feedback' }
|
{ showForm ? 'Cancel' : 'Submit feedback' }
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
@@ -164,8 +170,8 @@ class NewPost extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ isLoading ? <Spinner /> : null }
|
{ isLoading ? <Spinner /> : null }
|
||||||
{ error ? <span className="error">{error}</span> : null }
|
{ error ? <DangerText>{error}</DangerText> : null }
|
||||||
{ success ? <span className="success">{success}</span> : null }
|
{ success ? <SuccessText>{success}</SuccessText> : null }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import InfiniteScroll from 'react-infinite-scroller';
|
|||||||
|
|
||||||
import PostListItem from './PostListItem';
|
import PostListItem from './PostListItem';
|
||||||
import Spinner from '../shared/Spinner';
|
import Spinner from '../shared/Spinner';
|
||||||
|
import {
|
||||||
|
DangerText,
|
||||||
|
MutedText,
|
||||||
|
} from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IPost from '../../interfaces/IPost';
|
import IPost from '../../interfaces/IPost';
|
||||||
import IPostStatus from '../../interfaces/IPostStatus';
|
import IPostStatus from '../../interfaces/IPostStatus';
|
||||||
@@ -28,8 +32,8 @@ const PostList = ({
|
|||||||
page,
|
page,
|
||||||
hasMore
|
hasMore
|
||||||
}: Props) => (
|
}: Props) => (
|
||||||
<div className="box postList">
|
<div className="postList d-flex flex-column flex-grow-1">
|
||||||
{ error ? <span className="error">{error}</span> : null }
|
{ error ? <DangerText>{error}</DangerText> : null }
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
initialLoad={false}
|
initialLoad={false}
|
||||||
loadMore={handleLoadMore}
|
loadMore={handleLoadMore}
|
||||||
@@ -52,9 +56,9 @@ const PostList = ({
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
areLoading ?
|
areLoading ?
|
||||||
<span className="infoText">Loading...</span>
|
<MutedText>Loading...</MutedText>
|
||||||
:
|
:
|
||||||
<span className="infoText text-muted">There are no posts.</span>
|
<MutedText>There are no posts.</MutedText>
|
||||||
}
|
}
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
|
import CommentsNumber from '../shared/CommentsNumber';
|
||||||
import PostStatusLabel from '../shared/PostStatusLabel';
|
import PostStatusLabel from '../shared/PostStatusLabel';
|
||||||
|
import { TitleText, DescriptionText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IPostStatus from '../../interfaces/IPostStatus';
|
import IPostStatus from '../../interfaces/IPostStatus';
|
||||||
|
|
||||||
@@ -13,21 +15,12 @@ interface Props {
|
|||||||
|
|
||||||
const PostListItem = ({ id, title, description, postStatus}: Props) => (
|
const PostListItem = ({ id, title, description, postStatus}: Props) => (
|
||||||
<a href={`/posts/${id}`} className="postLink">
|
<a href={`/posts/${id}`} className="postLink">
|
||||||
<div className="postListItem">
|
<div className="postListItem d-flex flex-column justify-content-between m-0 px-2 py-1">
|
||||||
<div className="postTitle">{title}</div>
|
<TitleText>{title}</TitleText>
|
||||||
<div className="postDescription">
|
<DescriptionText limit={120}>{description}</DescriptionText>
|
||||||
{
|
|
||||||
description && description.length > 120 ?
|
<div className="postDetails d-flex justify-content-between text-uppercase">
|
||||||
description.slice(0, 119) + '...'
|
<CommentsNumber number={0} />
|
||||||
:
|
|
||||||
description || '<No description provided.>'
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
<div className="postDetails">
|
|
||||||
<div className="postDetailsComments">
|
|
||||||
<span className="comment icon"></span>
|
|
||||||
<span>0 comments</span>
|
|
||||||
</div>
|
|
||||||
{ postStatus ? <PostStatusLabel {...postStatus} /> : null }
|
{ postStatus ? <PostStatusLabel {...postStatus} /> : null }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|||||||
|
|
||||||
import PostStatusListItem from './PostStatusListItem';
|
import PostStatusListItem from './PostStatusListItem';
|
||||||
import Spinner from '../shared/Spinner';
|
import Spinner from '../shared/Spinner';
|
||||||
|
import { TitleText, DangerText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IPostStatus from '../../interfaces/IPostStatus';
|
import IPostStatus from '../../interfaces/IPostStatus';
|
||||||
|
|
||||||
@@ -22,8 +23,8 @@ const PostStatusFilter = ({
|
|||||||
handleFilterClick,
|
handleFilterClick,
|
||||||
currentFilter,
|
currentFilter,
|
||||||
}: Props) => (
|
}: Props) => (
|
||||||
<div className="box sidebar-box postStatusFilterContainer">
|
<div className="postStatusFilterContainer sidebarBox">
|
||||||
<span className="smallTitle">Filter by post status:</span>
|
<TitleText>Filter by post status:</TitleText>
|
||||||
{
|
{
|
||||||
postStatuses.map((postStatus, i) => (
|
postStatuses.map((postStatus, i) => (
|
||||||
<PostStatusListItem
|
<PostStatusListItem
|
||||||
@@ -39,7 +40,7 @@ const PostStatusFilter = ({
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
{ areLoading ? <Spinner /> : null }
|
{ areLoading ? <Spinner /> : null }
|
||||||
{ error ? <span className="error">{error}</span> : null }
|
{ error ? <DangerText>{error}</DangerText> : null }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,20 @@ const PostStatusListItem = ({
|
|||||||
isCurrentFilter,
|
isCurrentFilter,
|
||||||
handleResetFilter,
|
handleResetFilter,
|
||||||
}: Props) => (
|
}: Props) => (
|
||||||
<div className={"postStatusListItemContainer " + `postStatus${name.replace(/ /g, '')}`}>
|
<div className={
|
||||||
<a onClick={handleClick} className="postStatusListItemLink">
|
"postStatusListItemContainer " + `postStatus${name.replace(/ /g, '')} d-flex align-self-stretch`
|
||||||
<div className="postStatusListItem">
|
}>
|
||||||
|
<a onClick={handleClick} className="postStatusListItemLink flex-grow-1">
|
||||||
|
<div className="postStatusListItem p-1">
|
||||||
<PostStatusLabel id={undefined} name={name} color={color} />
|
<PostStatusLabel id={undefined} name={name} color={color} />
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{
|
{
|
||||||
isCurrentFilter ?
|
isCurrentFilter ?
|
||||||
<button onClick={handleResetFilter} className="btn btn-outline-dark resetFilter">X</button> : null
|
<button onClick={handleResetFilter}
|
||||||
|
className="resetFilter btn btn-outline-dark">X</button>
|
||||||
|
:
|
||||||
|
null
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
|
import { TitleText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
searchQuery: string;
|
searchQuery: string;
|
||||||
handleChange(newSearchQuery: string): void;
|
handleChange(newSearchQuery: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SearchFilter = ({ searchQuery, handleChange }: Props) => (
|
const SearchFilter = ({ searchQuery, handleChange }: Props) => (
|
||||||
<div className="box sidebar-box">
|
<div className="sidebarBox">
|
||||||
<label htmlFor="searchPostInput" className="smallTitle">Search:</label>
|
<TitleText>Search:</TitleText>
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
onChange={e => handleChange(e.target.value)}
|
onChange={e => handleChange(e.target.value)}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import PostListItem from './PostListItem';
|
import PostListItem from './PostListItem';
|
||||||
|
import { MutedText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IPostJSON from '../../interfaces/json/IPost';
|
import IPostJSON from '../../interfaces/json/IPost';
|
||||||
import IBoard from '../../interfaces/IBoard';
|
import IBoard from '../../interfaces/IBoard';
|
||||||
@@ -24,7 +25,7 @@ const PostList = ({ posts, boards }: Props) => (
|
|||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
:
|
:
|
||||||
<span className="infoText text-muted">There are no posts that have this status.</span>
|
<MutedText>There are no posts that have this status.</MutedText>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import PostList from './PostList';
|
import PostList from './PostList';
|
||||||
|
import { TitleText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
import IPostStatus from '../../interfaces/IPostStatus';
|
import IPostStatus from '../../interfaces/IPostStatus';
|
||||||
import IPostJSON from '../../interfaces/json/IPost';
|
import IPostJSON from '../../interfaces/json/IPost';
|
||||||
@@ -13,12 +14,13 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const PostListByPostStatus = ({ postStatus, posts, boards }: Props) => (
|
const PostListByPostStatus = ({ postStatus, posts, boards }: Props) => (
|
||||||
<div className="roadmapColumn" style={{borderColor: postStatus.color}}>
|
<div className="roadmapColumn card my-2 px-2" style={{borderColor: postStatus.color}}>
|
||||||
<div className="columnHeader" style={{borderBottomColor: postStatus.color}}>
|
<div className="columnHeader card-header d-flex bg-transparent"
|
||||||
|
style={{borderBottomColor: postStatus.color}}>
|
||||||
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
|
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
|
||||||
<div className="columnTitle">{postStatus.name}</div>
|
<div className="columnTitle"><TitleText>{postStatus.name}</TitleText></div>
|
||||||
</div>
|
</div>
|
||||||
<div className="scrollContainer">
|
<div className="scrollContainer card-body">
|
||||||
<PostList
|
<PostList
|
||||||
posts={posts}
|
posts={posts}
|
||||||
boards={boards}
|
boards={boards}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
|
import { TitleText, UppercaseText } from '../shared/CustomTexts';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -8,9 +10,9 @@ interface Props {
|
|||||||
|
|
||||||
const PostListItem = ({id, title, boardName}: Props) => (
|
const PostListItem = ({id, title, boardName}: Props) => (
|
||||||
<a href={`/posts/${id}`} className="postLink">
|
<a href={`/posts/${id}`} className="postLink">
|
||||||
<div className="postListItem">
|
<div className="postListItem d-flex flex-column my-1 py-2">
|
||||||
<div className="postTitle">{title}</div>
|
<TitleText>{title}</TitleText>
|
||||||
<div className="postBoard">{boardName}</div>
|
<UppercaseText>{boardName}</UppercaseText>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Roadmap extends React.Component<Props> {
|
|||||||
const { postStatuses, posts, boards } = this.props;
|
const { postStatuses, posts, boards } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="roadmapColumns">
|
<div className="roadmapColumns d-flex justify-content-between flex-wrap">
|
||||||
{postStatuses.map((postStatus, i) => (
|
{postStatuses.map((postStatus, i) => (
|
||||||
<PostListByPostStatus
|
<PostListByPostStatus
|
||||||
postStatus={postStatus}
|
postStatus={postStatus}
|
||||||
@@ -34,4 +34,4 @@ class Roadmap extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Roadmap;
|
export default Roadmap;
|
||||||
14
app/javascript/components/shared/CommentsNumber.tsx
Normal file
14
app/javascript/components/shared/CommentsNumber.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
number: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const CommentsNumber = ({ number }: Props) => (
|
||||||
|
<div className="d-flex">
|
||||||
|
<span className="comment icon"></span>
|
||||||
|
<span>{`${number} comment${number === 1 ? '' : 's'}`}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default CommentsNumber;
|
||||||
41
app/javascript/components/shared/CustomTexts.tsx
Normal file
41
app/javascript/components/shared/CustomTexts.tsx
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DescriptionTextProps {
|
||||||
|
children: string;
|
||||||
|
limit?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TitleText = ({ children }: Props) => (
|
||||||
|
<span className="text-dark font-weight-bolder">{children}</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const MutedText = ({ children }: Props) => (
|
||||||
|
<span className="text-muted text-center">{children}</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const UppercaseText = ({ children }: Props) => (
|
||||||
|
<span className="text-secondary text-uppercase font-weight-lighter">{children}</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const SuccessText = ({ children }: Props) => (
|
||||||
|
<span className="text-success text-center">{children}</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const DangerText = ({ children }: Props) => (
|
||||||
|
<span className="text-danger text-center">{children}</span>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const DescriptionText = ({ children, limit = 90}: DescriptionTextProps) => (
|
||||||
|
<span className="text-muted">
|
||||||
|
{
|
||||||
|
children && children.length > limit ?
|
||||||
|
children.slice(0, limit-1) + '...'
|
||||||
|
:
|
||||||
|
children || '<No description provided>'
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@media (max-width: 800px) {
|
.boardContainer {
|
||||||
.boardContainer {
|
@media (max-width: 800px) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
@@ -7,200 +7,74 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
||||||
.sidebar-box {
|
.sidebarBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 801px) {
|
@media (min-width: 801px) {
|
||||||
.boardContainer {
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
|
|
||||||
.sidebar-box {
|
.sidebarBox {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.boardContainer {
|
.sidebarBox {
|
||||||
display: flex;
|
flex: 0 0 auto;
|
||||||
flex: 1 1 auto;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
.sidebar-box {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
display: flex;
|
||||||
border: 1px solid black;
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
border: thin solid black;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
padding: 8px;
|
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
|
padding: 8px;
|
||||||
.smallTitle {
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.newBoardContainer {
|
.postStatusListItem {
|
||||||
.boardName {
|
height: 40px;
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 600;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.boardDescription {
|
|
||||||
color: grey;
|
|
||||||
font-size: 17px;
|
|
||||||
font-weight: 200;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submitBtn {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.success {
|
|
||||||
color: green;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error {
|
|
||||||
color: red;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.postStatusFilterContainer {
|
&:hover {
|
||||||
.postStatusListItemContainer {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
flex: 1 1 auto;
|
|
||||||
align-self: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postStatusListItemLink {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postStatusListItem {
|
|
||||||
height: 40px;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
font-size: 17px;
|
|
||||||
font-weight: 500;
|
|
||||||
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postStatusListItem:hover {
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.resetFilter {
|
.resetFilter {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.postLink {
|
||||||
|
display: block;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 8px 0;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.postList {
|
.postLink:hover {
|
||||||
display: flex;
|
text-decoration: none;
|
||||||
flex-direction: column;
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
flex: 1 1 auto;
|
|
||||||
|
|
||||||
.postLink {
|
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin: 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postLink:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postListItem {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
height: 114px;
|
|
||||||
margin: 0;
|
|
||||||
padding: 8px 4px;
|
|
||||||
|
|
||||||
.postTitle {
|
|
||||||
color: black;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postDescription {
|
|
||||||
color: grey;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postDetails {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
color: black;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 300;
|
|
||||||
text-transform: uppercase;
|
|
||||||
|
|
||||||
.postDetailsComments {
|
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postDetailsStatus {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.infoText {
|
.postListItem {
|
||||||
display: block;
|
height: 114px;
|
||||||
text-align: center;
|
}
|
||||||
font-style: italic;
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
.roadmapColumns {
|
.roadmapColumns {
|
||||||
display: flex;
|
|
||||||
flex: 1 1 auto;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.roadmapColumn {
|
.roadmapColumn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -16,70 +10,13 @@
|
|||||||
width: 32%;
|
width: 32%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.roadmapColumn {
|
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
border-radius: 4px;
|
|
||||||
|
|
||||||
margin: 8px 0;
|
|
||||||
padding: 8px;
|
|
||||||
|
|
||||||
.columnHeader {
|
.scrollContainer {
|
||||||
display: flex;
|
overflow-y: auto;
|
||||||
align-items: center;
|
max-height: 350px;
|
||||||
|
}
|
||||||
padding-bottom: 4px;
|
|
||||||
border-bottom-style: solid;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.infoText {
|
.postLink:hover {
|
||||||
text-align: center;
|
text-decoration: none;
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnTitle {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrollContainer {
|
|
||||||
overflow-y: auto;
|
|
||||||
max-height: 350px;
|
|
||||||
|
|
||||||
.postList {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.postLink {
|
|
||||||
text-decoration: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postLink:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postListItem {
|
|
||||||
margin: 4px 0;
|
|
||||||
padding: 8px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postTitle {
|
|
||||||
color: black;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.postBoard {
|
|
||||||
color: grey;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 14px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ feature 'board', type: :system, js: true do
|
|||||||
fill_in 'Description (optional)', with: post_description
|
fill_in 'Description (optional)', with: post_description
|
||||||
click_button 'Submit feedback' # submit
|
click_button 'Submit feedback' # submit
|
||||||
|
|
||||||
expect(page).to have_selector('.success')
|
expect(page).to have_selector('.text-success')
|
||||||
end
|
end
|
||||||
|
|
||||||
visit board_path(board)
|
visit board_path(board)
|
||||||
@@ -161,7 +161,7 @@ feature 'board', type: :system, js: true do
|
|||||||
expect(page).to have_content(/#{post3.title}/i)
|
expect(page).to have_content(/#{post3.title}/i)
|
||||||
|
|
||||||
within sidebar do
|
within sidebar do
|
||||||
fill_in 'Search:', with: post1.title
|
find('#searchPostInput').set post1.title
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content(/#{post1.title}/i)
|
expect(page).to have_content(/#{post1.title}/i)
|
||||||
@@ -169,7 +169,7 @@ feature 'board', type: :system, js: true do
|
|||||||
expect(page).to have_no_content(/#{post3.title}/i)
|
expect(page).to have_no_content(/#{post3.title}/i)
|
||||||
|
|
||||||
within sidebar do
|
within sidebar do
|
||||||
fill_in 'Search:', with: post2.description
|
find('#searchPostInput').set post2.description
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_no_content(/#{post1.description}/i)
|
expect(page).to have_no_content(/#{post1.description}/i)
|
||||||
|
|||||||
Reference in New Issue
Block a user