Skip to content

Commit

Permalink
Merge branch 'Anishkagupta04:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
PradnyaGaitonde authored Jul 29, 2024
2 parents eac4018 + 2c8ded6 commit 7a5ae41
Show file tree
Hide file tree
Showing 12 changed files with 819 additions and 456 deletions.
20 changes: 9 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<!-- ISSUE & PR TITLE SHOULD BE SAME-->
## Description
<!--Please include a brief description of the changes or features added-->

[Please include a brief description of the changes or features added]

## Related Issues

[Cite any related issue(s) this pull request addresses. If none, simply state “None”]
<!--Cite any related issue(s) this pull request addresses. If none, simply state “None”-->
- Closes #

## Type of PR

- [ ] Bug fix
- [ ] Feature enhancement
- [ ] Documentation update
- [ ] Other (specify): _______________
<!-- Mention PR Type according to the issue in brackets below and check the below box -->
- [ ] ()

## Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]
<!--Attach any relevant screenshots or videos demonstrating the changes-->


## Checklist

<!-- [X] - put a cross/X inside [] to check the box -->
- [ ] I have gone through the [contributing guide](https://github.com/Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-/)
- [ ] I have updated my branch and synced it with project `main` branch before making this PR
- [ ] I have performed a self-review of my code
- [ ] I have tested the changes thoroughly before submitting this pull request.
- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
- [ ] I have commented my code, particularly in hard-to-understand areas.
<!-- [X] - put a cross/X inside [] to check the box -->


## Additional context:
[Include any additional information or context that might be helpful for reviewers.]
<!--Include any additional information or context that might be helpful for reviewers.-->
60 changes: 32 additions & 28 deletions .github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
name: Auto Label Issues
name: Auto Label Issue

on:
issues:
types: [opened, edited]
types: [opened, reopened, edited]

jobs:
label_issues:
label_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- name: Label Issue
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = context.payload.issue;
const title = issue.title.toLowerCase();
const body = issue.body.toLowerCase();
const labels = [];
if (title.includes('gssoc') || body.includes('gssoc')) {
labels.push('GSSoC');
}
if (title.includes('enhancement') || body.includes('enhancement')) {
labels.push('Enhancement');
}
const issueBody = issue.body ? issue.body.toLowerCase() : '';
const issueTitle = issue.title.toLowerCase();
if (title.includes('bug') || body.includes('bug')) {
labels.push('Bug');
// Add gssoc label to all issues
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ['gssoc']
});
const addLabel = async (label) => {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: [label]
});
};
if (issueBody.includes('documentation') || issueTitle.includes('doc') || issueBody.includes('readme')) {
await addLabel('documentation');
}
if (title.includes('documentation') || body.includes('documentation')) {
labels.push('Documentation');
if (issueBody.includes('feature') || issueBody.includes('enhancement') || issueTitle.includes('add') || issueTitle.includes('implement')) {
await addLabel('enhancement');
}
if (labels.length > 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.name,
labels: labels
});
if (issueBody.includes('bug') || issueBody.includes('fix') || issueTitle.includes('fix') || issueTitle.includes('resolve')) {
await addLabel('bug');
}
51 changes: 51 additions & 0 deletions .github/workflows/auto-label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

name: Auto Label PR

on:
pull_request:
types: [opened, reopened, edited,synchronize]

jobs:
label_pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Label PR
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const pr = context.payload.pull_request;
// Add gssoc label to all PRs
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['gssoc']
});
const prBody = pr.body ? pr.body.toLowerCase() : '';
const prTitle = pr.title.toLowerCase();
const addLabel = async (label) => {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: [label]
});
};
if (prBody.includes('documentation') || prTitle.includes('doc') || prBody.includes('readme')) {
await addLabel('documentation');
}
if (prBody.includes('feature') || prBody.includes('enhancement') || prTitle.includes('add') || prTitle.includes('implement')) {
await addLabel('enhancement');
}
if (prBody.includes('bug') || prBody.includes('fix') || prTitle.includes('fix') || prTitle.includes('resolve')) {
await addLabel('bug');
}
2 changes: 2 additions & 0 deletions Css-Files/Rateus.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
min-height: 100vh;
padding: 20px;
box-sizing: border-box;
width: 60%;
}

.popup {
Expand Down Expand Up @@ -209,6 +210,7 @@
border: none;
padding: 12px 20px;
border-radius: 5px;
margin-left:190px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease, transform 0.2s ease;
Expand Down
2 changes: 1 addition & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ form.php-email-form {
#email {
margin-bottom: 10px;
border-bottom: none;
width: 30vw;
width: 100%;
}

#email,
Expand Down
55 changes: 4 additions & 51 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,56 +57,7 @@
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js">
</script>
Copy code
<script type="text/javascript">
emailjs.init("Your_User_ID"); // Replace with your actual EmailJS User ID

// Function to validate email address
function isValidEmail(email) {
// Simple email validation regex
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!regex.test(email)) {
return false;
}

// Extract domain
const domain = email.split('@')[1].toLowerCase();
const validDomains = ['gmail.com', 'outlook.com', 'yahoo.com'];

return validDomains.includes(domain);
}

document.addEventListener('DOMContentLoaded', function() {
document.getElementById('subscribeForm').addEventListener('submit', function(event) {
event.preventDefault();

var email = document.getElementById('emailInput').value;

if (!isValidEmail(email)) {
alert('Please enter a valid email address from Gmail, Outlook, or Yahoo.');
return;
}

// Prepare the parameters to send
var templateParams = {
to_email: email, // Set the recipient's email
from_name: 'Rapidoc', // Replace with your company or your name
to_name: 'Subscriber',
message: 'Thank you for subscribing to our newsletter!'
};

// Send email
emailjs.send('Your_Service_ID', 'Your_Template_ID', templateParams)
.then(function(response) {
console.log('Email sent successfully:', response);
alert('Successfully subscribed to our newsletter!');
}, function(error) {
console.error('Error sending email:', error);
alert('Failed to send email. Please try again later.');
});
});
});
</script>
<script src="./js/emailvalidation.js"></script>
</head>
<body>
<script src="js/caduceus.js"></script>
Expand Down Expand Up @@ -787,6 +738,7 @@ <h3 class="name">Shikha Pandey</h3>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<!-- testimonial section -->
<!-- Feedback System-->
<center>
<div class="feedback-wrapper">
<div class="feedback-form">
<h2>We'd Love Your Feedback!</h2>
Expand All @@ -811,10 +763,11 @@ <h2>We'd Love Your Feedback!</h2>
<input type="email" id="email" placeholder="Enter your email" required>
<label for="feedback">Your Feedback</label>
<textarea id="feedback" rows="5" placeholder="Let us know how we can improve..." required></textarea>
<button type="submit" class="btn" style="width: 21rem;">Submit Feedback</button>
<button type="submit" class="btn" style="width: 10rem;">Submit Feedback</button>
</form>
</div>
</div>
</center>
<div id="feedback-message">Thanks for the feedback! ❤️ </div>
<div id="popup" class="popup">
<div class="popup-content">
Expand Down
47 changes: 47 additions & 0 deletions js/emailvalidation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
emailjs.init("Your_User_ID"); // Replace with your actual EmailJS User ID

// Function to validate email address
export function isValidEmail(email) {
// Simple email validation regex
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!regex.test(email)) {
return false;
}

// Extract domain
const domain = email.split('@')[1].toLowerCase();
const validDomains = ['gmail.com', 'outlook.com', 'yahoo.com'];

return validDomains.includes(domain);
}

document.addEventListener('DOMContentLoaded', function() {
document.getElementById('subscribeForm').addEventListener('submit', function(event) {
event.preventDefault();

var email = document.getElementById('emailInput').value;

if (!isValidEmail(email)) {
alert('Please enter a valid email address from Gmail, Outlook, or Yahoo.');
return;
}

// Prepare the parameters to send
var templateParams = {
to_email: email, // Set the recipient's email
from_name: 'Rapidoc', // Replace with your company or your name
to_name: 'Subscriber',
message: 'Thank you for subscribing to our newsletter!'
};

// Send email
emailjs.send('Your_Service_ID', 'Your_Template_ID', templateParams)
.then(function(response) {
console.log('Email sent successfully:', response);
alert('Successfully subscribed to our newsletter!');
}, function(error) {
console.error('Error sending email:', error);
alert('Failed to send email. Please try again later.');
});
});
});
4 changes: 4 additions & 0 deletions log/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ body {
top: 10px;
left: 50px;
}
.eye.active {
color: #007bff; /* Change this to whatever color you prefer */
}


.home-button {
display: inline-flex;
Expand Down
Loading

0 comments on commit 7a5ae41

Please sign in to comment.