Skip to content

Commit 6f47f4e

Browse files
committed
Adjustments on responsiveness
1 parent c62e0b6 commit 6f47f4e

File tree

19 files changed

+137
-7
lines changed

19 files changed

+137
-7
lines changed

website/src/scripts/components/btn/btn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
computed: {
1111
classes() {
1212
return {
13-
[`btn-${this.theme}`]: ['primary'].includes(this.theme),
13+
[`btn-${this.theme}`]: ['primary', 'secondary'].includes(this.theme),
1414
[`btn-${this.size}`]: ['small'].includes(this.size)
1515
};
1616
},

website/src/scripts/components/btn/btn.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ describe('Btn', () => {
1717
expect(wrapper.classes()).toContain('btn-primary');
1818
});
1919

20+
it('should render a secondary btn', () => {
21+
const wrapper = createComponent({theme: 'secondary'});
22+
expect(wrapper.classes()).toContain('btn-secondary');
23+
});
24+
2025
it('should render a small btn', () => {
2126
const wrapper = createComponent({size: 'small'});
2227
expect(wrapper.classes()).toContain('btn-small');
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<footer class="credits">
22
<p>
3-
Criada por <a href="https://github.com/filipedeschamps" target="_blank">Felipe Deschamps</a>
4-
e mantida por essa bela comunidade de
3+
Criada por <a href="https://github.com/filipedeschamps" target="_blank">Felipe Deschamps</a>.
4+
<br>
5+
Mantida por essa bela comunidade de
56
<a href="https://github.com/filipedeschamps/cep-promise/graphs/contributors" target="_blank">colaboradores</a>.
7+
</p>
8+
<a class="credits-contribute-button-link" href="https://github.com/filipedeschamps/cep-promise" target="_blank">
9+
<btn>Contribua</btn>
10+
</a>
11+
<p>
612
Website criado por <a href="https://rafaelcamargo.com" target="_blank">Rafael Camargo</a>.
713
</p>
814
</footer>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import '@styles/credits.styl';
2+
import btn from '@scripts/components/btn/btn';
23
import template from './credits.html';
34

45
export default {
56
name: 'credits',
7+
components: {
8+
btn
9+
},
610
template
711
};

website/src/scripts/components/credits/credits.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ describe('Credits', () => {
1111
expect(wrapper.classes()).toEqual(['credits']);
1212
});
1313

14-
it('should contain one paragraph', () => {
14+
it('should contain two paragraph', () => {
1515
const wrapper = mountComponent();
16-
expect(wrapper.findAll('p').length).toEqual(1);
16+
expect(wrapper.findAll('p').length).toEqual(2);
1717
});
1818

19-
it('should contain three links', () => {
19+
it('should contain four links', () => {
2020
const wrapper = mountComponent();
21-
expect(wrapper.findAll('a').length).toEqual(3);
21+
expect(wrapper.findAll('a').length).toEqual(4);
2222
});
2323
});

website/src/scripts/components/intro/intro.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ <h1>Simplicidade deslumbrante.</h1>
77
<router-link :to="{name: 'trial'}">
88
<btn theme="primary">Experimente</btn>
99
</router-link>
10+
<router-link :to="{name: 'use'}">
11+
<btn theme="secondary">Use</btn>
12+
</router-link>
1013
</div>
1114
</row-item>
1215
<row-item size="6">

website/src/styles/_native.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ input
3636
border 1px solid $color-grey
3737
outline 0
3838
border-radius(3px)
39+
box-sizing(border-box)
3940
&:focus,
4041
&:active
4142
border 1px solid alpha($color-blue, .3)

website/src/styles/_variables.styl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ $path-images = '../images/'
3636

3737
// ANIMATION
3838
$animation-ease-default = cubic-bezier(0.080, 0.690, 0.485, 0.990)
39+
40+
// BREAKPOINTS
41+
$screen-xs-max = 767px
42+
$screen-sm-min = 768px
43+
$screen-sm-max = 1024px
44+
$screen-md-min = 1025px
45+
$screen-md-max = 1439px
46+
$screen-lg-min = 1440px

website/src/styles/btn.styl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.btn
55
position relative
66
padding 0 15px
7+
min-width 100px
78
color $color-blue
89
background-color transparent
910
font-size $font-size-sm
@@ -37,3 +38,11 @@
3738
&:active
3839
background-color $color-blue-dark
3940
color $color-lightest
41+
&.btn-secondary
42+
background-color transparent
43+
color alpha($color-lightest, 0.7)
44+
border-color alpha($color-lightest, 0.7)
45+
&:hover,
46+
&:active
47+
background-color transparent
48+
color alpha($color-lightest, 0.7)

website/src/styles/credits.styl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,19 @@
1010
border 1px solid $color-grey
1111
border-radius(6px)
1212
box-sizing(border-box)
13+
.credits-contribute-button-link
14+
display none
15+
16+
+breakpoint('xs')
17+
.credits
18+
margin 50px auto 20px
19+
width 100%
20+
border 0
21+
border-top 1px solid $color-grey
22+
border-radius(0)
23+
p
24+
&:not(:first-child)
25+
margin-top 30px
26+
.credits-contribute-button-link
27+
display inline-block
28+
margin-top 15px

0 commit comments

Comments
 (0)