Skip to content

Commit

Permalink
add nice scroll to project
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed May 9, 2021
1 parent d9e8086 commit 2d98154
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"@fortawesome/fontawesome-free": "^5.15.3",
"core-js": "^3.6.5",
"electron": "^12.0.7",
"jquery": "^3.6.0",
"jquery.nicescroll": "github:tolc/jquery.nicescroll#master",
"vazir-font": "^28.0.0",
"vue": "^2.6.11"
},
Expand Down
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<style>
</style>
</head>
<body>
<noscript>
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ body{
color: #eeeeee;
font-family: Vazir,tahoma ,serif;
padding-bottom: 15%;
overflow-x: hidden;
}
</style>
35 changes: 29 additions & 6 deletions src/components/pages/MainAppPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<div id="main">
<div class="container">
<div id="app">
<div id="mobile">
</div>
</div>
</div>
Expand Down Expand Up @@ -59,15 +59,32 @@
<script>
import page from '../elements/PageElement';
import property from '../elements/PropertyElement';
import compo from '../elements/Component';
import compo from '../elements/Component';
import jQuery from 'jquery';
require('jquery.nicescroll/dist/jquery.nicescroll.min');
var $ = jQuery;
export default {
name: "MainAppPage",
components: {page, property,compo},
components: {page, property, compo},
data: function () {
return {
pages: []
}
}, mounted() {
try {
$("body").niceScroll();
$("#properties").niceScroll();
$("#elements").niceScroll();
/*eslint-disable */
// document.addEventListener('touchstart', function(){}, {passive: false})
/*eslint-enable */
} catch (e) {
//
}
}
}
</script>
Expand All @@ -90,8 +107,10 @@ export default {
overflow-y: scroll;
}
#side #properties {
#properties {
height: 50vh;
overflow: hidden;
overflow-y: scroll;
}
#side h2 {
Expand All @@ -100,6 +119,8 @@ export default {
background: #272c34;
border-bottom: 1px solid rgba(0, 0, 0, .1);
font-size: 17px;
box-sizing: border-box;
width: 100%;
}
#side h2 .fa {
Expand All @@ -112,13 +133,15 @@ export default {
min-height: 80vh;
}
#main #app {
#mobile {
background: white;
width: 300px;
min-height: 600px;
margin: auto;
border-radius: 15px;
border: 13px solid black;
border: 10px solid black;
border-top-width: 30px;
border-bottom-width: 30px;
color: #1e2329;
}
Expand Down

0 comments on commit 2d98154

Please sign in to comment.