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