Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Narayani committed Jun 13, 2024
2 parents 08621cb + f4be427 commit 65fb4ad
Show file tree
Hide file tree
Showing 14 changed files with 501 additions and 16 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug Report 🐞
about: Reporting for any bug in the project.
title: '🐛: '
labels: ["Up-for-Grabs ✋", "bug 🐛"]
assignees:
- ''

---

:red_circle: **Title** :
:red_circle: **Bug** :
:red_circle: **Changes** : <!-- Explain the approach to handle this bug. -->


### Screenshots 📷
<!-- Write N/A if not available-->


***********************************************************************
:white_check_mark: **To be Mentioned while taking the issue :**
- Full name :
- What is your participant role? (Mention the Open Source Program name. Eg. GSOC, GSSOC, SSOC, JWOC, etc.)

***********************************************************************
Happy Contributing 🚀

All the best. Enjoy your open source journey ahead. 😎
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Questions
url: https://discord.gg/tSqtvHUJzE
about: You can join the discussions on Discord.
- name: Login does not work
url: https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/README.md
about: Before opening a new issue, please make sure to read README.md
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Enhancement Request 🧑‍💻
about: Improving any styling or documentation of the project.
title: '🧑‍💻: '
labels: ["Up-for-Grabs ✋", "enhancement 🧑‍💻"]
assignees:
- ''

---

:red_circle: **Title** :
:red_circle: **Enhancement Aim** :
:red_circle: **Changes** : <!-- Enlist those changes you want to do. -->


### Screenshots 📷
<!-- Write N/A if not available-->


***********************************************************************
:white_check_mark: **To be Mentioned while taking the issue :**
- Full name :
- What is your participant role? (Mention the Open Source Program name. Eg. GSOC, GSSOC, SSOC, JWOC, etc.)

***********************************************************************
Happy Contributing 🚀

All the best. Enjoy your open source journey ahead. 😎
47 changes: 47 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Closes: <!-- #issue number -->

- **Title** :
- **Name:** <!--Mention Your name-->
- **Idenitfy yourself:** <!-- Mention your role (like GSOC, GSSOC, SSOC, etc. Contributor) -->


<!-- Mention the following details and these are mandatory -->

### Describe the add-ons or changes you've made 📃

Give a clear description of what have you added or modifications made


### Type of change ☑️
<!-- Please delete options that are not relevant. -->
What sort of change have you made:
<!--
Example how to mark a checkbox:-
- [x] My code follows the code style of this project.
-->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, local variables)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update


### Checklist: ☑️
<!--
Example how to mark a checkbox:-
- [x] My code follows the code style of this project.
-->
- [ ] My code follows the [Contributing Guidelines](https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/README.md) & [Code of Conduct](https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/CODE_OF_CONDUCT.md) of this project.
- [ ] This PR does not contain plagiarized content.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly wherever it was hard to understand.
- [ ] My changes generate no new warnings.


### Screenshots 📷
<!-- Must add the screenshot of the project or your changes for review your pr -->


### Note to reviewers 📄
<!-- Add notes to reviewers if applicable -->

36 changes: 36 additions & 0 deletions .github/workflows/auto-comment-pr-raise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Comment on PR

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
comment:
runs-on: ubuntu-latest

steps:
- name: Add Comment to Pull Request
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE."
}
EOF
)
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "$COMMENT")
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
echo "Failed to add comment"
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'CodeQL'

on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '32 8 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})

runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'
51 changes: 50 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,53 @@ input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
/* info button css */
.info-button-container {
position: fixed;
bottom: 20px;
left: 20px;
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
}

.info-button {
background-color: #848485;
color: white;
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
font-size: 24px;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s;
position: relative;
}

.info-button:hover {
background-color: #48515b;
}

.info-box {
display: none;
background-color: #fff;
color: #000;
padding: 10px;
border-radius: 8px;
margin-top: 10px;
font-size: 14px;
position: relative;
bottom: 60px;
left: 50%;
transform: translateX(-50%);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
width: 250px;
z-index: 10;
}

.info-button-container:hover .info-box {
display: block;
}
21 changes: 13 additions & 8 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import LoadingBar from 'react-top-loading-bar';
import RequestEpisode from './components/Pages/RequestEpisode';
import Alert from './components/Alert/Alert';
import './App.css';

import { Footer } from './components/Footer/Footer';

import QuoteSection from './components/Quotes/QuotesSection';


function App() {
const [value, setValue] = useState(1);
const [episodeNumber, setEpisodeNumber] = useState(1);
Expand All @@ -20,16 +24,15 @@ function App() {
setValue('');
}
};



const handleKeyPress = (event) => {
if (event.key === 'Enter') {
setEpisodeNumber(value);
setStartPlayback(true);
}
};

const handleKey=(e)=>{
const handleKey = (e) => {
setEpisodeNumber(value);
setStartPlayback(true);
};
Expand All @@ -56,27 +59,29 @@ function App() {
<img src="https://raw.githubusercontent.com/Avdhesh-Varshney/Chanakya/main/src/assets/Chanakya-Logo.webp" alt="Chanakya-Image" style={{ width: '5rem' }} />
चाणक्य नीति
</h1>
<QuoteSection/>

<div className="row g-3 text-center align-items-center justify-content-center mb-5">
<div className="col-auto">
<label htmlFor="inputNumber" className="col-form-label">Episode Number</label>

</div>
<div className="col-auto">
<input type="number" id="inputNumber" className="form-control" value={value} onKeyDown={handleKeyPress} onChange={handleOnChange} />

</div>
<div className='col-auto'>
<button
onClick={handleKey}
className="px-4 py-2 text-white bg-blue-500 hover:bg-blue-700 rounded"
onClick={handleKey}
className="px-4 py-2 text-white bg-blue-500 hover:bg-blue-700 rounded"
>
Enter
</button>
</div>
</div>
</div>

{startPlayback && <RequestEpisode episodeNumber={episodeNumber} setEpisodeNumber={setEpisodeNumber} setProgress={setProgress} />}

<Footer/>

</div>

);
Expand Down
2 changes: 0 additions & 2 deletions src/components/Cards/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const Card = (props) => {
customVolumeControls={[]}
showDownloadProgress={[]}
className='audio-player'

className='bg-transparent'
showSkipControls={true}
style={{ color: "white" }}

Expand Down
Loading

0 comments on commit 65fb4ad

Please sign in to comment.