Skip to content

Commit 4fcfcd7

Browse files
committed
[#71] Replace image ribbon with CSS and bump OTP to 27
1 parent cb8f537 commit 4fcfcd7

File tree

4 files changed

+110
-27
lines changed

4 files changed

+110
-27
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: all release clean docker-build docker
22

3-
BUILD_IMAGE ?= erlang:24-alpine
3+
BUILD_IMAGE ?= erlang:27-alpine
44
DOCKER_REPO := jfacorro/try_clojerl
55
DOCKER_TAG := $(shell git describe --tags --always 2>/dev/null || echo 0)
66

priv/css/main.css

Lines changed: 105 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ html {
3232
margin: 0px 5px;
3333
}
3434

35-
a:hover, a:visited, a:link, a:active {
35+
a:hover,
36+
a:visited,
37+
a:link,
38+
a:active {
3639
color: white;
3740
text-shadow: 0px 0px 5px #FFF;
3841
text-decoration: none;
@@ -49,24 +52,91 @@ a:hover {
4952
border: 0;
5053
}
5154

55+
#forkongithub a {
56+
background: #fff;
57+
color: #000;
58+
text-decoration: none;
59+
font-family: arial, sans-serif;
60+
text-align: center;
61+
font-weight: bold;
62+
padding: 5px 40px;
63+
font-size: 1rem;
64+
line-height: 2rem;
65+
position: relative;
66+
transition: 0.5s;
67+
}
68+
69+
#forkongithub a:hover {
70+
background: #ddd;
71+
color: #333;
72+
}
73+
74+
#forkongithub a::before,
75+
#forkongithub a::after {
76+
content: "";
77+
width: 100%;
78+
display: block;
79+
position: absolute;
80+
top: 1px;
81+
left: 0;
82+
height: 1px;
83+
background: #000;
84+
}
85+
86+
#forkongithub a::after {
87+
bottom: 1px;
88+
top: auto;
89+
}
90+
91+
@media screen and (min-width:800px) {
92+
#forkongithub {
93+
position: fixed;
94+
display: block;
95+
top: 0;
96+
right: 0;
97+
width: 200px;
98+
overflow: hidden;
99+
height: 200px;
100+
z-index: 9999;
101+
}
102+
103+
#forkongithub a {
104+
width: 200px;
105+
position: absolute;
106+
top: 60px;
107+
right: -60px;
108+
transform: rotate(45deg);
109+
-webkit-transform: rotate(45deg);
110+
-ms-transform: rotate(45deg);
111+
-moz-transform: rotate(45deg);
112+
-o-transform: rotate(45deg);
113+
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.8);
114+
}
115+
}
52116

53117
pre {
54118
margin: 0px;
55-
white-space: pre-wrap; /* Since CSS 2.1 */
56-
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
57-
white-space: -pre-wrap; /* Opera 4-6 */
58-
white-space: -o-pre-wrap; /* Opera 7 */
59-
word-wrap: break-word; /* Internet Explorer 5.5+ */
119+
white-space: pre-wrap;
120+
/* Since CSS 2.1 */
121+
white-space: -moz-pre-wrap;
122+
/* Mozilla, since 1999 */
123+
white-space: -pre-wrap;
124+
/* Opera 4-6 */
125+
white-space: -o-pre-wrap;
126+
/* Opera 7 */
127+
word-wrap: break-word;
128+
/* Internet Explorer 5.5+ */
60129
}
61130

62-
#about, #client-count {
63-
background:rgba(0, 0, 0, 0.85);
131+
#about,
132+
#client-count {
133+
background: rgba(0, 0, 0, 0.85);
64134
border-radius: 5px;
65135
padding: 10px;
66136
}
67137

68138
#about {
69-
background:rgba(0, 0, 0, 0.7);
139+
background: rgba(0, 0, 0, 0.7);
70140
font-family: Arial, sans-serif;
71141
font-size: 1em;
72142
color: white;
@@ -75,10 +145,10 @@ pre {
75145

76146
#client-count {
77147
float: right;
78-
background:rgba(0, 0, 0, 0.5);
148+
background: rgba(0, 0, 0, 0.5);
79149
margin-top: 5px;
80150
padding: 5px;
81-
font-family:monospace;
151+
font-family: monospace;
82152
font-size: 14px;
83153
color: white;
84154
text-shadow: 0 0 10px #FFF;
@@ -89,7 +159,7 @@ pre {
89159
border-radius: 5px;
90160
padding: 10px;
91161
color: #CCC;
92-
font-family:monospace;
162+
font-family: monospace;
93163
height: 70vh;
94164
}
95165

@@ -100,11 +170,14 @@ pre {
100170

101171
.terminal .cmd {
102172
background: transparent;
103-
color:#FFF;
173+
color: #FFF;
104174
text-shadow: 0 0 10px #FFF;
105175
}
106176

107-
.terminal, .cmd, .terminal .terminal-output > div > div, .cmd .prompt {
177+
.terminal,
178+
.cmd,
179+
.terminal .terminal-output>div>div,
180+
.cmd .prompt {
108181
font-size: 1em;
109182
line-height: 1em;
110183
}
@@ -128,44 +201,57 @@ pre {
128201
/* Override color for cursor animation */
129202

130203
@-webkit-keyframes terminal-blink {
131-
0%, 100% {
204+
205+
0%,
206+
100% {
132207
background-color: transparent;
133208
color: #FFF;
134209
}
210+
135211
50% {
136212
background-color: #bbb;
137213
color: transparent;
138214
}
139215
}
140216

141217
@-ms-keyframes terminal-blink {
142-
0%, 100% {
218+
219+
0%,
220+
100% {
143221
background-color: transparent;
144222
color: #FFF;
145223
}
224+
146225
50% {
147226
background-color: #bbb;
148227
color: transparent;
149228
}
150229
}
151230

152231
@-moz-keyframes terminal-blink {
153-
0%, 100% {
232+
233+
0%,
234+
100% {
154235
background-color: transparent;
155236
color: #FFF;
156237
}
238+
157239
50% {
158240
background-color: #bbb;
159241
color: transparent;
160242
}
161243
}
244+
162245
@keyframes terminal-blink {
163-
0%, 100% {
246+
247+
0%,
248+
100% {
164249
background-color: transparent;
165250
color: #FFF;
166251
}
252+
167253
50% {
168254
background-color: #FFF;
169255
color: transparent;
170256
}
171-
}
257+
}

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ deps
2-
, [ {clojerl, "0.9.0"}
2+
, [ {clojerl, {git, "https://github.com/clojerl/clojerl.git", {ref, "d9c673b4d6fe277558b176d029aa790e3468cde4"}}}
33
, {hiccup, {git, "https://github.com/clojerl/hiccup.git", {branch, "clojerl"}}}
44
, {lager, "3.9.2"}
55
, {cowboy, "2.9.0"}

src/try_clojerl/layout.clje

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@
3434
(link-to "/about" "About")
3535
(link-to clojerl-url "Clojerl")])
3636

37-
(def ribbon-img
38-
"https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png")
39-
40-
(def ribbon (link-to "https://github.com/clojerl/try_clojerl"
41-
[:img#ribbon {:src ribbon-img
42-
:alt "Fork me on GitHub"}]))
37+
(def ribbon [:span#forkongithub
38+
(link-to "https://github.com/clojerl/try_clojerl"
39+
"Fork me on GitHub")])
4340

4441
(def index [:div [:div#terminal]
4542
[:div#client-count]])

0 commit comments

Comments
 (0)