wco_models 3.1.0.67 → 3.1.0.70

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc1b0041e1e7cc0a58fa69b37704b5dfebdc2d0610290017330310b8c2cee242
4
- data.tar.gz: a9a37074958de290fd370c174dda3122b79d7088b114ce07eed61f42a6c7b6fa
3
+ metadata.gz: ea84f3f0608bb71c99678e1ffd5f37dd626462958602c5acc908f13ebe4e2fed
4
+ data.tar.gz: 2f6cf3351e15a32df468b665ac0430f6b7d47d92380e9b3b95ca4c404f9f391e
5
5
  SHA512:
6
- metadata.gz: 3d03c8ec55871c5912f2e6f45c7cc9218ba149c09b9b0f8803f16e1151f02144acc6ca133d351c1d12d7a564b1a8b7d6673d280fce125f8f7bc7c69de9b55a15
7
- data.tar.gz: 4ee0c0bd1ceaa19bf59cd71de798ed0d30eb767f94db0b247636dbc565877edbdb55828febc2957bd0ad2e91e2ebafd476ed711973bb3e2d994db855592aad2a
6
+ metadata.gz: 2eef8aff06c8aea4b00686a2a24255f05b8b31b1f5e0d2014577a65da48e82757e7452a41a811c06f51699141ceff2156f3015bd2fa5d54a2ae811f4c79fd4fd
7
+ data.tar.gz: b4eaf23331ed7186071185c4b80cd425b9e2e1d0dca2459c55bdc41327cd2de658004e2e15376f55e17db5f7e747be8b17c03eb6d0d6170326731afebcdb7e5a
@@ -0,0 +1,68 @@
1
+
2
+ html {
3
+ // --wco-color-1: red;
4
+ --wco-color-2: #ddd;
5
+ }
6
+
7
+ .chip,
8
+ .Chip {
9
+ display: inline;
10
+
11
+ border: 1px solid var(--wco-color-1);
12
+ border-radius: 0.5em;
13
+ padding: 0.1em .3em;
14
+ margin-bottom: 0.1em;
15
+ background: var(--wco-color-2);
16
+
17
+ }
18
+ .chip,
19
+ .Chip {
20
+ // border: 1px solid black;
21
+ border-radius: 1em 0 0 1em;
22
+
23
+ margin-right: 32px;
24
+
25
+ padding: 0.2em 0.2em 0.2em 0.6em;
26
+
27
+ height: 32px;
28
+
29
+ background: var(--wco-color-2);
30
+
31
+ position: relative;
32
+
33
+ &::before {
34
+ // border: 1px solid red;
35
+ // background: yellow;
36
+
37
+ content: "";
38
+ display: block;
39
+
40
+ position: absolute;
41
+ right: -16px;
42
+ top: 0;
43
+
44
+ width: 16px;
45
+ height: 32px;
46
+
47
+ // border-left: 12px solid white;
48
+ border-top: 17px solid var(--wco-color-2);
49
+ border-right: 12px solid transparent;
50
+ // border-bottom: 12px solid transparent;
51
+ }
52
+ &::after {
53
+ // border: 1px solid red;
54
+
55
+ content: "";
56
+ display: block;
57
+
58
+ position: absolute;
59
+ right: -16px;
60
+ bottom: 0;
61
+
62
+ width: 16px;
63
+ height: 32px;
64
+
65
+ border-bottom: 17px solid var(--wco-color-2);
66
+ border-right: 12px solid transparent;
67
+ }
68
+ }
@@ -0,0 +1,67 @@
1
+
2
+
3
+ .galleries--index .mini {
4
+ float: left;
5
+ }
6
+
7
+ .galleries--title {
8
+ // text-align: center;
9
+ }
10
+
11
+ div.galleries-show {
12
+ > * {
13
+ border-bottom: 2px solid red;
14
+ }
15
+
16
+ > *:last-child {
17
+ border-bottom: none;
18
+ }
19
+
20
+ .row-large .goto {
21
+ display: none;
22
+ }
23
+
24
+ }
25
+
26
+
27
+ // .row-thumbs .item {
28
+ // margin-bottom: 1em;
29
+ // img {
30
+ // margin-top: 10px;
31
+ // }
32
+ // }
33
+
34
+ .row-large .item {
35
+ // border: 1px solid red;
36
+ border-radius: 20px;
37
+
38
+ display: block;
39
+ margin-bottom: 1em;
40
+ max-height: 95vh;
41
+ padding: 10px;
42
+ padding-bottom: 50px;
43
+ background: #cecece;
44
+
45
+ .wrapper {
46
+ width: 100%;
47
+ height: 80vh;
48
+ background-repeat: no-repeat;
49
+ background-position: center center;
50
+ background-size: contain;
51
+
52
+ img {
53
+ max-height: 100%;
54
+ max-width: 100%;
55
+ }
56
+ }
57
+ }
58
+
59
+
60
+ .orderable-items {
61
+ .item {
62
+ border: 1px solid red;
63
+ padding: 10px;
64
+
65
+ max-width: Min(125px, 30vw);
66
+ }
67
+ }
@@ -0,0 +1,87 @@
1
+
2
+ .photos-minis {
3
+ img {
4
+ border: 1px solid red;
5
+ width: 20px;
6
+ height: 20px;
7
+
8
+ }
9
+ }
10
+
11
+ div.thumb {
12
+ margin: 0 0.5em 0.5em 0;
13
+ }
14
+
15
+ .photos-thumbs img,
16
+ img.thumb {
17
+ border: 1px solid red;
18
+ width: 100px;
19
+ height: 100px;
20
+ }
21
+
22
+
23
+
24
+ .photos--index-mini {
25
+ }
26
+ .photos--index-thumbs {
27
+ .item {
28
+ border: 1px solid red;
29
+ padding: 10px;
30
+
31
+ max-width: Min(125px, 30vw);
32
+ }
33
+ }
34
+ .photos--meta-manager {
35
+ display: flex;
36
+ justify-content: space-between;
37
+
38
+ .right-hand {
39
+ text-align: right;
40
+ }
41
+ .right-hand a {
42
+
43
+ }
44
+ .right-hand a:not(:first-child):before {
45
+ content: "|";
46
+ padding: 0 10px 0 15px;
47
+ }
48
+ }
49
+ .photos--multinew {
50
+ border: 1px dashed #356;
51
+ display: inline-block;
52
+ margin-bottom: 2em;
53
+ padding: 10px;
54
+
55
+ input[type='file'] {
56
+ overflow-x: auto;
57
+ max-width: Max( 300px, 50vw );
58
+ }
59
+
60
+ .errors > div {
61
+ border: 1px solid red;
62
+ }
63
+
64
+ .thumbnails {
65
+ .item {
66
+ border: 1px solid blue;
67
+ display: flex;
68
+
69
+ > * {
70
+ margin-right: .5em;
71
+ }
72
+ }
73
+ }
74
+
75
+ }
76
+
77
+ .row-deleted {
78
+ .goto,
79
+ .x {
80
+ display: none;
81
+ }
82
+ }
83
+ .row-mini {
84
+ .flex-row {
85
+ margin-bottom: 500px;
86
+ }
87
+ }
@@ -137,7 +137,15 @@ h5.title {
137
137
  /* P */
138
138
 
139
139
  .padded {
140
+ // border: 1px solid green;
141
+
140
142
  margin: 0.5em;
141
- width: 100%;
143
+ width: calc( 100% - 1em );
144
+ }
145
+
146
+ /* T */
147
+
148
+ .title {
149
+ word-break: break-word;
142
150
  }
143
151
 
@@ -0,0 +1,40 @@
1
+
2
+ .videos-index {
3
+ .header {
4
+ display: flex;
5
+ justify-content: space-between;
6
+ }
7
+
8
+ .item {
9
+ margin-bottom: 1em;
10
+
11
+ .title {
12
+ word-break: break-word;
13
+ }
14
+ }
15
+
16
+ .pagination {
17
+ margin: 1em 0;
18
+ }
19
+ }
20
+
21
+ div.videos-show {
22
+ // border-bottom: 2px solid red;
23
+ padding-bottom: .8em;
24
+
25
+ margin: 0 auto;
26
+ width: 640px;
27
+
28
+ .row {
29
+ display: flex;
30
+ margin: 0;
31
+
32
+ img {
33
+ margin-right: .8em;
34
+ width: 100px;
35
+ height: 100px;
36
+ }
37
+ }
38
+
39
+
40
+ }
@@ -47,7 +47,7 @@ class Wco::VideosController < Wco::ApplicationController
47
47
 
48
48
  respond_to do |format|
49
49
  format.html do
50
- render
50
+ render '_index'
51
51
  end
52
52
  format.json do
53
53
  render :json => @videos
@@ -17,6 +17,9 @@ class Wco::Gallery
17
17
  validates :slug, presence: true, uniqueness: true
18
18
  before_validation :set_slug, :on => :create
19
19
 
20
+ index({ created_at: -1 })
21
+ index({ created_at: -1, name: -1 })
22
+
20
23
  field :subhead
21
24
  field :descr, :as => :description
22
25
 
@@ -31,8 +31,10 @@ class Wco::Tag
31
31
  find_or_create_by({ slug: TRASH })
32
32
  end
33
33
 
34
+ def to_s
35
+ slug
36
+ end
34
37
  def self.list
35
38
  [[nil,nil]] + all.map { |p| [ p.slug, p.id ] }
36
39
  end
37
-
38
40
  end
@@ -10,6 +10,9 @@ class Wco::Video
10
10
  store_in collection: 'videos'
11
11
 
12
12
  field :name, :type => String
13
+ index({ created_at: -1 })
14
+ index({ created_at: -1, name: -1 })
15
+
13
16
  field :descr, :type => String, :as => :description
14
17
  field :subhead ## still need it... 2023-03-24
15
18
 
@@ -4,7 +4,7 @@
4
4
  -# _vp_ 2022-09-25 :: Small styling revision
5
5
  -#
6
6
 
7
- - n_thumbs ||= 12
7
+ - n_thumbs ||= 8
8
8
  - galleries ||= @galleries
9
9
 
10
10
  .galleries--index.maxwidth
@@ -28,9 +28,9 @@
28
28
  - if g.photos.length == 0
29
29
  No Photos
30
30
  - else
31
- .flex-row
31
+ .d-flex.flex-wrap.photos-thumbs
32
32
  - g.photos.limit( n_thumbs ).each do |photo|
33
- = link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.slug)
33
+ = link_to image_tag(photo.photo.url(:thumb), :alt => ''), gallery_path(g.slug)
34
34
 
35
35
  - if galleries.respond_to? :total_pages
36
36
  = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
@@ -6,7 +6,7 @@
6
6
  (#{gallery.photos.length})
7
7
  = link_to '[~]', edit_gallery_path( gallery )
8
8
  .d-inline-block= button_to 'x', gallery_path(gallery), method: :delete, data: { confirm: 'Are you sure?' }
9
- - if gallery.is_public && !gallery.is_trash && !gallery.is_done
9
+ - if gallery.is_public
10
10
  %i.material-icons visibility
11
11
  - else
12
12
  %i.material-icons visibility_off
@@ -2,7 +2,7 @@
2
2
  - videos ||= @videos
3
3
  - this_videos_path ||= videos_path
4
4
 
5
- .videos--index
5
+ .videos--index.container-fluid
6
6
  .videos--menu
7
7
  = link_to "Videos (#{videos.count})", this_videos_path
8
8
 
@@ -18,19 +18,16 @@
18
18
 
19
19
  .row
20
20
  - videos.each do |video|
21
- .col-md-4.item
22
- .float-left
23
- - if video.youtube_id.present?
24
- %iframe{:allowfullscreen => "true", :frameborder => "0", :height => "150", :src => "//www.youtube.com/embed/#{video.youtube_id}", :width => "200"}
25
- - else
26
- .thumb= image_tag video.thumb.url(:thumb)
27
- .title
28
- = link_to video.name, video_path( video )
29
- .meta-edit
30
- .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
31
- = link_to '[~]', edit_video_path( video )
32
-
33
- = render 'meta', item: video
21
+ .col-md-4
22
+ .d-flex
23
+ .thumb= image_tag video.thumb.url(:thumb), class: 'thumb'
24
+ .a
25
+ .title
26
+ = link_to video.name, video_path( video )
27
+ .d-flex
28
+ = link_to '[~]', edit_video_path( video )
29
+ = button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
30
+ = render 'meta', item: video
34
31
 
35
32
  = paginate videos, param_name: :videos_page, views_prefix: 'wco'
36
33
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.67
4
+ version: 3.1.0.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-14 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -363,8 +363,12 @@ files:
363
363
  - app/assets/stylesheets/vendor/bootstrap-4.6.2.min.css
364
364
  - app/assets/stylesheets/wco/alerts_notices.scss
365
365
  - app/assets/stylesheets/wco/application.css
366
+ - app/assets/stylesheets/wco/chip.scss
367
+ - app/assets/stylesheets/wco/galleries.scss
366
368
  - app/assets/stylesheets/wco/pagination.scss
369
+ - app/assets/stylesheets/wco/photos.scss
367
370
  - app/assets/stylesheets/wco/utils.scss
371
+ - app/assets/stylesheets/wco/videos.scss
368
372
  - app/controllers/wco/application_controller.rb
369
373
  - app/controllers/wco/galleries_controller.rb
370
374
  - app/controllers/wco/headlines_controller.rb
@@ -550,7 +554,6 @@ files:
550
554
  - app/views/wco/videos/_header.haml
551
555
  - app/views/wco/videos/_index.haml
552
556
  - app/views/wco/videos/edit.haml
553
- - app/views/wco/videos/index.haml
554
557
  - app/views/wco/videos/new.haml
555
558
  - app/views/wco/videos/show.haml
556
559
  - app/views/wco/videos/trash/_embed.haml
@@ -1,3 +0,0 @@
1
-
2
- .videos-index.padded
3
- = render 'index', :videos => @videos