Skip to content

Commit ce92f2c

Browse files
example page update
1 parent 99348ff commit ce92f2c

File tree

2 files changed

+74
-99
lines changed

2 files changed

+74
-99
lines changed

example/App.vue

Lines changed: 73 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,61 @@
88
</svg>
99
</a>
1010

11-
<div class="program-name">
12-
vue-simple-context-menu
13-
</div>
14-
15-
<div class="install-text">
16-
npm i vue-simple-context-menu
17-
</div>
18-
19-
<div class="info-link">
20-
<a class="info-link__link" href="https://github.com/johndatserakis/vue-simple-context-menu">View on GitHub</a>
21-
</div>
22-
23-
<div class="info-link">
24-
<a class="info-link__link" href="https://www.npmjs.com/package/vue-simple-context-menu">View on NPM</a>
11+
<div class="container py-4">
12+
<div class="row justify-content-center">
13+
<div class="col-lg-12 text-center">
14+
<h3><strong>vue-simple-context-menu</strong></h3>
15+
</div>
16+
</div>
2517
</div>
2618

27-
<div class="instructions-text">
28-
<p>Right click on an item below.</p>
29-
</div>
19+
<div class="container pt-3 pb-4">
20+
<div class="row justify-content-center mb-4">
21+
<div class="col-lg-6">
22+
<span class="badge badge-primary mb-1">install</span>
23+
<div class="code-text">npm i vue-simple-context-menu</div>
24+
</div>
25+
</div>
3026

31-
<div class="item-wrapper">
32-
<div v-for="item in itemArray1" @contextmenu.prevent.stop="handleClick1($event, item)" class="item-wrapper__item">
33-
{{item.name}}
27+
<div class="row justify-content-center">
28+
<div class="col-lg-6">
29+
<div class="list-group">
30+
<a href="https://github.com/johndatserakis/vue-simple-context-menu" class="list-group-item list-group-item-action" target="_blank">View on GitHub</a>
31+
<a href="https://www.npmjs.com/package/vue-simple-context-menu" class="list-group-item list-group-item-action" target="_blank">View on NPM</a>
32+
</div>
33+
</div>
3434
</div>
3535
</div>
3636

37-
<div class="instructions-text">
38-
<p>Left click on an item below.</p>
37+
<div class="container py-2">
38+
<div class="row justify-content-center">
39+
<div class="col-lg-10">
40+
<hr>
41+
</div>
42+
</div>
3943
</div>
4044

41-
<div class="item-wrapper item-wrapper--last">
42-
<div v-for="item in itemArray2" @click.prevent.stop="handleClick2($event, item)" class="item-wrapper__item">
43-
{{item.name}}
45+
<div class="container pt-2 pb-4">
46+
<div class="row">
47+
<div class="col-lg-6 mb-4 mb-lg-0">
48+
<p>Right click on an item below.</p>
49+
50+
<div class="list-group">
51+
<div v-for="item in itemArray1" @contextmenu.prevent.stop="handleClick1($event, item)" class="list-group-item list-group-item-action">
52+
{{item.name}}
53+
</div>
54+
</div>
55+
</div>
56+
57+
<div class="col-lg-6">
58+
<p>Left click on an item below.</p>
59+
60+
<div class="list-group">
61+
<div v-for="item in itemArray2" @click.prevent.stop="handleClick2($event, item)" class="list-group-item list-group-item-action">
62+
{{item.name}}
63+
</div>
64+
</div>
65+
</div>
4466
</div>
4567
</div>
4668

@@ -137,114 +159,66 @@
137159
}
138160
</script>
139161

140-
<style>
162+
<style lang="scss">
163+
@import url('https://fonts.googleapis.com/css?family=Muli:400,700');
164+
165+
html {
166+
width: 100%;
167+
font-size: 18px;
168+
color: #333;
169+
}
170+
141171
body {
142172
margin: 0;
143173
height: 100%;
144174
height: 100vh;
145175
width: 100%;
146-
font-family: Verdana, "Helvetica Neue", sans-serif;
176+
font-family: 'Muli', sans-serif;
147177
}
148178
149179
#app {
150180
height: 100%;
151181
height: 100vh;
152182
width: 100%;
153-
background-color: #fff;
154183
line-height: 1.5;
155184
}
156185
157-
.program-name {
158-
text-align: center;
159-
font-size: 1.2rem;
160-
margin: 60px 0 40px;
161-
font-weight: bold;
162-
}
163-
164-
@media (min-width: 992px) {
165-
.program-name {
166-
font-size: 2.0rem;
167-
}
168-
}
169-
170-
.install-text {
171-
text-align: center;
172-
font-size: 0.9rem;
173-
margin: 0 auto 40px;
186+
.code-text {
174187
background: #eee;
188+
border: 1px solid #ddd;
175189
padding: 10px 20px;
176-
border-radius: 6px;
177-
width: 275px;
178-
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
179-
}
180-
181-
.info-link {
182-
text-align: center;
183-
margin-bottom: 5px;
184-
text-decoration: none;
185-
color: #56A6EF;
186-
}
187-
188-
.info-link__link {
189-
text-decoration: none;
190-
color: #56A6EF;
191-
}
192-
193-
.info-link__link:hover {
194-
color: #2f4265;
195-
}
196-
197-
.instructions-text {
190+
border-radius: 4px;
191+
margin-bottom: 20px;
198192
text-align: center;
199-
margin: 20px 0 20px;
200193
}
201194
202-
.item-wrapper {
203-
width: 275px;
204-
background: #f6f6f6;
205-
display: flex;
206-
flex-direction: column;
207-
margin: 40px auto 40px;
208-
padding: 40px 0;
209-
}
210-
211-
.item-wrapper--last {
212-
margin-bottom: 60px;
213-
}
214-
215-
.item-wrapper__item {
216-
font-size: 1.2rem;
217-
padding: 10px;
218-
background: #e4e4e4;
219-
margin-bottom: 10px;
220-
text-align: center;
221-
border-radius: 4px;
222-
user-select: none;
223-
-webkit-user-select: none;
195+
@media (min-width: 992px) {
196+
.code-text {
197+
margin-bottom: 0;
198+
}
224199
}
225200
226-
.item-wrapper__item:hover {
227-
background: #56A6EF;
228-
color: #fff;
229-
cursor: pointer;
201+
.btn {
202+
text-transform: uppercase;
203+
font-weight: bold;
230204
}
231205
232-
.item-wrapper__item:active {
233-
background: #476398;
234-
color: #fff;
235-
cursor: pointer;
206+
textarea {
207+
min-height: 175px;
236208
}
237209
238210
.github-corner:hover .octo-arm {
239211
animation:octocat-wave 560ms ease-in-out
240212
}
213+
241214
@keyframes octocat-wave {
242215
0%,100% {transform:rotate(0)}
243216
20%,60% {transform:rotate(-25deg)}
244217
40%,80% {transform:rotate(10deg)}
245218
}
219+
246220
@media (max-width:500px) {
247221
.github-corner:hover .octo-arm {animation:none}
248222
.github-corner .octo-arm {animation:octocat-wave 560ms ease-in-out}
249223
}
250-
</style>
224+
</style>

example/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<meta name="Description" content="vue-simple-context-menu - Simple context-menu component built for Vue. Works well with both left and right clicks. Nothing too fancy, just works and is simple to use.">
88
<meta name="robots" content="index,follow">
99
<title>vue-simple-context-menu</title>
10+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
1011
</head>
1112
<body>
1213
<div id="app"></div>

0 commit comments

Comments
 (0)