forked from ANSHIKA-26/WordWise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANSHIKA-26#1248 givefeedback updated
- Loading branch information
Showing
47 changed files
with
6,853 additions
and
241 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
|
||
<!--css--> | ||
<!-- <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> --> | ||
|
||
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Playfair+Display:700|Raleway:500.700'> | ||
<link rel="stylesheet" href="category.css"> | ||
<link rel="stylesheet" href="style.css"> | ||
<link rel="stylesheet" href="Scroll_and_progressbar.css"> | ||
|
@@ -877,6 +877,84 @@ <h2 class="footer-title secondary-title mt-5">Connect with us</h2> | |
<script>window.gtranslateSettings = {"default_language":"en","detect_browser_language":true,"wrapper_selector":".gtranslate_wrapper"}</script> | ||
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script> | ||
<script src="script.js"></script> | ||
<script> | ||
Vue.config.devtools = true; | ||
|
||
Vue.component('card', { | ||
template: ` | ||
<div class="card-wrap" | ||
@mousemove="handleMouseMove" | ||
@mouseenter="handleMouseEnter" | ||
@mouseleave="handleMouseLeave" | ||
ref="card"> | ||
<div class="card" | ||
:style="cardStyle"> | ||
<div class="card-bg" :style="[cardBgTransform, cardBgImage]"></div> | ||
<div class="card-info"> | ||
<slot name="header"></slot> | ||
<slot name="content"></slot> | ||
</div> | ||
</div> | ||
</div>`, | ||
mounted() { | ||
this.width = this.$refs.card.offsetWidth; | ||
this.height = this.$refs.card.offsetHeight; | ||
}, | ||
props: ['dataImage'], | ||
data: () => ({ | ||
width: 0, | ||
height: 0, | ||
mouseX: 0, | ||
mouseY: 0, | ||
mouseLeaveDelay: null }), | ||
|
||
computed: { | ||
mousePX() { | ||
return this.mouseX / this.width; | ||
}, | ||
mousePY() { | ||
return this.mouseY / this.height; | ||
}, | ||
cardStyle() { | ||
const rX = this.mousePX * 30; | ||
const rY = this.mousePY * -30; | ||
return { | ||
transform: `rotateY(${rX}deg) rotateX(${rY}deg)` }; | ||
|
||
}, | ||
cardBgTransform() { | ||
const tX = this.mousePX * -40; | ||
const tY = this.mousePY * -40; | ||
return { | ||
transform: `translateX(${tX}px) translateY(${tY}px)` }; | ||
|
||
}, | ||
cardBgImage() { | ||
return { | ||
backgroundImage: `url(${this.dataImage})` }; | ||
|
||
} }, | ||
|
||
methods: { | ||
handleMouseMove(e) { | ||
this.mouseX = e.pageX - this.$refs.card.offsetLeft - this.width / 2; | ||
this.mouseY = e.pageY - this.$refs.card.offsetTop - this.height / 2; | ||
}, | ||
handleMouseEnter() { | ||
clearTimeout(this.mouseLeaveDelay); | ||
}, | ||
handleMouseLeave() { | ||
this.mouseLeaveDelay = setTimeout(() => { | ||
this.mouseX = 0; | ||
this.mouseY = 0; | ||
}, 1000); | ||
} } }); | ||
|
||
|
||
|
||
const app = new Vue({ | ||
el: '#app' }); | ||
</script> | ||
|
||
</body> | ||
|
||
|
Oops, something went wrong.