semantic-ui-sass 2.4.3.0 → 2.4.4.0
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +4 -0
- data/README.md +41 -24
- data/lib/semantic/ui/sass/version.rb +1 -1
- data/package.json +29 -0
- data/script.js +56 -0
- data/yarn.lock +4 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3f00aae59a977dfaf178f42ebefa9fb5b1a5de5f861da7a77ffd531b672c694
|
|
4
|
+
data.tar.gz: aab2b09fb6ac853ccd0209a764cf0320d85083554aceb1c04cd106f8eaa66290
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e23fa78e5d173a000019edb3fea7d2fead56fabab0a714baf61abbb60f270c6c5cb085ad9dc352ab1d281c56de74e0da29ec3ace8892851aaad70f751b65682e
|
|
7
|
+
data.tar.gz: 565777ec30e611b0ca3717a7c4f927c44e3654262cadc01fbf864f30649e7bf5f300aecbeb8f3616b285e31223a615e17093b233ec4c6ff4b1f6af1566aa7721
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Semantic UI for Sass
|
|
2
2
|
|
|
3
|
-
`semantic-ui-sass` is an Sass-powered version of
|
|
3
|
+
`semantic-ui-sass` is an Sass-powered version of
|
|
4
|
+
[Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and ready to drop
|
|
5
|
+
into Rails, Compass, or Sprockets.
|
|
4
6
|
|
|
5
7
|
[](https://travis-ci.org/doabit/semantic-ui-sass)
|
|
6
8
|
|
|
@@ -14,22 +16,24 @@ The gem only has default theme.
|
|
|
14
16
|
gem 'semantic-ui-sass'
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
`bundle install` and restart your server to make the files available through the
|
|
19
|
+
`bundle install` and restart your server to make the files available through the
|
|
20
|
+
pipeline.
|
|
18
21
|
|
|
19
22
|
# semantic-ui-sass with Rails or Sprockets
|
|
20
23
|
|
|
21
24
|
## CSS
|
|
22
25
|
|
|
23
|
-
Import Semantic in an SCSS file (for example, `application.css.scss`) to get all
|
|
26
|
+
Import Semantic in an SCSS file (for example, `application.css.scss`) to get all
|
|
27
|
+
of Semantic's styles
|
|
24
28
|
|
|
25
29
|
```css
|
|
26
|
-
@import
|
|
30
|
+
@import 'semantic-ui';
|
|
27
31
|
```
|
|
28
32
|
|
|
29
33
|
You can also include modules
|
|
30
34
|
|
|
31
35
|
```css
|
|
32
|
-
@import
|
|
36
|
+
@import 'semantic-ui/collections/menu';
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
## Custom font
|
|
@@ -40,12 +44,14 @@ $font-url: 'http://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&s
|
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
## Skip font loading
|
|
47
|
+
|
|
43
48
|
```css
|
|
44
49
|
$import-google-fonts: false;
|
|
45
50
|
@import 'semantic-ui';
|
|
46
51
|
```
|
|
47
52
|
|
|
48
53
|
## Custom font family
|
|
54
|
+
|
|
49
55
|
```css
|
|
50
56
|
$font-family: 'custom-font-family';
|
|
51
57
|
@import 'semantic-ui';
|
|
@@ -89,14 +95,16 @@ $widescreen-monitor-breakpoint: 1920px !default;
|
|
|
89
95
|
|
|
90
96
|
### Ruby on Rails Version 5
|
|
91
97
|
|
|
92
|
-
We have a helper that includes all Semantic javascripts. Put this in your
|
|
98
|
+
We have a helper that includes all Semantic javascripts. Put this in your
|
|
99
|
+
Javascript manifest (usually in `application.js`) to
|
|
93
100
|
|
|
94
101
|
```js
|
|
95
102
|
// Loads all Semantic javascripts
|
|
96
103
|
//= require semantic-ui
|
|
97
104
|
```
|
|
98
105
|
|
|
99
|
-
You can also load individual modules, provided you also require any
|
|
106
|
+
You can also load individual modules, provided you also require any
|
|
107
|
+
dependencies.
|
|
100
108
|
|
|
101
109
|
```js
|
|
102
110
|
//= require semantic-ui/modal
|
|
@@ -108,26 +116,30 @@ You can also load individual modules, provided you also require any dependencies
|
|
|
108
116
|
Add packages with yarn:
|
|
109
117
|
|
|
110
118
|
```console
|
|
111
|
-
yarn add jquery popper.js semantic-ui-sass
|
|
119
|
+
yarn add jquery popper.js @doabit/semantic-ui-sass
|
|
112
120
|
```
|
|
113
121
|
|
|
114
122
|
In config/webpack/environment.js add the following:
|
|
115
123
|
|
|
116
124
|
```js
|
|
117
|
-
const webpack = require(
|
|
125
|
+
const webpack = require('webpack')
|
|
118
126
|
|
|
119
|
-
environment.plugins.append(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
environment.plugins.append(
|
|
128
|
+
'Provide',
|
|
129
|
+
new webpack.ProvidePlugin({
|
|
130
|
+
$: 'jquery',
|
|
131
|
+
jQuery: 'jquery',
|
|
132
|
+
Popper: ['popper.js', 'default']
|
|
133
|
+
})
|
|
134
|
+
)
|
|
135
|
+
```
|
|
125
136
|
|
|
126
137
|
In app/javascript/packs/application.js add the following:
|
|
127
138
|
|
|
128
139
|
```js
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
import '@doabit/semantic-ui-sass'
|
|
141
|
+
import '@doabit/semantic-ui-sass/src/scss/semantic-ui.scss'
|
|
142
|
+
```
|
|
131
143
|
|
|
132
144
|
# semantic-ui-sass with Compass
|
|
133
145
|
|
|
@@ -142,13 +154,16 @@ compass create compass-project -r semantic-ui-sass --using semantic-ui
|
|
|
142
154
|
|
|
143
155
|
This will sort a few things out:
|
|
144
156
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
157
|
+
- You'll get a starting `styles.scss`
|
|
158
|
+
- You'll get a compiled stylesheet compiled & ready to drop into your
|
|
159
|
+
application
|
|
160
|
+
- We'll also copy the Semantic javascripts & images & fonts into their
|
|
161
|
+
respective folders for you
|
|
148
162
|
|
|
149
163
|
## Existing project
|
|
150
164
|
|
|
151
|
-
Install the gem, add the require statement to the top of your configuration
|
|
165
|
+
Install the gem, add the require statement to the top of your configuration
|
|
166
|
+
file, and install the extension.
|
|
152
167
|
|
|
153
168
|
```console
|
|
154
169
|
gem install semantic-ui-sass
|
|
@@ -165,7 +180,9 @@ compass install semantic-ui
|
|
|
165
180
|
|
|
166
181
|
### NOTE
|
|
167
182
|
|
|
168
|
-
When using compass, you should visit file in local server, eg
|
|
183
|
+
When using compass, you should visit file in local server, eg
|
|
184
|
+
`http://localhost:3000/index.html`, rather than
|
|
185
|
+
`file:///Users/doabit/demo/index.html`
|
|
169
186
|
|
|
170
187
|
# Rails Helpers
|
|
171
188
|
|
|
@@ -217,8 +234,8 @@ semantic_icon('add', id: 'id')
|
|
|
217
234
|
|
|
218
235
|
## TODO
|
|
219
236
|
|
|
220
|
-
|
|
221
|
-
|
|
237
|
+
- Add global variables
|
|
238
|
+
- Add rails helpers like `render_flash`?
|
|
222
239
|
|
|
223
240
|
## Contributing
|
|
224
241
|
|
data/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@doabit/semantic-ui-sass",
|
|
3
|
+
"version": "2.4.4",
|
|
4
|
+
"description": "semantic-ui-sass npm package",
|
|
5
|
+
"main": "src/semantic-ui.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"prepublishOnly": "rm -rf src && yarn copy:js && yarn copy:css && yarn copy:assets && node ./script.js",
|
|
11
|
+
"copy:js": "cp -R app/assets/javascripts/semantic-ui src",
|
|
12
|
+
"copy:css": "cp -R app/assets/stylesheets/semantic-ui src/scss",
|
|
13
|
+
"copy:assets": "mkdir src/scss/assets && cp -R app/assets/fonts/semantic-ui src/scss/assets/fonts && cp -R app/assets/images/semantic-ui src/scss/assets/images"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/doabit/semantic-ui-sass.git"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"semantic-ui-sass"
|
|
22
|
+
],
|
|
23
|
+
"author": "doabit",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/doabit/semantic-ui-sass/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/doabit/semantic-ui-sass#readme"
|
|
29
|
+
}
|
data/script.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const jsContent = `import './api.js'
|
|
2
|
+
import './colorize.js'
|
|
3
|
+
import './form.js'
|
|
4
|
+
import './state.js'
|
|
5
|
+
import './visibility.js'
|
|
6
|
+
import './visit.js'
|
|
7
|
+
import './site.js'
|
|
8
|
+
import './accordion.js'
|
|
9
|
+
import './checkbox.js'
|
|
10
|
+
import './dimmer.js'
|
|
11
|
+
import './dropdown.js'
|
|
12
|
+
import './embed.js'
|
|
13
|
+
import './modal.js'
|
|
14
|
+
import './nag.js'
|
|
15
|
+
import './popup.js'
|
|
16
|
+
import './progress.js'
|
|
17
|
+
import './rating.js'
|
|
18
|
+
import './search.js'
|
|
19
|
+
import './shape.js'
|
|
20
|
+
import './sidebar.js'
|
|
21
|
+
import './sticky.js'
|
|
22
|
+
import './tab.js'
|
|
23
|
+
import './transition.js'
|
|
24
|
+
`
|
|
25
|
+
// create semantic-ui.js
|
|
26
|
+
const fs = require('fs')
|
|
27
|
+
|
|
28
|
+
fs.writeFile('./src/semantic-ui.js', jsContent, err => {
|
|
29
|
+
if (err) console.log('create semantic-ui.js fail', err)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// create semantic-ui.scss
|
|
33
|
+
const cssContent = `@import './globals/all';
|
|
34
|
+
@import './elements/all';
|
|
35
|
+
@import './collections/all';
|
|
36
|
+
@import './views/all';
|
|
37
|
+
@import './modules/all';
|
|
38
|
+
`
|
|
39
|
+
fs.writeFile('./src/scss/semantic-ui.scss', cssContent, err => {
|
|
40
|
+
if (err) console.log('create semantic-ui.scss fail', err)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// replace image-url and font-url
|
|
44
|
+
fs.writeFileSync(
|
|
45
|
+
'./src/scss/elements/_icon.scss',
|
|
46
|
+
fs
|
|
47
|
+
.readFileSync('./src/scss/elements/_icon.scss', 'utf8')
|
|
48
|
+
.replace(/font-url\(\"semantic-ui/g, `url("assets/fonts`)
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
fs.writeFileSync(
|
|
52
|
+
'./src/scss/elements/_flag.scss',
|
|
53
|
+
fs
|
|
54
|
+
.readFileSync('./src/scss/elements/_flag.scss', 'utf8')
|
|
55
|
+
.replace(/image-url\(\"semantic-ui/g, `url("assets/images`)
|
|
56
|
+
)
|
data/yarn.lock
ADDED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: semantic-ui-sass
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- doabit
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -271,6 +271,8 @@ files:
|
|
|
271
271
|
- lib/semantic/ui/sass/breadcrumbs.rb
|
|
272
272
|
- lib/semantic/ui/sass/engine.rb
|
|
273
273
|
- lib/semantic/ui/sass/version.rb
|
|
274
|
+
- package.json
|
|
275
|
+
- script.js
|
|
274
276
|
- semantic-ui-sass.gemspec
|
|
275
277
|
- spec/dummy/README.rdoc
|
|
276
278
|
- spec/dummy/Rakefile
|
|
@@ -317,6 +319,7 @@ files:
|
|
|
317
319
|
- tasks/converter.rb
|
|
318
320
|
- templates/project/manifest.rb
|
|
319
321
|
- templates/project/styles.scss
|
|
322
|
+
- yarn.lock
|
|
320
323
|
homepage: http://github.com/doabit/semantic-ui-sass
|
|
321
324
|
licenses:
|
|
322
325
|
- MIT
|