24 Commits

Author SHA1 Message Date
Sérgio Gomes
7be3c151dd Switching to HTTPS for Codepen now that it works again. 2016-01-13 14:59:12 +00:00
Nicolas Garnier
ae88a6557c Switch Codepen POST URL to HTTP instead of HTTPS
Fixes #1678
2015-10-02 16:50:20 +02:00
Sean Bannister
da71ff48ad Fixing CSS coding standard inconsistencies in demos 2015-08-07 19:58:02 +10:00
Surma
91651b020e Auto-generate unique classes for each demo 2015-08-05 10:47:36 +01:00
Surma
62ff493131 Re-add captions for snippets (Closes #972) 2015-07-20 21:36:54 +09:00
alex
2ad79c88d3 Replace flash clippy with native implementation
Based on
https://developers.google.com/web/updates/2015/04/cut-and-copy-commands

FF and Safari are currently not supported.
OTOH see the following:
  * http://www.kb.cert.org/vuls/id/338736
  * http://occupyflash.org

Closes #631 and #947.
2015-07-20 21:36:53 +09:00
Nicolas Garnier
b9b20c41e0 Fix copy-to-clipboard in Firefox.
Make code more robust and efficient

Some code cleaning.

Replace for loop by foreach.
2015-07-08 19:41:35 +01:00
Nicolas Garnier
0e57355839 Generate CodePen buttons in templates instead of on page load. 2015-07-08 17:17:41 +01:00
Nicolas Garnier
483f5da26d Replace HTML escaping to use URL escaping for the copy-paste text passed to the flash object. 2015-07-06 12:24:34 +02:00
Nicolas Garnier
b2558babe1 Removing special codepen style
Because this breaks the menu demos in codepen
2015-07-05 23:54:51 +02:00
Alexander Surma
e4537f1f7f Improve copy icon (fixes #680) (Closes #682) 2015-07-03 17:31:27 +01:00
Nicolas Garnier
02c4a4afde Made tag extraction logic more generic Keep indentation Added styling to elements (Closes #662) 2015-07-03 15:59:04 +01:00
Nicolas Garnier
3bea5d14c8 Further codepen fixes: - Extract the <script> tags into the JS codepen tab - Add margin in between each components to avoid them looking squashed (for example the 2 progress bars) 2015-07-03 15:59:04 +01:00
Nicolas Garnier
329cebea38 Improve codepen implementation: - Open in new tab - Replaces relative image URLs - Processing only done when the button is clicked - Inserting body padding only for demos that are not full-width - Allow inserting custom codepen CSS for each snippet with
Switch to using .bind()

Fix comment (Closes #618)
2015-07-02 19:39:00 +01:00
Sérgio Gomes
fd8baf1ba9 Merge pull request #565 from google/layout-demo-rework
Layout demo rework
2015-07-01 14:15:34 +01:00
Nicolas Garnier
6e2e1bcb46 Make codepen opt-in instead of opt-out.
This has for consequence to remove codepen from all the `<pre>` blocks that are generated from the components readme.md (Closes #563)
2015-07-01 14:07:12 +01:00
Sérgio Gomes
8cf007bdec Add some sanity to demo styles.
- Splits padding and demos into separate classes
- Splits padding and captions into separate classes
- Adds the ability for snippets to be full screen
2015-07-01 11:02:59 +01:00
Sérgio Gomes
93b91710b4 Adding the concept of a demo file to snippets.
This allows us to have demo files with more code and styling than
the snippet, to make it look good without showing extraneous
details to the user.
2015-06-25 16:57:01 +01:00
Nicolas Garnier
4fdcd7848e Fix issue where same copy-pasted was used every time. 2015-06-24 16:15:06 +01:00
Nicolas Garnier
a6a7738bae Fix issue where same code snippets was shown every time. 2015-06-24 16:09:15 +01:00
Nicolas Garnier
705448b583 Fixing escaping of copy paste (Closes #411) 2015-06-24 15:55:07 +01:00
Nicolas Garnier
68ff5322a1 Using .copy-to-clipboard-button class to select button element for the highlight code feature. 2015-06-24 15:55:07 +01:00
Nicolas Garnier
c67ec357b9 Now embed the code in the <pre> block and in the flash element (for copy paste) directly instead of relying on JS to copy it. 2015-06-24 15:55:07 +01:00
Nicolas Garnier
310c6c89a9 Generate demo widget based on snippets. 2015-06-24 15:55:07 +01:00