Skip to content
Browse files

Adding About opp, fork me on GitHub & Built with Opa.

Doesn't look good yet, needs some CSS work.
  • Loading branch information...
1 parent 6808b2e commit edee40c99e798d351f29bac37fb17b639f321a60 @akoprow committed Nov 24, 2011
Showing with 37 additions and 10 deletions.
  1. BIN resources/opa-logo-small.png
  2. +12 −0 resources/style.css
  3. +5 −2 src/game.opa
  4. +20 −8 src/page.opa
View
BIN resources/opa-logo-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
12 resources/style.css
@@ -690,3 +690,15 @@ tr {
.has_errors {
display: block;
}
+
+.footer {
+ width: 445px;
+ position:relative;
+ margin: 8px auto 15px auto;
+ text-align:center;
+ font-weight:bold;
+}
+.footer span {margin: 0 5px;}
+.footer img {margin:3px 0 0 2px;}
+.footer span, .footer a, .footer img {vertical-align:top;}
+.footer a {color:#666;}
View
7 src/game.opa
@@ -159,6 +159,8 @@ Game = {{
game_state = Option.get(Game.get_state())
xml = color ->
+ <>
+ {Page.header}
<div onready={_ -> Network.add_callback(game_finished_recieved, game_observer)}>
<div onready={_ -> Network.add_callback(persistent_game_state_changed(name,_), persistent_game_state)}>
<div onready={_ -> when_ready(name,color, board, game_state, game) } class="game">
@@ -167,7 +169,8 @@ Game = {{
</div>
</div>
</div>
-
+ {Page.footer}
+ </>
if (Option.get(game.white) == user) then
Resource.styled_page("Chess", Page.style, xml({white}))
else
@@ -178,4 +181,4 @@ Game = {{
,User.login_view()) // 404 shouldn't happen
-}}
+}}
View
28 src/page.opa
@@ -20,17 +20,26 @@ Page = {{
fourOfour() = default({ some = "fourofour"}, <h1>404</h1>)
- decorate(xhtml) =
- <>
- {xhtml}
- <script src="http://opalang.org/google_analytics.js" />
+ header =
+ <a href="http://github.com/mattgu74/OpaTetris">
+ <img style="position: absolute; top: 0; right: 0; border: 0;"
+ src="https://a248.e.akamai.net/assets.github.com/img/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub"/>
</>
+ footer =
+ <div class="footer">
+ <span><a target="_blank" href="http://blog.opalang.org/2011/11/spotlight-on-opa-app-opachess-by.html">About the app</a></span> •
+ <span><a target="_blank" href="https://github.com/mads379/opa-chess">Fork on GitHub</a></span> •
+ <span><a target="_blank" href="https://opalang.org">Built with <img src="/resources/opa-logo-small.png" alt="Opa"/></a></span>
+ </>
+ <script src="http://opalang.org/google_analytics.js" />
+
default(idOpt: option(string), content) =
(
id = Option.default("", idOpt)
Resource.styled_page("Chess", style,
- decorate(
+ <>
+ {Page.header}
<div id="{id}" class="container">
<div id="error_container" class="error_container no_errors">
<ul id="errors"></ul>
@@ -39,7 +48,8 @@ Page = {{
{content}
</div>
</div>
- )
+ {Page.footer}
+ </>
)
)
@@ -79,7 +89,8 @@ Page = {{
_)
Resource.styled_page("Chess", style,
- decorate(
+ <>
+ {header}
<div id="lobby" class="container">
<div id="error_container" class="error_container no_errors">
<ul id="errors"></ul>
@@ -112,7 +123,8 @@ Page = {{
</form>
</div>
</div>
- )
+ {footer}
+ </>
)
), User.login_view())

0 comments on commit edee40c

Please sign in to comment.
Something went wrong with that request. Please try again.