magrathea 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 57fd67de0fcd34e09f496ee3076a08ce3ff7d6fd54a0251ac3897593ddcf0147
4
- data.tar.gz: 4f8ad9b036e35bbb78271a923c76ab666010839650e374a3b6f1491921c5ee63
3
+ metadata.gz: 1be538a37f89b6e665df7047a3dbc2d7ddab18f960d3e41ce2523586cd8bf1c5
4
+ data.tar.gz: c6e42736487e718977dc52f98258f771b318ce86551b8be7248594772bd82ab8
5
5
  SHA512:
6
- metadata.gz: daa143c17db37b12d0e1ccc97f0b574edee5bc62a743f65d66de53806eaa1c2abf74a5dd046768db93ce30f2e3a451ee378c10e522a010836883a982d18131b3
7
- data.tar.gz: bae262b2c12ba39d5e72d32476583d0f7349557ba35cf5f0d8e7d78a1ccfacb9b4c8a9b6ad0faf0db9667a9dcc171da5106fd92bb1ac6da0db37841f48402191
6
+ metadata.gz: 8bd024fba65be90dcaa57769bb4f16755a170388c3bc5fec6cf5ffde54406f634bf953423030ddfaec1ef097e5e53ea3d4b4c03da79b3d39c35b48f3cfc1dde1
7
+ data.tar.gz: a7a2fec02e46f4fb68b70ca28cb6dd6431544dc7e0a345e4a8257aaa3b501cd3c59c8d7b317ce98ae1cc0a79b0a528bae600799c18572b472145a2c48a56b696
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
4
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
+
6
+ ---
7
+ ## 0.2.0
8
+ ### Added
9
+ - Updated typography styles to aim for a first "set" of HTML element support
10
+ - Updated a lot of documentation for this project
11
+ - Added this changelog bro
12
+
13
+ ---
14
+ ## 0.1.0
15
+ ### Added
16
+ - Went through initial gem template setup
17
+ - Added some initial JS and markup for a "theme switch" component
18
+ - Pushed to prod!
19
+
20
+ ---
data/README.md CHANGED
@@ -34,7 +34,7 @@ In `application.js` add:
34
34
  //= require magrathea
35
35
  ```
36
36
 
37
- Somewhere in your markup, you'll need to add the switch code as well:
37
+ Somewhere in an app view, you'll need to add the markup for the switch code as well:
38
38
  ```
39
39
  <div class="magrathea-switch-wrapper">
40
40
  <label class="magrathea-switch" for="checkbox">
@@ -45,7 +45,6 @@ Somewhere in your markup, you'll need to add the switch code as well:
45
45
  </div>
46
46
  ```
47
47
 
48
-
49
48
  ## Development
50
49
 
51
50
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also
@@ -1,3 +1,3 @@
1
1
  module Magrathea
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -4,25 +4,28 @@ Gem::Specification.new do |spec|
4
4
  spec.name = "magrathea"
5
5
  spec.version = Magrathea::VERSION
6
6
  spec.authors = ["erik yuzwa"]
7
- spec.email = ["erikyuzwa@gmail.com"]
7
+ spec.email = ["wazoo@hey.com"]
8
8
 
9
- spec.summary = %q{Write a short summary, because RubyGems requires one.}
10
- spec.description = %q{Write a longer description or delete this line.}
9
+ spec.summary = %q{Get the conversation started to use a dark-light theme structure with your CSS.}
10
+ spec.description = %q{Start the conversation in your project to use a dark-light theme structure with your CSS. The aim is NOT trying to come up with a drop-in replacement for every current / legacy Rails project out there.}
11
11
  spec.homepage = "https://github.com/erikyuzwa/magrathea"
12
12
  spec.license = "MIT"
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
14
 
15
- #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
15
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
16
16
 
17
- #spec.metadata["homepage_uri"] = spec.homepage
18
- #spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
19
- #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/erikyuzwa/magrathea"
19
+ spec.metadata["changelog_uri"] = "https://github.com/erikyuzwa/magrathea/blob/main/CHANGELOG.md"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- end
23
+ # TODO: the following was generated but didn't work when I ran gem build
24
+ # spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
+ # `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ # end
27
+ spec.files = %w[Gemfile CHANGELOG.md CODE_OF_CONDUCT.md LICENSE.txt Rakefile README.md magrathea.gemspec lib/magrathea/version.rb lib/magrathea.rb vendor/assets/javascripts/magrathea.js vendor/assets/stylesheets/_colors.scss vendor/assets/stylesheets/_dark.scss vendor/assets/stylesheets/_light.scss vendor/assets/stylesheets/_theme-switch.scss vendor/assets/stylesheets/_typography.scss vendor/assets/stylesheets/magrathea.scss]
28
+
26
29
  spec.bindir = "exe"
27
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
31
  spec.require_paths = ["lib"]
@@ -3,6 +3,8 @@
3
3
  // Licensed under the MIT license. See LICENSE.txt file in the project root for details.
4
4
  //
5
5
 
6
+ // TODO: figure out how to export this for rails6 webpacker usage
7
+ // keep this simple as we can without any dependencies
6
8
  (function() {
7
9
 
8
10
  var win = this;
@@ -10,13 +12,14 @@
10
12
 
11
13
  const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
12
14
 
15
+ // TODO: lots more error handling around localStorage needed even in 2020
13
16
  function switchTheme(e) {
14
17
  if (e.target.checked) {
15
18
  document.documentElement.setAttribute('data-theme', 'dark');
16
- localStorage.setItem('theme', 'dark'); //add this
19
+ localStorage.setItem('theme', 'dark');
17
20
  } else {
18
21
  document.documentElement.setAttribute('data-theme', 'light');
19
- localStorage.setItem('theme', 'light'); //add this
22
+ localStorage.setItem('theme', 'light');
20
23
  }
21
24
  }
22
25
 
@@ -2,6 +2,10 @@
2
2
  // Copyright (c) Erik Yuzwa of Wazoo Media. All rights reserved.
3
3
  // Licensed under the MIT license. See LICENSE.txt file in the project root for details.
4
4
  //
5
+
6
+ // TODO: put in some real color palette work here, then use them as variables for variables
7
+
8
+
5
9
  $light-primary-color: #302ae6;
6
10
  $light-secondary-color: #536390;
7
11
  $light-font-color: #424242;
@@ -2,9 +2,7 @@
2
2
  // Copyright (c) Erik Yuzwa of Wazoo Media. All rights reserved.
3
3
  // Licensed under the MIT license. See LICENSE.txt file in the project root for details.
4
4
  //
5
- /**
6
- * some simple CSS to style the dark-light theme switch
7
- */
5
+ // TODO: these styles need a lot of improving -- maybe even removal? Just allow for our JS to tap into a checkbox event?
8
6
 
9
7
  .theme-switch-wrapper {
10
8
  display: flex;
@@ -7,10 +7,16 @@ body {
7
7
  color: var(--font-color);
8
8
  }
9
9
 
10
- h1 {
10
+ h1, h3, h5 {
11
+ color: var(--primary-color);
12
+ }
13
+
14
+ h2, h4, h6 {
11
15
  color: var(--secondary-color);
12
16
  }
13
17
 
14
18
  a {
15
19
  color: var(--primary-color);
16
20
  }
21
+
22
+
@@ -9,5 +9,6 @@
9
9
  @import "dark";
10
10
  @import "typography";
11
11
 
12
+ // TODO: figure out a way to make this optional? A LOT of projects using this gem will have their own styles
12
13
  @import "theme-switch";
13
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magrathea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - erik yuzwa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-27 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails
@@ -24,23 +24,21 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '6.0'
27
- description: Write a longer description or delete this line.
27
+ description: Start the conversation in your project to use a dark-light theme structure
28
+ with your CSS. The aim is NOT trying to come up with a drop-in replacement for every
29
+ current / legacy Rails project out there.
28
30
  email:
29
- - erikyuzwa@gmail.com
31
+ - wazoo@hey.com
30
32
  executables: []
31
33
  extensions: []
32
34
  extra_rdoc_files: []
33
35
  files:
34
- - ".gitignore"
35
- - ".rspec"
36
- - ".travis.yml"
36
+ - CHANGELOG.md
37
37
  - CODE_OF_CONDUCT.md
38
38
  - Gemfile
39
39
  - LICENSE.txt
40
40
  - README.md
41
41
  - Rakefile
42
- - bin/console
43
- - bin/setup
44
42
  - lib/magrathea.rb
45
43
  - lib/magrathea/version.rb
46
44
  - magrathea.gemspec
@@ -54,7 +52,10 @@ files:
54
52
  homepage: https://github.com/erikyuzwa/magrathea
55
53
  licenses:
56
54
  - MIT
57
- metadata: {}
55
+ metadata:
56
+ homepage_uri: https://github.com/erikyuzwa/magrathea
57
+ source_code_uri: https://github.com/erikyuzwa/magrathea
58
+ changelog_uri: https://github.com/erikyuzwa/magrathea/blob/main/CHANGELOG.md
58
59
  post_install_message:
59
60
  rdoc_options: []
60
61
  require_paths:
@@ -74,5 +75,6 @@ rubyforge_project:
74
75
  rubygems_version: 2.7.6.2
75
76
  signing_key:
76
77
  specification_version: 4
77
- summary: Write a short summary, because RubyGems requires one.
78
+ summary: Get the conversation started to use a dark-light theme structure with your
79
+ CSS.
78
80
  test_files: []
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
-
13
- .idea/
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.5.8
6
- before_install: gem install bundler -v 2.1.4
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "magrathea"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here