Skip to content

Commit

Permalink
some of the tasks on issue #29
Browse files Browse the repository at this point in the history
  • Loading branch information
thabti committed Nov 9, 2016
1 parent 8eee051 commit 626f007
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 14 deletions.
4 changes: 4 additions & 0 deletions src/components/Audioplayer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
padding-left: 25px;
}

.surahName {
color: #292929;
}

.info {
position: absolute;
right: 15px;
Expand Down
3 changes: 3 additions & 0 deletions src/containers/Home/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@

.pillsItem {
font-size: 16px;
&:hover {
background-color: $hover-grey;
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/containers/Qari/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class Qaris extends Component {
Object.values(surahs).filter(surah => files[surah.id]).map(surah => (
<li
key={surah.id}
className={`list-group-item ${styles.row} ${surah.id === currentSurah.id ? `${styles.current} js-currentSurah` : ''}`}
className={`list-group-item ${styles.row} ${surah.id === currentSurah.id ? `${styles.active} js-currentSurah` : ''}`}
onClick={() => this.handleSurahSelection(surah)}
>
<Row>
<Row className={styles.surahRow}>
<Col md={6} xs={8}>
<Row>
<Col md={1} xs={2}>
Expand Down
25 changes: 19 additions & 6 deletions src/containers/Qari/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

.panel{
border-radius: 0px;
padding: 20px;
padding: 10px;
border: none;

.muted{
Expand All @@ -36,13 +36,26 @@
margin-left: 5px;
}


.surahRow {
margin-right: -12px;
}
:global(.list-group-item){

border-color: $border-color;

&.active {
border-left: 2px solid $brand-primary;
& .surahRow div > * {
color: $brand-primary;
}
& .surahRow .muted {
opacity: 1;

}
}
}

:global(.list-group-item:hover){

background-color: $hover-grey;
}
}

Expand All @@ -53,17 +66,17 @@
display: none;
}

&.current {
&.active {
background-color: $hover-grey;
}

&:hover{
background-color: $hover-grey;

:global(.fa-play-circle){
display: inline;
line-height: 0.5em;
}

:global(.index){
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/audioplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ export default function reducer(state = initialState, action = {}) {
};
case PLAY_PAUSE:
if (!state.file) return state;

if (state.file.paused && state.file.readyState >= 3) {
state.file.play();
} else if (!state.file.paused && state.file.readyState >= 3) {
debugger;
state.file.pause();
}

Expand Down
5 changes: 3 additions & 2 deletions src/styles/bootstrap.overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
&.vertical-align{
& > li{
vertical-align: middle;
padding-bottom: 1px;
}
}
}
Expand All @@ -26,14 +27,14 @@

.home-nav-pills.nav-justified{
li{
border-bottom: 2px solid #d7d7d7;
border-bottom: 1px solid $border-color;

a:hover{
background: transparent;
}

&.active{
border-bottom: 3px solid $brand-primary;
border-bottom: 2px solid $brand-primary;

a{
background: #fff;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $brand-success: #5cb85c;
$brand-warning: #f0ad4e;
$brand-danger: #d9534f;
$brand-info: #5bc0de;
$border-color: #EFEFEF;
$border-color: #F0F0F0;
$text-color: #444;
$hover-grey: #f7f7f7;
$font-size-base: 14px;
Expand Down
9 changes: 7 additions & 2 deletions src/utils/formatSeconds.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export default (seconds) => {
const date = new Date(null);
date.setSeconds(seconds); // specify value for SECONDS here

return date.toISOString().substr(11, 8);
const time = date.toISOString().substr(11, 8);
const splitTime = time.split(':');
if (splitTime[0] === '00') {
splitTime.shift();
return splitTime.join(':');
}
return time;
};

0 comments on commit 626f007

Please sign in to comment.