Skip to content

Commit

Permalink
Merge pull request #4 from Adarsh-619/feat_prettier_workflow
Browse files Browse the repository at this point in the history
fix: Fixed the prettier linting issues and added style check workflow
  • Loading branch information
Adarsh-619 authored Feb 2, 2024
2 parents 3ec9712 + 09076d0 commit 55cf1ea
Show file tree
Hide file tree
Showing 8 changed files with 906 additions and 584 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thanks for raising this issue.'
pr-message: 'Thanks for raising this pull request. A maintainer will review the proposed changes as soon as possible.'
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thanks for raising this issue.'
pr-message: 'Thanks for raising this pull request. A maintainer will review the proposed changes as soon as possible.'
38 changes: 38 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# @see https://github.com/EddieJaoudeCommunity/awesome-github-profiles/issues/173
name: Prettier

# @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
# "Push" is every commit to any branch, whilst "pull_request" includes update commits to PRs.
on:
push:
branches:
- main
pull_request:

jobs:
prettier:
name: Prettier Linting
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Load Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- name: Prettier
run: npm run format
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
commit_message: 'style: format files'
16 changes: 8 additions & 8 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
Expand All @@ -16,7 +16,7 @@

/*========== Font and typography ==========*/
/*.5rem = 8px | 1rem = 16px ...*/
--body-font: "Bai Jamjuree", sans-serif;
--body-font: 'Bai Jamjuree', sans-serif;
--h2-font-size: 1.25rem;
--normal-font-size: 1rem;
}
Expand Down Expand Up @@ -73,7 +73,7 @@ img {
position: relative;
background-color: var(--first-color-light);
padding-top: 1.5rem;
margin-bottom: -.75rem;
margin-bottom: -0.75rem;
}

.card__data {
Expand Down Expand Up @@ -108,7 +108,7 @@ img {
.card__name {
font-size: var(--h2-font-size);
color: var(--second-color);
margin-bottom: .75rem;
margin-bottom: 0.75rem;
}

.card__description {
Expand All @@ -119,16 +119,16 @@ img {
.card__button {
display: inline-block;
background-color: var(--first-color);
padding: .75rem 1.5rem;
border-radius: .25rem;
padding: 0.75rem 1.5rem;
border-radius: 0.25rem;
color: var(--dark-color);
font-weight: 600;
}

/* Swiper class */
.swiper-button-prev:after,
.swiper-button-next:after {
content: "";
content: '';
}

.swiper-button-prev,
Expand Down Expand Up @@ -189,4 +189,4 @@ img {
.swiper-button-next {
right: -1rem;
}
}
}
18 changes: 8 additions & 10 deletions css/card_styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
Expand All @@ -16,7 +16,7 @@

/*========== Font and typography ==========*/
/* .5rem = 8px | 1rem = 16px ... */
--body-font: "Bai Jamjuree", sans-serif;
--body-font: 'Bai Jamjuree', sans-serif;
--h2-font-size: 1.25rem;
--normal-font-size: 1rem;
}
Expand Down Expand Up @@ -66,10 +66,9 @@ img {
.card__image {
position: relative;
padding-top: 1.5rem;
margin-bottom: -.75rem;
margin-bottom: -0.75rem;
}


.card__article {
width: 300px; /* Remove after adding swiper js */
border-radius: 1.25rem;
Expand All @@ -96,7 +95,7 @@ img {
.card__name {
font-size: var(--h2-font-size);
color: var(--second-color);
margin-bottom: .75rem;
margin-bottom: 0.75rem;
text-align: center;
}

Expand All @@ -109,17 +108,16 @@ img {
.card__button {
display: inline-block;
background-color: var(--first-color);
padding: .75rem 1.2rem;
border-radius: .25rem;
padding: 0.75rem 1.2rem;
border-radius: 0.25rem;
color: var(--dark-color);
font-weight: 600;

}

/* Swiper class */
.swiper-button-prev:after,
.swiper-button-next:after {
content: "";
content: '';
}

.swiper-button-prev,
Expand Down Expand Up @@ -180,4 +178,4 @@ img {
.swiper-button-next {
right: -1rem;
}
}
}
Loading

0 comments on commit 55cf1ea

Please sign in to comment.