source: spip-zone/_plugins_/webfonts/branches/webfonts2/webfont_preview.html @ 107924

Last change on this file since 107924 was 107924, checked in by arnaud.berard@…, 3 years ago

Hop la ;-) …

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1[(#HTTP_HEADER{Content-Type: text/html; charset=#CHARSET})]
2#SET{webfonts, #ENV{font-family}|replace{' ','+'}}
3#SET{font-weight, #ENV{font-variant}|match{\d+?}}
4#SET{font-style, #ENV{font-variant}|match{(\D+?)}}
5
6#SET{settings_default,#ARRAY{
7    font-family
8  }
9}
10#SET_MERGE{conf,#GET{settings_default},#ENV{settings}}
11<html>
12  <head>
13    <link rel="stylesheet" type="text/css"
14          href="https://fonts.googleapis.com/css?family=#GET{webfonts}:#ENV{font-variant}&text=[(#ENV{preview_text,Making the Web Beautiful!}">
15    <style>
16      .preview_infos {
17        float:right;
18        position: absolute;
19        top: O;
20        right: 0;
21        padding: 5px;
22        background-color: black;
23        color: white;
24        font-size: 14px;
25        font-family: sans-serif;
26       
27      }
28      .preview_block {
29        font-family: #ENV{font-family}, #ENV{font-categorie, sans-serif};
30        font-size: #ENV{preview_font-size, 16px};
31        font-weight: #GET{font-weight, normal};
32        font-style: #GET{font-style, normal};
33      }
34    </style>
35  </head>
36  <body>
37    <div class="preview_infos">#GET{webfonts}:#ENV{font-variant} :  #ENV{font-family} - #GET{font-weight} - #GET{font-style} - #ENV{font-categorie}</div>
38    <div class="preview_block">[(#ENV{preview_text, Grumpy wizards make toxic brew for the evil Queen and Jack. })]</div>
39  </body>
40</html>
Note: See TracBrowser for help on using the repository browser.