Commit 0600ec43 authored by kliger's avatar kliger

refactoring the grid parts, better design in question page and bug fixes

parent 1ffba8fb
......@@ -84,4 +84,10 @@ body {
a {
background-color: transparent;
}
}
@media(max-width:767px) {
.logo {
height: 100px;
}
}
\ No newline at end of file
......@@ -8,7 +8,11 @@ const ManageLayout = ({ main }) =>
<div id="manage-layout">
<ManageNavbar />
<div className="container">
{main}
<div className="row">
<div className="col-xs-12 col-sm-12 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 col-xl-8-col-xs-offset-2">
{main}
</div>
</div>
</div>
</div>;
......
......@@ -109,19 +109,23 @@ class Main extends React.Component {
<div
className={`tab-pane fade in ${activeTab === tabNames.myQuizes ? 'active' : ''}`}
>
<a href="/CreateQuiz" className="add-question">
<div className="panel panel-default" id="add-quiz-panel">
<div className="panel-body">
<span
className="glphicon glyphicon-plus"
id="add-quiz-plus-icon"
/>
<div className="row">
<a href="/CreateQuiz" className="add-question">
<div className="panel panel-default" id="add-quiz-panel">
<div className="panel-body">
<span
className="glphicon glyphicon-plus"
id="add-quiz-plus-icon"
/>
</div>
</div>
</div>
</a>
</a>
</div>
{quizes.length
? quizes.map(quiz => (
<QuizCard key={quiz._id} quiz={quiz} actions={actions} />
<div className="row">
<QuizCard key={quiz._id} quiz={quiz} actions={actions} />
</div>
))
: <h3>לא יצרת אפילו שאלון אחד, למה אתה מחכה?</h3>}
</div>
......@@ -131,7 +135,9 @@ class Main extends React.Component {
>
{gamesManaged.length
? gamesManaged.map(game => (
<GameCardManaged key={game._id} game={game} />
<div className="row">
<GameCardManaged key={game._id} game={game} />
</div>
))
: <h3>עדיין לא ארגנת משחק לחברים?</h3>}
</div>
......@@ -141,7 +147,9 @@ class Main extends React.Component {
>
{gamesPlayed.length
? gamesPlayed.map(game => (
<GameCardPlayed key={game._id} game={game} />
<div className="row">
<GameCardPlayed key={game._id} game={game} />
</div>
))
: <h3>איך עוד לא השתתפת באף משחק ? אתה לא רציני...</h3>}
</div>
......
......@@ -49,36 +49,47 @@ class Search extends React.Component {
showDeleteAlert,
forkQuiz,
};
return (
results.length === 0
return results.length === 0
? <div className="row">
<img className="col-md-6" src="/img/no-search-results.png" alt="No Search Results" />
<img className="col-md-6" src="/img/no-search-results-text.png" alt="No Search Results" />
<img
className="col-md-6"
src="/img/no-search-results.png"
alt="No Search Results"
/>
<img
className="col-md-6"
src="/img/no-search-results-text.png"
alt="No Search Results"
/>
</div>
: <div id="search">
<h1>תוצאות חיפוש עבור <strong>{ query }</strong></h1>
<ul>
{results.map(quiz =>
<div key={quiz._id}>
<h1>תוצאות חיפוש עבור <strong>{query}</strong></h1>
{results.map(quiz => (
<div key={quiz._id}>
<div className="row">
<QuizCard quiz={quiz} actions={actions} />
</div>,
)}
</ul>
</div>
</div>
))}
<div
id="snackbar"
className={
this.state.quizDeleted || this.state.quizForked ? 'show' : ''
}
this.state.quizDeleted || this.state.quizForked ? 'show' : ''
}
>
{this.state.quizDeleted
? 'השאלון נמחק בהצלחה'
: 'השאלון הועתק בהצלחה'}
? 'השאלון נמחק בהצלחה'
: 'השאלון הועתק בהצלחה'}
</div>
<SweetAlert
show={this.state.showDeleteQuizAlert}
title="מחיקת שאלון"
type="warning"
text={this.state.showDeleteQuizAlert ? `האם אתה בטוח שברצונך למחוק את השאלון: ${this.state.quizToDelete.title}?` : ''}
text={
this.state.showDeleteQuizAlert
? `האם אתה בטוח שברצונך למחוק את השאלון: ${this.state.quizToDelete.title}?`
: ''
}
showCancelButton
confirmButtonText="מחק!"
cancelButtonText="בטל"
......@@ -92,8 +103,7 @@ class Search extends React.Component {
onEscapeKey={() => this.setState({ showDeleteQuizAlert: false })}
onOutsideClick={() => this.setState({ showDeleteQuizAlert: false })}
/>
</div>
);
</div>;
}
}
......
#manage-layout {
.container {
padding: 125px 100px;
padding-top: 120px;
}
.panel-heading>.form-group{
margin-bottom: 0;
......
......@@ -37,4 +37,9 @@
margin-top: -10px;
}
border: none !important;
@media(max-width:767px) {
.js-search {
display: none !important;
}
}
}
\ No newline at end of file
......@@ -31,8 +31,8 @@
.answers-btn-area-to-bottom {
position: absolute;
bottom: 0;
right: 100px;
left: 100px;
right: 0;
left: 0;
}
.buttons-col {
padding-left: 5px;
......@@ -129,4 +129,12 @@
width: 380px;
}
}
@media(max-height: 600px){
.recharts-surface {
height: 300px !important;
}
.recharts-wrapper {
height: 300px !important;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment