diff --git a/assets/style.css b/assets/style.css index 61c058001..033611227 100644 --- a/assets/style.css +++ b/assets/style.css @@ -36,6 +36,11 @@ a:hover { margin-bottom: 6px; } +.content img { + width: 100%; + height: 100%; +} + /* home stuff */ @@ -86,7 +91,7 @@ a:hover { margin: 0 auto; } .feature-image { - width: 420px; + max-width: 420px; display: block; margin: 0 auto; } @@ -94,7 +99,7 @@ a:hover { @media (min-width: 820px) { .features { - width: 800px; + max-width: 800px; } .feature { position: relative; @@ -102,7 +107,7 @@ a:hover { margin-bottom: 4em; } .feature-description { - width: 340px; + max-width: 340px; } .feature-image { position: absolute; @@ -130,6 +135,7 @@ a:hover { /* top bar */ + #tabs { padding: 1em; background-color: #60B5CC; @@ -161,6 +167,17 @@ a:hover { border-bottom: 3px solid #34495E; } +@media (max-width: 600px) { + .tab { + font-size: 15px; + margin: 0 0.5em; + } + .content { + margin: 0 0.5em !important; + } +} + + /* splash */ @@ -212,6 +229,11 @@ Not really any of those on the website though AFAIK. content: "\00a0"; } +pre > code { + display: block; + overflow-x: auto; +} + /* blogs */ @@ -219,8 +241,9 @@ Not really any of those on the website though AFAIK. padding-top: 1em; color: #ddd; display: block; - width: 600px; + max-width: 600px; margin: 0 auto; + padding-right: 10px; text-align: right; } @@ -305,3 +328,20 @@ blockquote p { color: #bbbbbb; } +/* iframes */ + +.intrinsic-container { + position: relative; + height: 0; + overflow: hidden; + padding-bottom: 56.25%; /*assuming 16/9 aspect ratio*/ + max-width: 800px; +} + +.intrinsic-container iframe { + position: absolute; + top:0; + left: 0; + width: 100%; + height: 100%; +} diff --git a/src/backend/Generate.hs b/src/backend/Generate.hs index 5e489444b..ca2bdadd1 100644 --- a/src/backend/Generate.hs +++ b/src/backend/Generate.hs @@ -64,6 +64,7 @@ htmlSkeleton analytics highlight title scripts = H.docTypeHtml $ do H.head $ do H.meta ! A.charset "UTF-8" + H.meta ! A.name "viewport" ! A.content "width=device-width, initial-scale=1" H.title (H.toHtml title) favicon H.link ! A.rel "stylesheet" ! A.href "/assets/style.css?v=3" @@ -90,7 +91,7 @@ favicon :: H.Html favicon = H.link ! A.rel "shortcut icon" - ! A.size "16x16, 32x32, 48x48, 64x64, 128x128, 256x256" + ! A.sizes "16x16 32x32 48x48 64x64 128x128 256x256" ! A.href "/favicon.ico" diff --git a/src/pages/blog/announce/0.12.3.elm b/src/pages/blog/announce/0.12.3.elm index ee632d3e4..f53863ab6 100644 --- a/src/pages/blog/announce/0.12.3.elm +++ b/src/pages/blog/announce/0.12.3.elm @@ -41,12 +41,11 @@ We of course need to start with an example. As you move your mouse within the grey box, [Thwomp](http://www.mariowiki.com/Thwomp#Super_Mario_64) will stare at you. Too far away to crush you, but waiting... - +
+ title="sample results with Firefox 30 on a Macbook Air with OSX 10.9.4"z
+ style="max-width: 500px; margin-left: auto; margin-right: auto; display:block;">
Both [elm-html][] and Mercury are based on the [virtual-dom][] project, which is
responsible for the great performance. The first half of this post will explore
diff --git a/src/pages/blog/compiler-errors-for-humans.elm b/src/pages/blog/compiler-errors-for-humans.elm
index 2bd384f54..4af2b01d7 100644
--- a/src/pages/blog/compiler-errors-for-humans.elm
+++ b/src/pages/blog/compiler-errors-for-humans.elm
@@ -22,12 +22,14 @@ main =
image url =
- img
- [ src url
- , style [("display", "block"), ("margin", "1em auto")]
- , alt "compiler output example"
- ]
- []
+ div [class "content", Center.style "900px"] [
+ img
+ [ src url
+ , style [("display", "block"), ("margin", "1em auto")]
+ , alt "compiler output example"
+ ]
+ []
+ ]
content = """
@@ -186,15 +188,11 @@ his [elm-vim][] plugin:
[elm-vim]: https://github.com/ajhager/elm-vim
+
+ alt="pausing time">
Events in Elm have a time associated with them. So that Elm does not get a hole
in its perception of time, Elm Reactor offsets that recorded time by the time
@@ -158,11 +151,8 @@ In addition to time travel, Elm Reactor lets you change history. Since
Elm Reactor records the entire history of inputs to the program, we can simply
replay these inputs on new code to see a bug fix or watch how things change.
-
@@ -183,11 +173,8 @@ error? In that case, Elm Reactor does not swap in the new code. Instead, it
displays a message explaining the issue while the last working version keeps
running. The following video shows this kind of feedback:
-
diff --git a/src/pages/docs/advanced-topics.elm b/src/pages/docs/advanced-topics.elm
index c43048ffe..0f6fe8f4f 100644
--- a/src/pages/docs/advanced-topics.elm
+++ b/src/pages/docs/advanced-topics.elm
@@ -12,34 +12,29 @@ import Skeleton
main =
Skeleton.skeleton
"docs"
- [ Center.markdown "600px" beginning
- , iframe
- [ style
- [ "display" => "block"
- , "width" => "560px"
- , "height" => "315px"
- , "margin" => "0 auto"
- , "border" => "none"
- ]
- , src "https://www.youtube.com/embed/DfLvDFxcAIA"
- ]
- []
- , Center.markdown "600px" middle
- , iframe
- [ style
- [ "display" => "block"
- , "width" => "560px"
- , "height" => "315px"
- , "margin" => "0 auto"
- , "border" => "none"
- ]
- , src "https://www.youtube.com/embed/Agu6jipKfYw"
- ]
- []
- , Center.markdown "600px" end
+ [ div [style
+ [("max-width", "600px"), ("margin", "0 auto")]
+ ]
+ [Center.markdown "600px" beginning
+ , div [ class "intrinsic-container" ]
+ [ iframe
+ [ src "https://www.youtube.com/embed/DfLvDFxcAIA"
+ , attribute "allowfullscreen" ""
+ ]
+ []
+ ]
+ , Center.markdown "600px" middle
+ , div [ class "intrinsic-container" ]
+ [ iframe
+ [ src "https://www.youtube.com/embed/Agu6jipKfYw"
+ , attribute "allowfullscreen" ""
+ ]
+ []
+ ]
+ , Center.markdown "600px" end
+ ]
]
-
beginning = """
# Advanced Topics
diff --git a/src/pages/examples.elm b/src/pages/examples.elm
index 0697fff2c..278b33b14 100644
--- a/src/pages/examples.elm
+++ b/src/pages/examples.elm
@@ -10,7 +10,7 @@ main =
Skeleton.skeleton
"examples"
[ Center.markdown "600px" content
- , div [ Center.style "600px" ]
+ , div [ Center.style "600px" , style ["padding" => "0 0.5em"]]
[ view "HTML" html
, view "Functional Stuff" core
, view "Effects" effects
@@ -135,4 +135,3 @@ effects =
, "mouse drags" ==> "drag"
]
]
-
diff --git a/src/pages/home.elm b/src/pages/home.elm
index 79bfedd00..a68b4b895 100644
--- a/src/pages/home.elm
+++ b/src/pages/home.elm
@@ -95,7 +95,9 @@ viewFeature feature =
, a [ class "feature-image"
, href feature.link
]
- [ img [src feature.image] []
+ [ img [src feature.image
+ , style [("width", "100%")]
+ ] []
]
]
@@ -185,6 +187,7 @@ example imgSrc demo code =
[ img
[ src ("/assets/examples/" ++ imgSrc ++ ".png")
, alt imgSrc
+ , style [("width", "100%")]
]
[]
]
@@ -207,7 +210,7 @@ fluidList itemWidth maxColumns itemList =
bulletStyle =
[ "display" => "inline-block"
- , "width" => toPx itemWidth
+ , "max-width" => toPx itemWidth
, "vertical-align" => "top"
, "text-align" => "left"
, "margin" => ("0 " ++ toPx gutter)
@@ -285,7 +288,7 @@ company name website extension =
[ a [ href website ]
[ div
[ style
- [ "width" => "100%"
+ [ "width" => "200px"
, "height" => "100px"
, "background-image" => ("url('" ++ imgSrc ++ "')")
, "background-repeat" => "no-repeat"
@@ -295,6 +298,3 @@ company name website extension =
[]
]
]
-
-
-
diff --git a/src/shared/Center.elm b/src/shared/Center.elm
index 87f393025..56c08fb65 100644
--- a/src/shared/Center.elm
+++ b/src/shared/Center.elm
@@ -15,6 +15,6 @@ markdown width string =
style width =
Attr.style
[ "display" => "block"
- , "width" => width
+ , "max-width" => width
, "margin" => "0 auto"
- ]
\ No newline at end of file
+ ]