By | Chris Done |
At | 2013-02-28 |
Title | changed layout to be a bit faster |
Description |
Edit file wwwroot/js/amelie.js 33188 → 33188
- 1 window.jQuery(function (){var var_1 = 0;window.jQuery('.amelie-code').each(function (){var_1 = Math.max(500,Math.max(window.jQuery(this).width() + 50,var_1));return true;});window.jQuery('.amelie-code').each(function (){window.jQuery('.amelie-wrap').width(Math.max(var_1,500));return true;});window.jQuery('.amelie-latest-pastes').each(function (){window.jQuery('.amelie-wrap').width(Math.max(window.jQuery(this).width(),500));return true;});window.jQuery('.amelie-hint').each(function (){var var_6 = window.jQuery(this);var_6.css('height','1em');var_6.css('overflow','hidden');var_6.parent().css('cursor','pointer');var_6.parent().toggle(function (){var_6.css('height','auto');return false;},function (){var_6.css('height','1em');var_6.css('overflow','hidden');return false;});return true;});window.jQuery('.amelie-paste-nav').each(function (){var var_10 = window.jQuery('<a href="">Expand</a>');var var_11 = window.jQuery(this);var_11.prepend(' - ');var_11.prepend(var_10);var var_12 = var_11.siblings('.amelie-paste-specs');var_12.css('display','none');var_10.text('Expand');var_10.toggle(function (){var_12.css('display','block');var_10.text('Collapse');return false;},function (){var_12.css('display','none');var_10.text('Expand');return false;});return true;});});
+ 1 window.jQuery(function (){var var_1 = 0;window.jQuery('.amelie-code').each(function (){var_1 = Math.max(500,Math.max(window.jQuery(this).width() + 50,var_1));return true;});window.jQuery('.amelie-code').each(function (){window.jQuery('.amelie-wrap.').width(Math.max(var_1,500));return true;});window.jQuery('.amelie-latest-pastes').each(function (){window.jQuery('.amelie-wrap.').width(Math.max(window.jQuery(this).width(),500));return true;});window.jQuery('.amelie-hint').each(function (){var var_6 = window.jQuery(this);var_6.css('height','1em');var_6.css('overflow','hidden');var_6.parent().css('cursor','pointer');var_6.parent().toggle(function (){var_6.css('height','auto');return false;},function (){var_6.css('height','1em');var_6.css('overflow','hidden');return false;});return true;});window.jQuery('.amelie-paste-nav').each(function (){var var_10 = window.jQuery('<a href="">Expand</a>');var var_11 = window.jQuery(this);var_11.prepend(' - ');var_11.prepend(var_10);var var_12 = var_11.siblings('.amelie-paste-specs');var_12.css('display','none');var_10.text('Expand');var_10.toggle(function (){var_12.css('display','block');var_10.text('Collapse');return false;},function (){var_12.css('display','none');var_10.text('Expand');return false;});return true;});});
2 2 3 3 4 4 /*jshint eqnull:true */
5 5 /*!
6 6 * jQuery Cookie Plugin v1.1
… … … … Edit file src/Amelie/View/Layout.hs 33188 → 33188
50 50 return ()
51 51 52 52 -- | Show the hpaste logo.
53 53 logo :: Html
54 54 logo = do
- 55 a ! A.href "/" ! A.title "Back to home" $ do
- 56 img ! aClass "logo" ! A.src "/css/hpaste.png"
+ 55 a ! aClass "logo" ! A.href "/" ! A.title "Back to home" $ do
+ 56 "hpaste"
57 57 58 58 -- | Layout wrapper.
59 59 wrap :: Html -> Html
60 60 wrap x = H.div ! aClass "wrap" $ x
61 61 … … … … Edit file src/Amelie/View/Script.hs 33188 → 33188
17 17 18 18 -- | All scripts on the site. Not much to do.
19 19 script :: Text
20 20 script = pack $ show $ snd $ evalHJScript $ do
21 21 ready $ do
- 22 resizePage
+ 22 -- resizePage
23 23 toggleHints
24 24 togglePaste
25 25 26 26 -- | Resize the width of the page to match content width.
27 27 resizePage :: HJScript ()
… … … … Edit file src/Amelie/View/Style.hs 33188 → 33188
59 59 textAlign "center"
60 60 61 61 classRule "logo" $ do
62 62 margin "1em 0 1em 0"
63 63 border "0"
+ 64 background "url(/css/hpaste.png) no-repeat"
+ 65 width "190px"
+ 66 height "50px"
+ 67 display "block"
+ 68 textIndent "-999px"
64 69 65 70 classRule "wrap" $ do
66 71 margin "auto"
67 72 textAlign "left"
68 73 … … … … 186 191 187 192 -- | Styles for the highlighter.
188 193 highlighter :: CSS Rule
189 194 highlighter = do
190 195 diff
+ 196 191 197 classRule "steps" $ do
192 198 marginTop "1em"
193 199 classRule "steps-expr" $ do
194 200 rule ".text" $ do
195 201 width "300px"
… … … …