tomify 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d85803b12226321bb76440fc8efae058be5d9772
4
- data.tar.gz: 3ce0217e98efeced7e3f22ff3abb980f308bfe67
3
+ metadata.gz: d4f081a00b7ab4f2e5f62d855ddfd8b0bf1bd316
4
+ data.tar.gz: 27c8deb82e11ae1be2f8c0dca2c1ad49a2744de8
5
5
  SHA512:
6
- metadata.gz: 3d9363a21eefec8e5262e5361de0eb8f55fd9f53cb3648c7e1d100d7e10a0a5b08bbe525ad0ec5e59ee8a5ab5cf94878c7b4a66b20fc9495278a2c4946d5a3d9
7
- data.tar.gz: 5d0bafb20a6461996c1f05fdd989c8e3e1f0d57192bc75439b1d488f9dfea2e6402e136415e178779d7b31b20a4902fd10b649199a18acd0568fc86f03b45b20
6
+ metadata.gz: bdbc0f49f4ca2787ec6b6075207824210c668d9ac6d7955fc8ce42f0b1728514f12c95696e24a4f509e65abf6409e752014ed8e2d463fc59ee731194afe2ac18
7
+ data.tar.gz: 3a876a2fa0d1c0d23325b10a0a1aef032561b74d07cc365300d3b8e50741b6c5f2f76fb59677e68fbad6a8df8f77f263817c8b6ddb2a6d56327a2a06e782c70e
@@ -1 +1,12 @@
1
- @import "tomify/*";
1
+ @import "bootstrap";
2
+ @import "font-awesome";
3
+ @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,700|Dosis:400,700);
4
+
5
+ @import "tomify/variables";
6
+ @import "tomify/default";
7
+ @import "tomify/header";
8
+ @import "tomify/navbar";
9
+ @import "tomify/content";
10
+ @import "tomify/pagination";
11
+ @import "tomify/plugins";
12
+ @import "tomify/footer";
@@ -0,0 +1,33 @@
1
+ .public.content {
2
+ h1 { color: $brand; text-align: center; }
3
+ h2, h3, h4, h5, h6 { font-weight: bold; }
4
+ table, p, li { text-align: left; }
5
+ table { width: 100%; }
6
+ div > ul > li {
7
+ margin-top: 5px;
8
+ font-size: 18px;
9
+ &:before { top: 1px; }
10
+ :not(p) { font-size: 14px; padding-left: 20px; }
11
+ }
12
+ ul {
13
+ list-style-type: none;
14
+ padding-left: 0;
15
+ }
16
+ li {
17
+ position: relative;
18
+ padding-left: 25px;
19
+ &:before {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ font-family: "FontAwesome";
24
+ content: "\f058";
25
+ color: $brand;
26
+ }
27
+ ul li:before { content: "\f055"; }
28
+ }
29
+
30
+ .page {
31
+ h2, h3 { text-align: center; }
32
+ }
33
+ }
@@ -1,8 +1,3 @@
1
- @import "bootstrap";
2
- @import "variables";
3
- @import "font-awesome";
4
- @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,700|Dosis:400,700);
5
-
6
1
  html, body {
7
2
  margin: 0;
8
3
  padding: 0;
@@ -25,6 +20,10 @@ em { font-size: 24px; }
25
20
  }
26
21
  }
27
22
 
23
+ .panel-group .panel-title > a {
24
+ text-decoration: underline;
25
+ }
26
+
28
27
  .with-sidebar {
29
28
  .dynamic-sm {
30
29
  @include make-md-column(8);
@@ -8,6 +8,10 @@ module Tomify::Concerns::Default::Helper
8
8
  end
9
9
 
10
10
  def page
11
- @page || Tomify.models.page.default
11
+ return @page if @page
12
+
13
+ default_page = Tomify.models.page.default
14
+ default_page.admin = self.class.name.include? "Admin::"
15
+ default_page
12
16
  end
13
17
  end
@@ -2,6 +2,8 @@ module Tomify::Concerns::Page
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
+ attr_accessor :admin
6
+
5
7
  mount_uploader :cover_image, Tomify.uploaders.setting
6
8
  mount_uploader :share_image, Tomify.uploaders.setting
7
9
 
@@ -1,7 +1,7 @@
1
1
  .container-fluid
2
- .row.text-center
2
+ .row
3
3
  .dynamic-md
4
- .page= record.text_to_html
4
+ = record.text_to_html
5
5
  - if contact_email = setting(:contact_email)
6
6
  %p
7
7
  = link_to "mailto:#{contact_email}", target: :_blank do
@@ -1,4 +1,3 @@
1
- .container-fluid
2
- .row.text-center
3
- .dynamic-md
4
- .page= record.text_to_html
1
+ .row
2
+ .dynamic-md
3
+ = record.text_to_html
@@ -1,8 +1,8 @@
1
1
  - sidebar = page.sidebar if page.sidebar&.active
2
- .container-fluid{class: "with#{"out" unless sidebar }-sidebar"}
2
+ .container-fluid.content{class: "with#{"out" unless sidebar }-sidebar #{"public" unless page.admin}"}
3
3
  .row
4
4
  - if sidebar
5
- .col-md-8= yield
5
+ .col-md-8.page= yield
6
6
  .col-md-4.sidebar= render template: "templates/#{sidebar.template}", locals: { record: sidebar }
7
7
  - else
8
- .col-md-12= yield
8
+ .col-md-12.page= yield
@@ -1,3 +1,3 @@
1
1
  module Tomify
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Prats
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-29 00:00:00.000000000 Z
11
+ date: 2017-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -307,11 +307,11 @@ files:
307
307
  - app/assets/javascripts/tomify/turbolinks/compatibility.coffee
308
308
  - app/assets/javascripts/tomify/turbolinks/react.coffee
309
309
  - app/assets/stylesheets/_tomify.scss
310
+ - app/assets/stylesheets/tomify/_content.scss
310
311
  - app/assets/stylesheets/tomify/_default.scss
311
312
  - app/assets/stylesheets/tomify/_footer.scss
312
313
  - app/assets/stylesheets/tomify/_header.scss
313
314
  - app/assets/stylesheets/tomify/_navbar.scss
314
- - app/assets/stylesheets/tomify/_page.scss
315
315
  - app/assets/stylesheets/tomify/_pagination.scss
316
316
  - app/assets/stylesheets/tomify/_plugins.scss
317
317
  - app/assets/stylesheets/tomify/_variables.scss
@@ -1,35 +0,0 @@
1
- .page, .sidebar {
2
- h1 { color: $brand; }
3
- h2, h3 { font-style: italic; }
4
- h2 { font-size: 1.5em; }
5
- h3 { font-size: 1.25em; }
6
- h2, h3, table, p, li { text-align: left; }
7
- table { width: 100%; }
8
- > ul > li {
9
- margin-top: 10px;
10
- font-size: 24px;
11
- &:before { top: -1px; }
12
- :not(p) { font-size: 14px; }
13
- }
14
- ul {
15
- list-style-type: none;
16
- padding-left: 0;
17
- }
18
- li {
19
- position: relative;
20
- padding-left: 25px;
21
- &:before {
22
- position: absolute;
23
- top: 0;
24
- left: 0;
25
- font-family: "FontAwesome";
26
- content: "\f058";
27
- color: $brand;
28
- }
29
- ul li:before { content: "\f055"; }
30
- }
31
- }
32
-
33
- .sidebar {
34
- h1, h2, h3, h4, h5, h6 { margin-top: 0; }
35
- }