Commit 4bf4ae89 authored by Thorsten Wißmann's avatar Thorsten Wißmann 🐧
Browse files

Mimic Chair-Homepage header

parent 9f210c3f
......@@ -2,3 +2,5 @@ elm-stuff/
.*.swp
*~
rails.html
logo.png
fau_black.png
......@@ -4,18 +4,27 @@ TARGET=rails.html
SRC=$(wildcard src/*.elm)
CSS=$(wildcard *.css)
IMG = logo.png fau_black.png
.PHONY: clean install
all: $(TARGET) $(IMG)
logo.png:
wget -O $@ https://www8.cs.fau.de/lib/tpl/mnml-blog/user/logo.png
fau_black.png:
wget -O $@ https://www8.cs.fau.de/lib/tpl/mnml-blog/user/fau_black.png
$(TARGET): src/Main.elm $(SRC) elm-package.json
elm make $< --yes --output $@
clean:
rm -f $(TARGET)
INSTALL_SSH=uber:html/p/rails/
INSTALL_HTTP=http://thorsten-wissmann.de/p/rails/
install: $(CSS) rails.html
install: $(CSS) rails.html $(IMG)
rsync -Pravdtze ssh $(CSS) rails.html $(INSTALL_SSH)
@echo $(INSTALL_HTTP)/rails.html
......@@ -3,7 +3,7 @@
A browser visualization for train shunting puzzles
## Compilation
Requirements: elm 0.17 (see elm-lang.org) and gnu make
Requirements: elm 0.17 (see elm-lang.org), wget and gnu make
To build it, run
```
......@@ -11,6 +11,8 @@ $ make
```
When running this the first time, you need to confirm some questions by "Yes".
This will also download additional logos as images for the page header.
In order to get a repl, run:
......@@ -23,6 +25,7 @@ $ elm repl
>
```
## Bugs
* The axes jump a little at the beginning and the end of the animtion. The
......@@ -59,3 +62,6 @@ $ elm repl
229.4907650310597, start_time = 1471170559998, time_passed = 0, total_time =
695.426560700181 }
* Add a favicon:
<link rel="shortcut icon" href="/lib/tpl/mnml-blog/user/favicon.png">
#maincanvas {
border: 2px solid red;
background: #C3E2A5;
border: none;
background: transparent;
max-height: 95vh;
max-width: 95vw;
}
......
import Html exposing (Html, button, div, text)
import Html exposing (Html, button, div, text, a, img)
import Html.App as Html
import Html.Attributes as HA
import Html.Events exposing (onClick)
......@@ -84,8 +84,25 @@ stylesheet path =
view : Model -> Html Msg
view model =
div []
div [ HA.id "pagewrap" ]
[ stylesheet "railpuzzle.css"
, stylesheet "tcs.css"
, div
[ HA.id "tmpl_header" ]
[ img
[ HA.class "tcs_logo"
, HA.src "logo.png"
] []
, a
[ HA.href "/"
, HA.class "tmpl_header_logo_txt"
]
[ text "Theoretische Informatik" ]
, img
[ HA.class "fau_logo"
, HA.src "fau_black.png"
] []
]
, div []
[ Html.map ForRails <| RailPuzzle.view model.rails ]
]
......
body {
margin: 0 auto;
background-color: #efeded;
}
#pagewrap {
margin: 15px auto;
background: #fff;
padding: 0 30px;
min-width: 890px;
max-width: 1000px;
}
#tmpl_header {
display: table;
}
#tmpl_header > * {
display: table-cell;
vertical-align: middle;
}
#tmpl_header .tcs_logo ,
#tmpl_header .fau_logo {
height: 100%;
/* padding-bottom: 30px; */
}
#tmpl_header a.tmpl_header_logo_txt {
width: 100%;
}
#tmpl_header a.tmpl_header_logo_txt,
#tmpl_header a.tmpl_header_logo_txt:focus,
#tmpl_header a.tmpl_header_logo_txt:active {
text-align: center;
padding: 0.7em 0 0.5em 0;
margin: 0px auto;
font-family: Arial,Helvetica,'Liberation Sans',sans-serif;
font-size: 2em;
line-height: 2em;
text-transform: uppercase;
font-weight: normal;
text-decoration: none;
color: #222;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment