newport 1.0.5 → 1.0.6

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: d812d5ec4ba1fe03c1755f96d5ded800af0c424dac23d8f0c4bc04a9d9424840
4
- data.tar.gz: 7ff68730b4d239029c0f58077cc8370179ffebe4bddfcbc0ee8c90c646cc7d18
3
+ metadata.gz: e111cd4c09644217b541f2a4a54ff5be9b20f2fad5ce8819a821a0cb77f2a657
4
+ data.tar.gz: '0862e9f1354dc4ac499c2a00f548fbe60f507a4cf25f5fd265e05f333fac8a52'
5
5
  SHA512:
6
- metadata.gz: 6ec91bcbaca6dc17e5af8dc12e37deeedb00e7bb5a00e26a7f734bba835d2d8c8c0a64ebd26ebc8964dde1b880e86bc7db8a09d792ea04cb0121cf0c56f5b3b9
7
- data.tar.gz: 49cabe94441f6e2525d140eecf87025902e53f94d08b7f0adaf2738d5cc0122051dec802e25df8f14dddb89d504d5536d5900087975a594235b3b7325a8a98c0
6
+ metadata.gz: f6f8f1d31101f91d3bc1c25f7b82d243fabe4b2ff761df354333d283db88f7c439e1f9b8ec1c16e30385c80b6c1c92fa779a13703934e69b096b51b8f0626a34
7
+ data.tar.gz: 531cee4fbafa6b18c405d520fc658b4530e5024473545725250226de4f8be966180e971aeb32a6788b59a8f5548c8f85cb9daa645b4c14ba79c30db414b4502b
data/README.md CHANGED
@@ -1,16 +1,25 @@
1
+ [https://richard.fisher.cymru](https://richard.fisher.cymru)
2
+
1
3
  # Newport
2
- Newport is a simple Ruby script for building a single file blog/static site.
4
+ Newport is a Ruby Gem for building a single file blog/static site.
3
5
 
4
6
  ## Getting Started
5
- - Install Ruby
6
- - Install the bundler gem
7
- - Clone or download this repository
8
- - Run `bundle`
9
- - Modify the layouts and add some posts
10
- - Run `bundle exec ruby build.rb`
7
+ - `gem install newport`
8
+ - `newport new <path>`
9
+ - `cd <path>`
10
+ - `newport build`
11
11
 
12
12
  ## Plugins
13
13
  Plugins are available in the plugins directory and are pure javascript. Plugins are run after the page loads and can modify the contents.
14
14
 
15
15
  ### Expander
16
16
  For example the expander plugin will loop through your posts and show n number of paragraphs for each one and hide the rest, adding a down arrow to click to expand and show the full post.
17
+
18
+ ### Pagination
19
+ Set the variable show in pagination.js to the number of posts you want to display per page. The plugin will automatically add an arrow to click to show more.
20
+
21
+ ### Permalinks
22
+ Add a hash to the end of each post that links to the permanent location for that post.
23
+
24
+ ### Dark Mode
25
+ Shows a light/dark toggle to toggle between light mode and dark mode. It uses cookies to remember your selection. There are some css variables that you can change for light/dark mode in style.css
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Newport
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.6'
5
5
  end
@@ -3,7 +3,7 @@ body{margin:0;padding:0 0.5em;background-color: var(--background-color);color: v
3
3
  .container{max-width:768px;margin:auto;padding-left:5px;padding-right:5px}
4
4
  body{font-family:monospace;font-size:1.1rem;line-height:1.2rem;}
5
5
  a,a:active,a:visited{color:#1FC5FF;text-decoration:none}
6
- article h1 {margin-bottom:3px}
6
+ article h1 {margin-bottom:3px;color:var(--h1-color)}
7
7
  article h2 {margin-top:-1em;color:#EA4D89;font-weight:normal;font-size:0.85rem;margin: 0}
8
8
  pre{white-space: pre-wrap}
9
9
  article{margin-bottom:3em}
@@ -11,12 +11,12 @@ nav{text-align:right;padding-top:0.5rem}
11
11
  article img{margin: auto;display: block}
12
12
  article blockquote{margin-left:25px;border-left:10px #ddd solid;padding-left:15px;white-space: pre-wrap}
13
13
  img{max-width: 100%;}
14
- h1 a,h1 a:active,h1 a:visited{color:#111;}
14
+ h1 a,h1 a:active,h1 a:visited{color:var(--h1-color)}
15
15
  .title{float:left;padding-top:0.5rem}
16
16
  section{margin-top:2rem}
17
17
  #darkmode{display:inline}
18
18
  .expander-arrow, .more-arrow, .more-arrow:active, .more-arrow:visited { color: var(--text-color); fill: var(--text-color) }
19
- footer {border-top: 1px #ccc solid;min-height: 80px;padding-top: 10px;padding-bottom:15px}
19
+ footer {border-top: 1px var(--footer-border-color) solid;min-height: 80px;padding-top: 10px;padding-bottom:15px}
20
20
  .main {min-height: calc(100% - 40px)}
21
21
  code{background:var(--code-background-color);padding-left:2px;padding-right:2px}
22
22
 
@@ -24,12 +24,16 @@ code{background:var(--code-background-color);padding-left:2px;padding-right:2px}
24
24
  --background-color: #fafafa;
25
25
  --text-color: #111;
26
26
  --code-background-color: #ccc;
27
+ --footer-border-color: #ccc;
28
+ --h1-color: #111;
27
29
  }
28
30
 
29
31
  [data-theme="dark"] {
30
- --background-color: #111;
31
- --text-color: #fafafa;
32
+ --background-color: #0D1117;
33
+ --text-color: #8B949E;
32
34
  --code-background-color: #888;
35
+ --footer-border-color: #555;
36
+ --h1-color: #ddd;
33
37
  }
34
38
 
35
39
  /* The switch - the box around the slider */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Fisher
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-23 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorator
@@ -44,26 +44,6 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.3.1
47
- - !ruby/object:Gem::Dependency
48
- name: mercenary
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 0.3.6
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: '0.5'
57
- type: :runtime
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 0.3.6
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: '0.5'
67
47
  - !ruby/object:Gem::Dependency
68
48
  name: rss
69
49
  requirement: !ruby/object:Gem::Requirement