hayun-vite 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Form/Form.js +1 -0
- package/src/Form/Forms.js +6 -6
- package/src/Form/printForm.js +3 -0
- package/src/style.css +2 -40
package/package.json
CHANGED
package/src/Form/Form.js
CHANGED
@@ -137,6 +137,7 @@ export default class Form {
|
|
137
137
|
svg.setAttribute("style", "background-color: BlanchedAlmond");
|
138
138
|
if (this.image) {
|
139
139
|
let image = document.createElementNS(svgNS, "image");
|
140
|
+
image.setAttribute('class', 'non-print')
|
140
141
|
image.setAttribute('width', width);
|
141
142
|
image.setAttribute('height', height);
|
142
143
|
|
package/src/Form/Forms.js
CHANGED
@@ -8,7 +8,7 @@ import rasaAudImage from './templates/rasaAud.png'
|
|
8
8
|
// خط کد زیر لازم هست
|
9
9
|
import '../fonts/Vazirmatn-Regular.woff2'
|
10
10
|
import '../style.css'
|
11
|
-
|
11
|
+
|
12
12
|
// کلاس جدید که فرمهای مختلف را نمایش میدهد
|
13
13
|
export default class Forms {
|
14
14
|
constructor({ assets, container } = {}) {
|
@@ -17,11 +17,11 @@ export default class Forms {
|
|
17
17
|
div.style = 'border: 1px solid brown; margin: 0; padding: 0;'
|
18
18
|
container.appendChild(div);
|
19
19
|
// اضافه کردن دکمه به دیو فرم
|
20
|
-
let className = 'persian';
|
21
|
-
const btn =[];
|
20
|
+
let className = 'button-form persian';
|
21
|
+
const btn = [];
|
22
22
|
btn[0] = this.putButton({ container: div, text: rasaAud.label, className });
|
23
23
|
btn[1] = this.putButton({ container: div, text: combo.label, className });
|
24
|
-
const printBtn = this.putButton({ container: div, text: '
|
24
|
+
const printBtn = this.putButton({ container: div, text: 'چاپ', className });
|
25
25
|
|
26
26
|
// یک دیو تعریف میکنیم که سمت ادیولاگ برای تعریف لیستنر استفاده میشود
|
27
27
|
this.div = document.createElement('div'); // این بخش فقط شامل بخش اسویجی هست
|
@@ -43,7 +43,7 @@ export default class Forms {
|
|
43
43
|
btn[0].addEventListener('click', () => {
|
44
44
|
this.forms[1].form.style.display = 'none'
|
45
45
|
btn[1].style.backgroundColor = ' #7472e2'
|
46
|
-
|
46
|
+
|
47
47
|
// this.forms[2].form.style.display = 'none'
|
48
48
|
this.forms[0].form.style.display = 'block';
|
49
49
|
btn[0].style.backgroundColor = ' #1c15e1'
|
@@ -102,7 +102,7 @@ export default class Forms {
|
|
102
102
|
}
|
103
103
|
// توابع داخلی ایجاد دکمه و لینک های بالای فرم
|
104
104
|
putButton({ container, id, text, className }) {
|
105
|
-
|
105
|
+
|
106
106
|
const button = document.createElement('button');
|
107
107
|
button.setAttribute('id', id);
|
108
108
|
className && button.setAttribute('class', className);
|
package/src/Form/printForm.js
CHANGED
package/src/style.css
CHANGED
@@ -99,7 +99,7 @@ a:hover {
|
|
99
99
|
color: #888;
|
100
100
|
} */
|
101
101
|
|
102
|
-
button {
|
102
|
+
.button-form {
|
103
103
|
border-radius: 8px;
|
104
104
|
border: 1px solid transparent;
|
105
105
|
padding: 0.6em 1.2em;
|
@@ -114,7 +114,7 @@ button {
|
|
114
114
|
|
115
115
|
}
|
116
116
|
|
117
|
-
button:hover {
|
117
|
+
.button-form:hover {
|
118
118
|
background-color: #1c15e1;
|
119
119
|
|
120
120
|
border-color: #fefefe;
|
@@ -150,41 +150,3 @@ button:focus-visible {
|
|
150
150
|
/* body {
|
151
151
|
font-family: vazirmatn;
|
152
152
|
} */
|
153
|
-
|
154
|
-
|
155
|
-
button1 {
|
156
|
-
background-color: #4CAF50;
|
157
|
-
/* Green background */
|
158
|
-
border: none;
|
159
|
-
/* Remove borders */
|
160
|
-
color: white;
|
161
|
-
/* White text */
|
162
|
-
padding: 15px 32px;
|
163
|
-
/* Some padding */
|
164
|
-
text-align: center;
|
165
|
-
/* Centered text */
|
166
|
-
text-decoration: none;
|
167
|
-
/* Remove underline */
|
168
|
-
display: inline-block;
|
169
|
-
/* Make the button inline */
|
170
|
-
font-size: 16px;
|
171
|
-
/* Increase font size */
|
172
|
-
margin: 4px 2px;
|
173
|
-
/* Add some margin */
|
174
|
-
cursor: pointer;
|
175
|
-
/* Pointer cursor on hover */
|
176
|
-
border-radius: 8px;
|
177
|
-
/* Rounded corners */
|
178
|
-
transition: background-color 0.3s;
|
179
|
-
/* Smooth transition */
|
180
|
-
}
|
181
|
-
|
182
|
-
button1:hover {
|
183
|
-
background-color: #45a049;
|
184
|
-
/* Darker green on hover */
|
185
|
-
}
|
186
|
-
|
187
|
-
button1:active {
|
188
|
-
background-color: #3e8e41;
|
189
|
-
/* Even darker green when clicked */
|
190
|
-
}
|