Commit ead32c1f8431f257fc2ef9d6dc41e55f1651eb0f

Authored by carlos.vieira
1 parent 054c6818
Exists in master

build.sh: Chamando o teste junto com o build. scss: padronizando o border e widt…

…h. barrabrasil.py: chamando o browser automaticamente
app/barrabrasil.py
1 1 from flask import Flask, url_for, render_template, request, Response, make_response
2   -import hashlib
  2 +import hashlib,webbrowser
3 3 app = Flask(__name__)
4 4  
5 5 @app.route('/')
... ... @@ -34,4 +34,5 @@ if __name__ == '__main__':
34 34 profile = argv[1]
35 35 else:
36 36 profile = 'default'
  37 + webbrowser.open("http://127.0.0.1:5000/",new=2)
37 38 app.run(debug=False)
... ...
app/templates/exemplo.html
... ... @@ -6,6 +6,6 @@
6 6 <div id="barra-brasil"><a href="http://brasil.gov.br" style="background:#7F7F7F; height: 20px; padding:4px 0 4px 10px; display: block; font-family:sans,sans-serif; text-decoration:none; color:white; ">Portal do Governo Brasileiro</a></div>
7 7 <h1>Barra Brasil</h1>
8 8 <p>Veja as <a href="http://epwg.governoeletronico.gov.br/barra/">instruções de como usar a barra</a> no e-PWG.</p>
9   - <script src="copa2014/barra-brasil.js" type="text/javascript"></script>
  9 + <script src="barra.js" type="text/javascript"></script>
10 10 </body>
11 11 </html>
... ...
build.sh
... ... @@ -4,6 +4,7 @@ if [ -n &quot;$1&quot; ] &amp;&amp; test -d &quot;recipes/$1&quot;
4 4 then
5 5 cd recipes/$1
6 6 sh ./compile.sh
  7 + python ../../app/barrabrasil.py $1
7 8 else
8 9 echo "Error. Profile $1 does not exist."
9 10 fi
... ...
recipes/copa2014/assets/barra-copa.scss
  1 +$borderPadrao: 1px solid #d3a725;
  2 +$widthPadrao: 960px;
  3 +
1 4 #barra-brasil {
2 5 div, a, ul, li {
3 6 margin: 0;
... ... @@ -16,9 +19,7 @@
16 19 font-size: 13px;
17 20 line-height: 32px;
18 21 font-family: "Open Sans",Arial,Helvetica,sans-serif;
19   - border-bottom-style: solid;
20   - border-bottom-color: hsl(45, 70%, 49%);
21   - border-bottom-width: 1px;
  22 + border-bottom: $borderPadrao;
22 23 a {
23 24 text-decoration: none;
24 25 }
... ... @@ -37,7 +38,7 @@ div#wrapper-barra-brasil {
37 38 overflow: hidden;
38 39 margin: 0 auto;
39 40 width: 100%;
40   - max-width: 960px;
  41 + max-width: $widthPadrao;
41 42 }
42 43  
43 44 #barra-brasil {
... ... @@ -46,7 +47,7 @@ div#wrapper-barra-brasil {
46 47 padding: 7px 0 6px;
47 48 width: 116px;
48 49 height: 19px;
49   - border-right: 1px solid #d3a725;
  50 + border-right: $borderPadrao;
50 51 .link-barra {
51 52 display: block;
52 53 padding-left: 42px;
... ... @@ -59,7 +60,7 @@ div#wrapper-barra-brasil {
59 60 .acesso-info {
60 61 float: left;
61 62 padding: 0 13px;
62   - border-right: 1px solid #d3a725;
  63 + border-right: $borderPadrao;
63 64 }
64 65 .copa-counter {
65 66 position: absolute;
... ... @@ -87,13 +88,13 @@ div#wrapper-barra-brasil {
87 88 float: left;
88 89 padding: 0 13px;
89 90 color: #138542;
90   - border-right: 1px solid #d3a725;
  91 + border-right: $borderPadrao;
91 92 }
92 93 .list {
93 94 position: absolute;
94 95 top: 0;
95 96 right: 0;
96   - border-left: 1px solid #d3a725;
  97 + border-left: $borderPadrao;
97 98 .first! {}
98 99 }
99 100 .list-item {
... ... @@ -101,7 +102,7 @@ div#wrapper-barra-brasil {
101 102 padding: 0 15px 0 14px;
102 103 height: 32px;
103 104 float: left;
104   - border-right: 1px solid #d3a725;
  105 + border-right: $borderPadrao;
105 106 }
106 107 .list! .last {}
107 108 .link-barra {
... ... @@ -120,8 +121,8 @@ div#wrapper-barra-brasil {
120 121 }
121 122 }
122 123  
123   -@media screen and (min-width: 960px) {
  124 +@media screen and (min-width: $widthPadrao) {
124 125 #wrapper-barra-brasil {
125   - width: 960px;
  126 + width: $widthPadrao;
126 127 }
127 128 }
... ...