trahald 0.0.4 → 0.0.5

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.
Files changed (41) hide show
  1. data/.gitignore +2 -1
  2. data/.travis.yml +16 -0
  3. data/Gemfile.lock +58 -0
  4. data/README.md +29 -8
  5. data/lib/public/lib/markdown/markdown.js +1616 -0
  6. data/lib/public/lib/masonry/jquery.masonry.min.js +10 -0
  7. data/lib/public/lib/reveal/markdown.js +151 -0
  8. data/lib/public/lib/reveal/showdown.js +62 -0
  9. data/lib/public/lib/reveal/theme/beige.css +142 -0
  10. data/lib/public/lib/reveal/theme/default.css +150 -0
  11. data/lib/public/lib/reveal/theme/moon.css +142 -0
  12. data/lib/public/lib/reveal/theme/night.css +130 -0
  13. data/lib/public/lib/reveal/theme/serif.css +130 -0
  14. data/lib/public/lib/reveal/theme/simple.css +132 -0
  15. data/lib/public/lib/reveal/theme/sky.css +136 -0
  16. data/lib/public/lib/reveal/theme/solarized.css +142 -0
  17. data/lib/trahald.rb +90 -11
  18. data/lib/trahald/.redis-client.rb.swn +0 -0
  19. data/lib/trahald/article.rb +34 -0
  20. data/lib/trahald/backend-base.rb +13 -0
  21. data/lib/trahald/git.rb +46 -1
  22. data/lib/trahald/markdown-body.rb +44 -0
  23. data/lib/trahald/redis-client.rb +33 -9
  24. data/lib/trahald/version.rb +1 -1
  25. data/lib/views/edit.slim +47 -10
  26. data/lib/views/fd.scss +22 -0
  27. data/lib/views/header.slim +13 -0
  28. data/lib/views/layout.slim +7 -4
  29. data/lib/views/list.slim +3 -1
  30. data/lib/views/page.slim +5 -8
  31. data/lib/views/slide.slim +37 -0
  32. data/lib/views/style.scss +3 -1
  33. data/lib/views/summary.slim +36 -0
  34. data/lib/views/tab.slim +10 -0
  35. data/lib/views/tab_edit.slim +10 -0
  36. data/spec/git_spec.rb +3 -23
  37. data/spec/redis-client_spec.rb +3 -25
  38. data/spec/spec_helper.rb +2 -1
  39. data/spec/support/shared_examples_for_backends.rb +38 -0
  40. data/trahald.gemspec +1 -0
  41. metadata +44 -4
@@ -0,0 +1,142 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
2
+ /**
3
+ * Solarized Dark theme for reveal.js.
4
+ * Author: Achim Staebler
5
+ */
6
+ @font-face {
7
+ font-family: 'League Gothic';
8
+ src: url("../../lib/font/league_gothic-webfont.eot");
9
+ src: url("../../lib/font/league_gothic-webfont.eot?#iefix") format("embedded-opentype"), url("../../lib/font/league_gothic-webfont.woff") format("woff"), url("../../lib/font/league_gothic-webfont.ttf") format("truetype"), url("../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular") format("svg");
10
+ font-weight: normal;
11
+ font-style: normal; }
12
+
13
+ /**
14
+ * Solarized colors by Ethan Schoonover
15
+ */
16
+ html * {
17
+ color-profile: sRGB;
18
+ rendering-intent: auto; }
19
+
20
+ /*********************************************
21
+ * GLOBAL STYLES
22
+ *********************************************/
23
+ body {
24
+ background: #002b36;
25
+ background-color: #002b36; }
26
+
27
+ .reveal {
28
+ font-family: "Lato", sans-serif;
29
+ font-size: 36px;
30
+ font-weight: 200;
31
+ letter-spacing: -0.02em;
32
+ color: #93a1a1; }
33
+
34
+ ::selection {
35
+ color: white;
36
+ background: #d33682;
37
+ text-shadow: none; }
38
+
39
+ /*********************************************
40
+ * HEADERS
41
+ *********************************************/
42
+ .reveal h1,
43
+ .reveal h2,
44
+ .reveal h3,
45
+ .reveal h4,
46
+ .reveal h5,
47
+ .reveal h6 {
48
+ margin: 0 0 20px 0;
49
+ color: #eee8d5;
50
+ font-family: "League Gothic", Impact, sans-serif;
51
+ line-height: 0.9em;
52
+ letter-spacing: 0.02em;
53
+ text-transform: uppercase;
54
+ text-shadow: none; }
55
+
56
+ .reveal h1 {
57
+ text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); }
58
+
59
+ /*********************************************
60
+ * LINKS
61
+ *********************************************/
62
+ .reveal a:not(.image) {
63
+ color: #268bd2;
64
+ text-decoration: none;
65
+ -webkit-transition: color 0.15s ease;
66
+ -moz-transition: color 0.15s ease;
67
+ -ms-transition: color 0.15s ease;
68
+ -o-transition: color 0.15s ease;
69
+ transition: color 0.15s ease; }
70
+
71
+ .reveal a:not(.image):hover {
72
+ color: #78b9e6;
73
+ text-shadow: none;
74
+ border: none; }
75
+
76
+ .reveal .roll span:after {
77
+ color: #fff;
78
+ background: #1a6091; }
79
+
80
+ /*********************************************
81
+ * IMAGES
82
+ *********************************************/
83
+ .reveal section img {
84
+ margin: 15px 0px;
85
+ background: rgba(255, 255, 255, 0.12);
86
+ border: 4px solid #93a1a1;
87
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
88
+ -webkit-transition: all 0.2s linear;
89
+ -moz-transition: all 0.2s linear;
90
+ -ms-transition: all 0.2s linear;
91
+ -o-transition: all 0.2s linear;
92
+ transition: all 0.2s linear; }
93
+
94
+ .reveal a:hover img {
95
+ background: rgba(255, 255, 255, 0.2);
96
+ border-color: #268bd2;
97
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
98
+
99
+ /*********************************************
100
+ * NAVIGATION CONTROLS
101
+ *********************************************/
102
+ .reveal .controls div.navigate-left,
103
+ .reveal .controls div.navigate-left.enabled {
104
+ border-right-color: #268bd2; }
105
+
106
+ .reveal .controls div.navigate-right,
107
+ .reveal .controls div.navigate-right.enabled {
108
+ border-left-color: #268bd2; }
109
+
110
+ .reveal .controls div.navigate-up,
111
+ .reveal .controls div.navigate-up.enabled {
112
+ border-bottom-color: #268bd2; }
113
+
114
+ .reveal .controls div.navigate-down,
115
+ .reveal .controls div.navigate-down.enabled {
116
+ border-top-color: #268bd2; }
117
+
118
+ .reveal .controls div.navigate-left.enabled:hover {
119
+ border-right-color: #78b9e6; }
120
+
121
+ .reveal .controls div.navigate-right.enabled:hover {
122
+ border-left-color: #78b9e6; }
123
+
124
+ .reveal .controls div.navigate-up.enabled:hover {
125
+ border-bottom-color: #78b9e6; }
126
+
127
+ .reveal .controls div.navigate-down.enabled:hover {
128
+ border-top-color: #78b9e6; }
129
+
130
+ /*********************************************
131
+ * PROGRESS BAR
132
+ *********************************************/
133
+ .reveal .progress {
134
+ background: rgba(0, 0, 0, 0.2); }
135
+
136
+ .reveal .progress span {
137
+ background: #268bd2;
138
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
139
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
140
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
141
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
142
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
@@ -0,0 +1,130 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Montserrat:700);
2
+ @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
3
+ /**
4
+ * Black theme for reveal.js.
5
+ *
6
+ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7
+ */
8
+ /*********************************************
9
+ * GLOBAL STYLES
10
+ *********************************************/
11
+ body {
12
+ background: #111111;
13
+ background-color: #111111; }
14
+
15
+ .reveal {
16
+ font-family: "Open Sans", sans-serif;
17
+ font-size: 30px;
18
+ font-weight: 200;
19
+ letter-spacing: -0.02em;
20
+ color: #eeeeee; }
21
+
22
+ ::selection {
23
+ color: white;
24
+ background: #e7ad52;
25
+ text-shadow: none; }
26
+
27
+ /*********************************************
28
+ * HEADERS
29
+ *********************************************/
30
+ .reveal h1,
31
+ .reveal h2,
32
+ .reveal h3,
33
+ .reveal h4,
34
+ .reveal h5,
35
+ .reveal h6 {
36
+ margin: 0 0 20px 0;
37
+ color: #eeeeee;
38
+ font-family: "Montserrat", Impact, sans-serif;
39
+ line-height: 0.9em;
40
+ letter-spacing: -0.03em;
41
+ text-transform: none;
42
+ text-shadow: none; }
43
+
44
+ .reveal h1 {
45
+ text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); }
46
+
47
+ /*********************************************
48
+ * LINKS
49
+ *********************************************/
50
+ .reveal a:not(.image) {
51
+ color: #e7ad52;
52
+ text-decoration: none;
53
+ -webkit-transition: color 0.15s ease;
54
+ -moz-transition: color 0.15s ease;
55
+ -ms-transition: color 0.15s ease;
56
+ -o-transition: color 0.15s ease;
57
+ transition: color 0.15s ease; }
58
+
59
+ .reveal a:not(.image):hover {
60
+ color: #f3d7ac;
61
+ text-shadow: none;
62
+ border: none; }
63
+
64
+ .reveal .roll span:after {
65
+ color: #fff;
66
+ background: #d08a1d; }
67
+
68
+ /*********************************************
69
+ * IMAGES
70
+ *********************************************/
71
+ .reveal section img {
72
+ margin: 15px 0px;
73
+ background: rgba(255, 255, 255, 0.12);
74
+ border: 4px solid #eeeeee;
75
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
76
+ -webkit-transition: all 0.2s linear;
77
+ -moz-transition: all 0.2s linear;
78
+ -ms-transition: all 0.2s linear;
79
+ -o-transition: all 0.2s linear;
80
+ transition: all 0.2s linear; }
81
+
82
+ .reveal a:hover img {
83
+ background: rgba(255, 255, 255, 0.2);
84
+ border-color: #e7ad52;
85
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
86
+
87
+ /*********************************************
88
+ * NAVIGATION CONTROLS
89
+ *********************************************/
90
+ .reveal .controls div.navigate-left,
91
+ .reveal .controls div.navigate-left.enabled {
92
+ border-right-color: #e7ad52; }
93
+
94
+ .reveal .controls div.navigate-right,
95
+ .reveal .controls div.navigate-right.enabled {
96
+ border-left-color: #e7ad52; }
97
+
98
+ .reveal .controls div.navigate-up,
99
+ .reveal .controls div.navigate-up.enabled {
100
+ border-bottom-color: #e7ad52; }
101
+
102
+ .reveal .controls div.navigate-down,
103
+ .reveal .controls div.navigate-down.enabled {
104
+ border-top-color: #e7ad52; }
105
+
106
+ .reveal .controls div.navigate-left.enabled:hover {
107
+ border-right-color: #f3d7ac; }
108
+
109
+ .reveal .controls div.navigate-right.enabled:hover {
110
+ border-left-color: #f3d7ac; }
111
+
112
+ .reveal .controls div.navigate-up.enabled:hover {
113
+ border-bottom-color: #f3d7ac; }
114
+
115
+ .reveal .controls div.navigate-down.enabled:hover {
116
+ border-top-color: #f3d7ac; }
117
+
118
+ /*********************************************
119
+ * PROGRESS BAR
120
+ *********************************************/
121
+ .reveal .progress {
122
+ background: rgba(0, 0, 0, 0.2); }
123
+
124
+ .reveal .progress span {
125
+ background: #e7ad52;
126
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
127
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
128
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
129
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
130
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
@@ -0,0 +1,130 @@
1
+ /**
2
+ * A simple theme for reveal.js presentations, similar
3
+ * to the default theme. The accent color is darkblue.
4
+ *
5
+ * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
6
+ * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se; so is the theme - beige.css - that this is based off of.
7
+ */
8
+ /*********************************************
9
+ * GLOBAL STYLES
10
+ *********************************************/
11
+ body {
12
+ background: #f0f1eb;
13
+ background-color: #f0f1eb; }
14
+
15
+ .reveal {
16
+ font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
17
+ font-size: 36px;
18
+ font-weight: 200;
19
+ letter-spacing: -0.02em;
20
+ color: black; }
21
+
22
+ ::selection {
23
+ color: white;
24
+ background: #26351c;
25
+ text-shadow: none; }
26
+
27
+ /*********************************************
28
+ * HEADERS
29
+ *********************************************/
30
+ .reveal h1,
31
+ .reveal h2,
32
+ .reveal h3,
33
+ .reveal h4,
34
+ .reveal h5,
35
+ .reveal h6 {
36
+ margin: 0 0 20px 0;
37
+ color: #383d3d;
38
+ font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
39
+ line-height: 0.9em;
40
+ letter-spacing: 0.02em;
41
+ text-transform: none;
42
+ text-shadow: none; }
43
+
44
+ .reveal h1 {
45
+ text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); }
46
+
47
+ /*********************************************
48
+ * LINKS
49
+ *********************************************/
50
+ .reveal a:not(.image) {
51
+ color: #51483d;
52
+ text-decoration: none;
53
+ -webkit-transition: color 0.15s ease;
54
+ -moz-transition: color 0.15s ease;
55
+ -ms-transition: color 0.15s ease;
56
+ -o-transition: color 0.15s ease;
57
+ transition: color 0.15s ease; }
58
+
59
+ .reveal a:not(.image):hover {
60
+ color: #8b7c69;
61
+ text-shadow: none;
62
+ border: none; }
63
+
64
+ .reveal .roll span:after {
65
+ color: #fff;
66
+ background: #25211c; }
67
+
68
+ /*********************************************
69
+ * IMAGES
70
+ *********************************************/
71
+ .reveal section img {
72
+ margin: 15px 0px;
73
+ background: rgba(255, 255, 255, 0.12);
74
+ border: 4px solid black;
75
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
76
+ -webkit-transition: all 0.2s linear;
77
+ -moz-transition: all 0.2s linear;
78
+ -ms-transition: all 0.2s linear;
79
+ -o-transition: all 0.2s linear;
80
+ transition: all 0.2s linear; }
81
+
82
+ .reveal a:hover img {
83
+ background: rgba(255, 255, 255, 0.2);
84
+ border-color: #51483d;
85
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
86
+
87
+ /*********************************************
88
+ * NAVIGATION CONTROLS
89
+ *********************************************/
90
+ .reveal .controls div.navigate-left,
91
+ .reveal .controls div.navigate-left.enabled {
92
+ border-right-color: #51483d; }
93
+
94
+ .reveal .controls div.navigate-right,
95
+ .reveal .controls div.navigate-right.enabled {
96
+ border-left-color: #51483d; }
97
+
98
+ .reveal .controls div.navigate-up,
99
+ .reveal .controls div.navigate-up.enabled {
100
+ border-bottom-color: #51483d; }
101
+
102
+ .reveal .controls div.navigate-down,
103
+ .reveal .controls div.navigate-down.enabled {
104
+ border-top-color: #51483d; }
105
+
106
+ .reveal .controls div.navigate-left.enabled:hover {
107
+ border-right-color: #8b7c69; }
108
+
109
+ .reveal .controls div.navigate-right.enabled:hover {
110
+ border-left-color: #8b7c69; }
111
+
112
+ .reveal .controls div.navigate-up.enabled:hover {
113
+ border-bottom-color: #8b7c69; }
114
+
115
+ .reveal .controls div.navigate-down.enabled:hover {
116
+ border-top-color: #8b7c69; }
117
+
118
+ /*********************************************
119
+ * PROGRESS BAR
120
+ *********************************************/
121
+ .reveal .progress {
122
+ background: rgba(0, 0, 0, 0.2); }
123
+
124
+ .reveal .progress span {
125
+ background: #51483d;
126
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
127
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
128
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
129
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
130
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
@@ -0,0 +1,132 @@
1
+ @import url(http://fonts.googleapis.com/css?family=News+Cycle:400,700);
2
+ @import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
3
+ /**
4
+ * A simple theme for reveal.js presentations, similar
5
+ * to the default theme. The accent color is darkblue.
6
+ *
7
+ * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
8
+ * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
9
+ */
10
+ /*********************************************
11
+ * GLOBAL STYLES
12
+ *********************************************/
13
+ body {
14
+ background: white;
15
+ background-color: white; }
16
+
17
+ .reveal {
18
+ font-family: "Lato", sans-serif;
19
+ font-size: 36px;
20
+ font-weight: 200;
21
+ letter-spacing: -0.02em;
22
+ color: black; }
23
+
24
+ ::selection {
25
+ color: white;
26
+ background: rgba(0, 0, 0, 0.99);
27
+ text-shadow: none; }
28
+
29
+ /*********************************************
30
+ * HEADERS
31
+ *********************************************/
32
+ .reveal h1,
33
+ .reveal h2,
34
+ .reveal h3,
35
+ .reveal h4,
36
+ .reveal h5,
37
+ .reveal h6 {
38
+ margin: 0 0 20px 0;
39
+ color: black;
40
+ font-family: "News Cycle", Impact, sans-serif;
41
+ line-height: 0.9em;
42
+ letter-spacing: 0.02em;
43
+ text-transform: none;
44
+ text-shadow: none; }
45
+
46
+ .reveal h1 {
47
+ text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); }
48
+
49
+ /*********************************************
50
+ * LINKS
51
+ *********************************************/
52
+ .reveal a:not(.image) {
53
+ color: darkblue;
54
+ text-decoration: none;
55
+ -webkit-transition: color 0.15s ease;
56
+ -moz-transition: color 0.15s ease;
57
+ -ms-transition: color 0.15s ease;
58
+ -o-transition: color 0.15s ease;
59
+ transition: color 0.15s ease; }
60
+
61
+ .reveal a:not(.image):hover {
62
+ color: #0000f1;
63
+ text-shadow: none;
64
+ border: none; }
65
+
66
+ .reveal .roll span:after {
67
+ color: #fff;
68
+ background: #00003f; }
69
+
70
+ /*********************************************
71
+ * IMAGES
72
+ *********************************************/
73
+ .reveal section img {
74
+ margin: 15px 0px;
75
+ background: rgba(255, 255, 255, 0.12);
76
+ border: 4px solid black;
77
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
78
+ -webkit-transition: all 0.2s linear;
79
+ -moz-transition: all 0.2s linear;
80
+ -ms-transition: all 0.2s linear;
81
+ -o-transition: all 0.2s linear;
82
+ transition: all 0.2s linear; }
83
+
84
+ .reveal a:hover img {
85
+ background: rgba(255, 255, 255, 0.2);
86
+ border-color: darkblue;
87
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
88
+
89
+ /*********************************************
90
+ * NAVIGATION CONTROLS
91
+ *********************************************/
92
+ .reveal .controls div.navigate-left,
93
+ .reveal .controls div.navigate-left.enabled {
94
+ border-right-color: darkblue; }
95
+
96
+ .reveal .controls div.navigate-right,
97
+ .reveal .controls div.navigate-right.enabled {
98
+ border-left-color: darkblue; }
99
+
100
+ .reveal .controls div.navigate-up,
101
+ .reveal .controls div.navigate-up.enabled {
102
+ border-bottom-color: darkblue; }
103
+
104
+ .reveal .controls div.navigate-down,
105
+ .reveal .controls div.navigate-down.enabled {
106
+ border-top-color: darkblue; }
107
+
108
+ .reveal .controls div.navigate-left.enabled:hover {
109
+ border-right-color: #0000f1; }
110
+
111
+ .reveal .controls div.navigate-right.enabled:hover {
112
+ border-left-color: #0000f1; }
113
+
114
+ .reveal .controls div.navigate-up.enabled:hover {
115
+ border-bottom-color: #0000f1; }
116
+
117
+ .reveal .controls div.navigate-down.enabled:hover {
118
+ border-top-color: #0000f1; }
119
+
120
+ /*********************************************
121
+ * PROGRESS BAR
122
+ *********************************************/
123
+ .reveal .progress {
124
+ background: rgba(0, 0, 0, 0.2); }
125
+
126
+ .reveal .progress span {
127
+ background: darkblue;
128
+ -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
129
+ -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
130
+ -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
131
+ -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
132
+ transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }