Skip to content

Commit 55cf1ea

Browse files
authored
Merge pull request #4 from Adarsh-619/feat_prettier_workflow
fix: Fixed the prettier linting issues and added style check workflow
2 parents 3ec9712 + 09076d0 commit 55cf1ea

8 files changed

Lines changed: 906 additions & 584 deletions

File tree

.github/workflows/greetings.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
issues: write
1010
pull-requests: write
1111
steps:
12-
- uses: actions/first-interaction@v1
13-
with:
14-
repo-token: ${{ secrets.GITHUB_TOKEN }}
15-
issue-message: 'Thanks for raising this issue.'
16-
pr-message: 'Thanks for raising this pull request. A maintainer will review the proposed changes as soon as possible.'
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
issue-message: 'Thanks for raising this issue.'
16+
pr-message: 'Thanks for raising this pull request. A maintainer will review the proposed changes as soon as possible.'

.github/workflows/style.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# @see https://github.com/EddieJaoudeCommunity/awesome-github-profiles/issues/173
2+
name: Prettier
3+
4+
# @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
5+
# "Push" is every commit to any branch, whilst "pull_request" includes update commits to PRs.
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
jobs:
13+
prettier:
14+
name: Prettier Linting
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [16.x]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Load Node.js
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- run: npm ci
31+
- name: Prettier
32+
run: npm run format
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
- uses: stefanzweifel/git-auto-commit-action@v4
36+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
37+
with:
38+
commit_message: 'style: format files'

assets/css/styles.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*=============== GOOGLE FONTS ===============*/
2-
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap");
2+
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap');
33

44
/*=============== VARIABLES CSS ===============*/
55
:root {
@@ -16,7 +16,7 @@
1616

1717
/*========== Font and typography ==========*/
1818
/*.5rem = 8px | 1rem = 16px ...*/
19-
--body-font: "Bai Jamjuree", sans-serif;
19+
--body-font: 'Bai Jamjuree', sans-serif;
2020
--h2-font-size: 1.25rem;
2121
--normal-font-size: 1rem;
2222
}
@@ -73,7 +73,7 @@ img {
7373
position: relative;
7474
background-color: var(--first-color-light);
7575
padding-top: 1.5rem;
76-
margin-bottom: -.75rem;
76+
margin-bottom: -0.75rem;
7777
}
7878

7979
.card__data {
@@ -108,7 +108,7 @@ img {
108108
.card__name {
109109
font-size: var(--h2-font-size);
110110
color: var(--second-color);
111-
margin-bottom: .75rem;
111+
margin-bottom: 0.75rem;
112112
}
113113

114114
.card__description {
@@ -119,16 +119,16 @@ img {
119119
.card__button {
120120
display: inline-block;
121121
background-color: var(--first-color);
122-
padding: .75rem 1.5rem;
123-
border-radius: .25rem;
122+
padding: 0.75rem 1.5rem;
123+
border-radius: 0.25rem;
124124
color: var(--dark-color);
125125
font-weight: 600;
126126
}
127127

128128
/* Swiper class */
129129
.swiper-button-prev:after,
130130
.swiper-button-next:after {
131-
content: "";
131+
content: '';
132132
}
133133

134134
.swiper-button-prev,
@@ -189,4 +189,4 @@ img {
189189
.swiper-button-next {
190190
right: -1rem;
191191
}
192-
}
192+
}

css/card_styles.css

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*=============== GOOGLE FONTS ===============*/
2-
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap");
2+
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap');
33

44
/*=============== VARIABLES CSS ===============*/
55
:root {
@@ -16,7 +16,7 @@
1616

1717
/*========== Font and typography ==========*/
1818
/* .5rem = 8px | 1rem = 16px ... */
19-
--body-font: "Bai Jamjuree", sans-serif;
19+
--body-font: 'Bai Jamjuree', sans-serif;
2020
--h2-font-size: 1.25rem;
2121
--normal-font-size: 1rem;
2222
}
@@ -66,10 +66,9 @@ img {
6666
.card__image {
6767
position: relative;
6868
padding-top: 1.5rem;
69-
margin-bottom: -.75rem;
69+
margin-bottom: -0.75rem;
7070
}
7171

72-
7372
.card__article {
7473
width: 300px; /* Remove after adding swiper js */
7574
border-radius: 1.25rem;
@@ -96,7 +95,7 @@ img {
9695
.card__name {
9796
font-size: var(--h2-font-size);
9897
color: var(--second-color);
99-
margin-bottom: .75rem;
98+
margin-bottom: 0.75rem;
10099
text-align: center;
101100
}
102101

@@ -109,17 +108,16 @@ img {
109108
.card__button {
110109
display: inline-block;
111110
background-color: var(--first-color);
112-
padding: .75rem 1.2rem;
113-
border-radius: .25rem;
111+
padding: 0.75rem 1.2rem;
112+
border-radius: 0.25rem;
114113
color: var(--dark-color);
115114
font-weight: 600;
116-
117115
}
118116

119117
/* Swiper class */
120118
.swiper-button-prev:after,
121119
.swiper-button-next:after {
122-
content: "";
120+
content: '';
123121
}
124122

125123
.swiper-button-prev,
@@ -180,4 +178,4 @@ img {
180178
.swiper-button-next {
181179
right: -1rem;
182180
}
183-
}
181+
}

0 commit comments

Comments
 (0)