presently 0.21.0 → 0.22.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d60b3fb59bbf07f0fdd4f3e1756998485049e2b55dc56225160e160af02346e
4
- data.tar.gz: 4837aa9c8574f3b759a3199db53ad263d323df5cd6239df7292e8535ad83702c
3
+ metadata.gz: bceb99c19c4563f60e51fe3e17cce836c7176ebd9b695919af5737ccc87fd4ca
4
+ data.tar.gz: 102b2bbab9019d17c5aadb85c3f40044c1e94bdb2e587482c246d0c184f5fa36
5
5
  SHA512:
6
- metadata.gz: b597972eabe2fec25758be28d3630db39756e93e7e2c24c43cfcdbaca3385741c1306748ada054cc7ea9d8bdbe9ba91f05217453cd5bfca3a1be5c2cc885b8d9
7
- data.tar.gz: 122236fe265570f0be41163f662376b55df718d28ee52eada7e796c415ea52edd0f8f225649e1b9438d457cbb9281c2d06674274a80a33d6ec7b12ef304bed80
6
+ metadata.gz: 8edf0ac3857670ce3afe65522bdf9d560b2f909fb68a85a43161200047f6a8fe588be5bef3ee685ca007a927d47999b5afc7c0db65ae43896c78b018ec347ffc
7
+ data.tar.gz: b8cca4183e4494e9fdd2923e429bc3bdca75310f127eba5474f410214c90f2cd5a0b2d89bb03df1e887673d30b81ebb45320b3af5853b73f137e6fbe6c2554f7
checksums.yaml.gz.sig CHANGED
Binary file
@@ -192,7 +192,7 @@ Use semantic classes and CSS custom properties so that meaning remains separate
192
192
  .diagram-node {
193
193
  --node-color: var(--accent);
194
194
  border: 0.08em solid var(--node-color);
195
- background: color-mix(in srgb, var(--node-color) 10%, var(--slide-bg));
195
+ background: color-mix(in srgb, var(--node-color) 10%, var(--slide-background));
196
196
  }
197
197
 
198
198
  .diagram-node[data-tone="storage"] {
@@ -72,10 +72,11 @@ module Presently
72
72
 
73
73
  # Create a Presently page with the presentation-specific stylesheets.
74
74
  # @parameter view [Live::View] The root view for the page.
75
+ # @parameter interface [Symbol | Nil] The interface-specific stylesheet to load.
75
76
  # @returns [Page] The presentation page.
76
- def make_page(view)
77
+ def make_page(view, interface: nil)
77
78
  stylesheets = controller.presentation.stylesheets.map(&:url)
78
- Page.new(title: title, body: view, stylesheets: stylesheets)
79
+ Page.new(title: title, body: view, interface: interface, stylesheets: stylesheets)
79
80
  end
80
81
 
81
82
  # Add Presently's application routes.
@@ -83,12 +84,12 @@ module Presently
83
84
  def configure_routes(router)
84
85
  router.get("/") do
85
86
  body = resolver.root(HomeView)
86
- Page.new(title: title, body: body).call
87
+ Page.new(title: title, body: body, interface: :home).call
87
88
  end
88
89
 
89
- router.get("/display"){make_page(resolver.root(DisplayView)).call}
90
- router.get("/presenter"){make_page(resolver.root(PresenterView)).call}
91
- router.get("/record"){make_page(resolver.root(RecordingView)).call}
90
+ router.get("/display"){make_page(resolver.root(DisplayView), interface: :display).call}
91
+ router.get("/presenter"){make_page(resolver.root(PresenterView), interface: :presenter).call}
92
+ router.get("/record"){make_page(resolver.root(RecordingView), interface: :recorder).call}
92
93
 
93
94
  router.route("/recordings", methods: ["GET", "HEAD", "PUT"]) do |request|
94
95
  handle_recording(request, request_parameters(request))
@@ -4,6 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
 
6
6
  <link rel="stylesheet" href="/_static/index.css" type="text/css" />
7
+ <link rel="stylesheet" href="/_static/slides.css" type="text/css" />
8
+ <link rel="stylesheet" href="/_static/export.css" type="text/css" />
7
9
  <link rel="stylesheet" href="/_static/custom.css" type="text/css" />
8
10
  <link rel="stylesheet" href="/_components/@socketry/syntax/themes/base/syntax.css" type="text/css" />
9
11
  <?r self.stylesheets.each do |stylesheet| ?>
@@ -13,8 +13,17 @@ module Presently
13
13
  class Page < Lively::Page
14
14
  ICON = "/_static/icon.png"
15
15
  STYLESHEETS = [
16
- {href: "/_static/site.css", media: "screen"}.freeze,
17
16
  {href: "/_static/index.css", media: "screen"}.freeze,
17
+ ].freeze
18
+ SLIDES_STYLESHEET = {href: "/_static/slides.css", media: "screen"}.freeze
19
+ INTERFACE_STYLESHEETS = {
20
+ home: [{href: "/_static/home.css", media: "screen"}.freeze].freeze,
21
+ display: [SLIDES_STYLESHEET, {href: "/_static/display.css", media: "screen"}.freeze].freeze,
22
+ presenter: [SLIDES_STYLESHEET, {href: "/_static/presenter.css", media: "screen"}.freeze].freeze,
23
+ recorder: [SLIDES_STYLESHEET, {href: "/_static/recorder.css", media: "screen"}.freeze].freeze,
24
+ }.freeze
25
+ DEFAULT_INTERFACE_STYLESHEETS = INTERFACE_STYLESHEETS.values.flatten.uniq.freeze
26
+ TRAILING_STYLESHEETS = [
18
27
  {href: "/_static/custom.css", media: "screen"}.freeze,
19
28
  {href: "/_components/@socketry/syntax/themes/base/syntax.css", media: "screen"}.freeze,
20
29
  ].freeze
@@ -31,13 +40,16 @@ module Presently
31
40
  # Initialize a new page.
32
41
  # @parameter title [String] The page title.
33
42
  # @parameter body [Live::View | Nil] The Live view to embed in the page.
43
+ # @parameter interface [Symbol | Nil] The interface-specific stylesheets to load, or all interface stylesheets by default for compatibility.
34
44
  # @parameter stylesheets [Array(String | Hash)] Presentation-specific stylesheets.
35
- def initialize(title: "Presently", body: nil, stylesheets: [])
45
+ def initialize(title: "Presently", body: nil, interface: nil, stylesheets: [])
46
+ interface_stylesheets = interface ? INTERFACE_STYLESHEETS.fetch(interface) : DEFAULT_INTERFACE_STYLESHEETS
47
+
36
48
  super(
37
49
  title: title,
38
50
  body: body,
39
51
  icon: ICON,
40
- stylesheets: STYLESHEETS + stylesheets,
52
+ stylesheets: STYLESHEETS + interface_stylesheets + TRAILING_STYLESHEETS + stylesheets,
41
53
  imports: IMPORTS,
42
54
  modules: MODULES,
43
55
  )
@@ -7,8 +7,9 @@
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
8
 
9
9
  <link rel="icon" type="image/png" href="/_static/icon.png" />
10
- <link rel="stylesheet" href="/_static/site.css" type="text/css" media="screen" />
11
10
  <link rel="stylesheet" href="/_static/index.css" type="text/css" media="screen" />
11
+ <link rel="stylesheet" href="/_static/slides.css" type="text/css" media="screen" />
12
+ <link rel="stylesheet" href="/_static/playback.css" type="text/css" media="screen" />
12
13
  <link rel="stylesheet" href="/_static/custom.css" type="text/css" media="screen" />
13
14
  <link rel="stylesheet" href="/_components/@socketry/syntax/themes/base/syntax.css" type="text/css" media="screen" />
14
15
  <?r self.stylesheets.each do |stylesheet| ?>
@@ -5,5 +5,5 @@
5
5
 
6
6
  # @namespace
7
7
  module Presently
8
- VERSION = "0.21.0"
8
+ VERSION = "0.22.0"
9
9
  end
@@ -1,74 +1,7 @@
1
- /* ========================
2
- ARCHITECTURE DIAGRAM
3
- ======================== */
4
-
5
- .arch-diagram {
6
- position: relative;
7
- width: 100%;
8
- height: 80%;
9
- font-family: var(--font-mono);
10
- font-size: 0.85em;
11
- }
12
-
13
- .arch-box {
14
- position: absolute;
15
- border-radius: 8px;
16
- padding: 0.9rem 1rem;
17
- }
18
-
19
- .arch-box-title {
20
- font-weight: bold;
21
- margin-bottom: 0.6rem;
22
- }
23
-
24
- .arch-component {
25
- border-radius: 4px;
26
- padding: 0.35rem 0.5rem;
27
- text-align: center;
28
- margin-bottom: 0.35rem;
29
- }
30
-
31
- .arch-component:last-child {
32
- margin-bottom: 0;
33
- }
34
-
35
- .arch-server {
36
- border: 2px solid #f90;
37
- }
38
-
39
- .arch-server .arch-component {
40
- border: 1px solid #666;
41
- }
42
-
43
- .arch-display {
44
- border: 2px solid #4a9eff;
45
- }
46
-
47
- .arch-display .arch-component {
48
- border: 1px solid #666;
49
- }
50
-
51
- .arch-display .arch-ws {
52
- border-color: #4a9eff;
53
- color: #4a9eff;
54
- }
55
-
56
- .arch-presenter {
57
- border: 2px solid #a78bfa;
58
- }
59
-
60
- .arch-presenter .arch-component {
61
- border: 1px solid #666;
62
- }
63
-
64
- .arch-presenter .arch-ws {
65
- border-color: #a78bfa;
66
- color: #a78bfa;
67
- }
68
-
69
- .arch-arrow {
70
- position: absolute;
71
- text-align: center;
72
- color: #888;
73
- font-size: 0.8em;
74
- }
1
+ /*
2
+ * Add presentation-wide CSS overrides to this file.
3
+ * Prefer colocated slide- and section-specific stylesheets for focused changes:
4
+ * `slides/010-introduction.css` styles `slides/010-introduction.md`, while
5
+ * `slides/020-topic/style.css` styles every slide in `slides/020-topic/`.
6
+ * It intentionally contains no CSS rules by default.
7
+ */
@@ -0,0 +1,25 @@
1
+ /* ========================
2
+ DISPLAY VIEW (audience)
3
+ ======================== */
4
+
5
+ .display {
6
+ width: 100vw;
7
+ height: 100vh;
8
+ background: var(--slide-background);
9
+ position: relative;
10
+ outline: none;
11
+ }
12
+
13
+ .display .slide-container {
14
+ width: 100%;
15
+ height: 100%;
16
+ position: relative;
17
+ }
18
+
19
+ .display .slide-counter {
20
+ position: absolute;
21
+ bottom: 1rem;
22
+ right: 1.5rem;
23
+ font-size: 0.9rem;
24
+ opacity: 0.4;
25
+ }
@@ -0,0 +1,111 @@
1
+ /* ========================
2
+ EXPORT PAGE LAYOUT
3
+ ======================== */
4
+
5
+ /* Allow multi-page layout — overrides the default full-viewport body. */
6
+ body.export {
7
+ height: auto;
8
+ overflow: visible;
9
+ }
10
+
11
+ /*
12
+ * Each export-page div maps to one printed page.
13
+ * Dimensions are set via inline styles from Export::PageSize so they can
14
+ * be configured at export time. CSS just handles layout and overflow.
15
+ */
16
+ .export-page {
17
+ position: relative;
18
+ overflow: hidden;
19
+ break-after: page;
20
+ page-break-after: always;
21
+ }
22
+
23
+ .export-slide-area {
24
+ position: relative;
25
+ overflow: hidden;
26
+ }
27
+
28
+ /* Notes panel below the slide. */
29
+ .export-notes-area {
30
+ padding: 0.5rem 2rem 0.5rem;
31
+ background: #0d0d1f;
32
+ border-top: 2px solid var(--accent);
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: 0.4rem;
36
+ overflow: hidden;
37
+ }
38
+
39
+ /* Meta strip — mirrors the timing bar in the presenter view. */
40
+ .export-meta {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 1.5rem;
44
+ flex-shrink: 0;
45
+ font-size: 0.75rem;
46
+ opacity: 0.75;
47
+ font-family: var(--font-sans);
48
+ }
49
+
50
+ .export-slide-number {
51
+ font-weight: 600;
52
+ }
53
+
54
+ .export-filename code {
55
+ font-family: var(--font-mono);
56
+ background: rgba(255,255,255,0.08);
57
+ padding: 0.1em 0.35em;
58
+ border-radius: 3px;
59
+ font-size: 0.9em;
60
+ }
61
+
62
+ .export-elapsed,
63
+ .export-duration {
64
+ opacity: 0.85;
65
+ }
66
+
67
+ .export-speaker {
68
+ margin-left: auto;
69
+ font-size: 0.8rem;
70
+ opacity: 0.9;
71
+ }
72
+
73
+ /* Override the shared notes panel to fit the compact export area. */
74
+ .export-notes-area .notes {
75
+ min-height: unset;
76
+ max-height: unset;
77
+ padding: 0;
78
+ background: none;
79
+ border-radius: 0;
80
+ flex: 1;
81
+ overflow: hidden;
82
+ }
83
+
84
+ /* ========================
85
+ PRINT MEDIA
86
+ ======================== */
87
+
88
+ @media print {
89
+ /* Allow full-document layout. */
90
+ html, body {
91
+ height: auto !important;
92
+ overflow: visible !important;
93
+ }
94
+
95
+ /* Ensure backgrounds (dark theme) are included in the PDF. */
96
+ html {
97
+ -webkit-print-color-adjust: exact;
98
+ print-color-adjust: exact;
99
+ }
100
+
101
+ /* Each export-page is one printed page. */
102
+ .export-page {
103
+ break-after: page;
104
+ page-break-after: always;
105
+ }
106
+
107
+ /* Strip the Live element wrapper chrome from the presenter view if somehow printed. */
108
+ live-view {
109
+ display: contents;
110
+ }
111
+ }
@@ -0,0 +1,97 @@
1
+ /* ========================
2
+ HOME
3
+ ======================== */
4
+
5
+ .home {
6
+ width: 100vw;
7
+ height: 100vh;
8
+ overflow: auto;
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: center;
12
+ padding: clamp(2rem, 8vw, 8rem);
13
+ background:
14
+ radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 20%, transparent), transparent 35rem),
15
+ var(--slide-background);
16
+ }
17
+
18
+ .home-heading,
19
+ .home-interfaces {
20
+ width: min(72rem, 100%);
21
+ margin-inline: auto;
22
+ }
23
+
24
+ .home-heading {
25
+ margin-bottom: 3rem;
26
+ }
27
+
28
+ .home-kicker {
29
+ margin: 0 0 0.75rem;
30
+ color: var(--accent-light);
31
+ font-size: 0.9rem;
32
+ font-weight: 700;
33
+ letter-spacing: 0.12em;
34
+ text-transform: uppercase;
35
+ }
36
+
37
+ .home-heading h1 {
38
+ margin: 0;
39
+ font-size: clamp(2.5rem, 6vw, 5rem);
40
+ line-height: 1;
41
+ }
42
+
43
+ .home-introduction {
44
+ max-width: 48rem;
45
+ margin: 1.25rem 0 0;
46
+ font-size: clamp(1.1rem, 2vw, 1.4rem);
47
+ line-height: 1.5;
48
+ opacity: 0.72;
49
+ }
50
+
51
+ .home-interfaces {
52
+ display: grid;
53
+ grid-template-columns: repeat(2, minmax(0, 1fr));
54
+ gap: 1rem;
55
+ }
56
+
57
+ .home-interface {
58
+ display: flex;
59
+ min-height: 10rem;
60
+ flex-direction: column;
61
+ justify-content: space-between;
62
+ gap: 1.5rem;
63
+ padding: 1.75rem;
64
+ border: 1px solid rgba(255, 255, 255, 0.12);
65
+ border-radius: 0.75rem;
66
+ background: color-mix(in srgb, var(--surface) 82%, transparent);
67
+ color: inherit;
68
+ text-decoration: none;
69
+ transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
70
+ }
71
+
72
+ .home-interface:hover,
73
+ .home-interface:focus-visible {
74
+ border-color: var(--accent-light);
75
+ background: color-mix(in srgb, var(--surface-light) 85%, transparent);
76
+ transform: translateY(-0.2rem);
77
+ outline: none;
78
+ }
79
+
80
+ .home-interface strong {
81
+ font-size: 1.4rem;
82
+ }
83
+
84
+ .home-interface span {
85
+ line-height: 1.5;
86
+ opacity: 0.7;
87
+ }
88
+
89
+ @media (max-width: 48rem) {
90
+ .home {
91
+ justify-content: flex-start;
92
+ }
93
+
94
+ .home-interfaces {
95
+ grid-template-columns: 1fr;
96
+ }
97
+ }