Commit fe17287de7dc456f93036ade9b82689d4d692fed
1 parent
53a31f87
Exists in
master
Separação dos templates mustache em pastas específicas
Showing
4 changed files
with
189 additions
and
11 deletions
Show diff stats
init/head.php
... | ... | @@ -83,14 +83,14 @@ hr { |
83 | 83 | .navbar-collapse { max-height: 100% !important; } |
84 | 84 | |
85 | 85 | .btn.btn-fab.btn-fab-mini { |
86 | - font-size: 12px; | |
87 | - height: 24px; | |
88 | - min-width: 24px; | |
89 | - padding-bottom: 5px; | |
90 | - padding-left: 5px; | |
91 | - padding-right: 5px; | |
92 | - padding-top: 5px; | |
93 | - width: 24px; | |
86 | + font-size: 12px; | |
87 | + height: 28px; | |
88 | + min-width: 28px; | |
89 | + padding-bottom: 6px; | |
90 | + padding-left: 6px; | |
91 | + padding-right: 6px; | |
92 | + padding-top: 6px; | |
93 | + width: 28px; | |
94 | 94 | } |
95 | 95 | |
96 | 96 | .btn.btn-fab.btn-fab-max { |
... | ... | @@ -277,4 +277,5 @@ h2 small { |
277 | 277 | } |
278 | 278 | |
279 | 279 | </style> |
280 | + | |
280 | 281 | </head> | ... | ... |
init/headjs.php
1 | 1 | <?php |
2 | -define ( ONDEI3GEO, dirname ( dirname ( __FILE__ ) ) ); | |
2 | +define ( "ONDEI3GEO", dirname ( dirname ( __FILE__ ) ) ); | |
3 | 3 | if (extension_loaded ( 'zlib' )) { |
4 | 4 | ob_start ( 'ob_gzhandler' ); |
5 | 5 | } |
... | ... | @@ -13,6 +13,8 @@ include (ONDEI3GEO . "/pacotes/bootstrap/js/ie10-viewport-bug-workaround.js"); |
13 | 13 | echo "\n"; |
14 | 14 | include (ONDEI3GEO . "/pacotes/bootstrap-material-design/dist/js/material.min.js"); |
15 | 15 | echo "\n"; |
16 | +include (ONDEI3GEO . "/pacotes/bootstrap-accessibility-plugin/plugins/js/bootstrap-accessibility.min.js"); | |
17 | +echo "\n"; | |
16 | 18 | |
17 | 19 | if (extension_loaded ( 'zlib' )) { |
18 | 20 | ob_end_flush (); | ... | ... |
init/index.php
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | /** |
14 | 14 | * Cria as pastas temporarias que o i3Geo precisa, caso nao existam |
15 | 15 | */ |
16 | -define ( ONDEI3GEO, ".." ); | |
16 | +define ( "ONDEI3GEO", ".." ); | |
17 | 17 | include (dirname ( __FILE__ ) . "/../ms_configura.php"); |
18 | 18 | if(empty($dir_tmp)){ |
19 | 19 | exit; |
... | ... | @@ -193,7 +193,7 @@ include "head.php"; |
193 | 193 | <script> |
194 | 194 | $(document).ready(function(){ |
195 | 195 | <?php |
196 | - if ($i3geomaster [0] ["usuario"] == "admin" && $i3geomaster [0] ["senha"] == "admin") { | |
196 | + if (!empty ($i3geomaster) && ($i3geomaster [0] ["usuario"] == "admin" && $i3geomaster [0] ["senha"] == "admin")) { | |
197 | 197 | echo "var men = '<div class=\'alert alert-danger\' style=\'margin-bottom:0px;\' >' + $" . "trad(19,g_traducao_init) + '</div>';"; |
198 | 198 | } else { |
199 | 199 | echo "var men = '';"; | ... | ... |
... | ... | @@ -0,0 +1,175 @@ |
1 | +<?php | |
2 | +define ( "ONDEI3GEO", ".." ); | |
3 | +include_once (dirname(__FILE__)."/../classesphp/sani_request.php"); | |
4 | +error_reporting ( 0 ); | |
5 | +include "head.php"; | |
6 | +?> | |
7 | +<link href='imagens/sprites.css' rel='stylesheet'> | |
8 | +<style> | |
9 | +.amarelo { | |
10 | + color: yellow; | |
11 | +} | |
12 | +</style> | |
13 | +<body style="padding-top: 90px;" id="topo"> | |
14 | + <a href="#conteudoPrincipal" class="sr-only sr-only-focusable"><span class="well" style="background: white; color: #007e72;">Skip to main content</span></a> | |
15 | + <nav class="navbar navbar-default navbar-fixed-top"> | |
16 | + <div class="container-fluid"> | |
17 | + <div class="navbar-header"> | |
18 | + <button type="button" title="icon-bar" class="navbar-toggle collapsed" data-toggle="collapse" | |
19 | + data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |
20 | + <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span | |
21 | + class="icon-bar"></span> | |
22 | + </button> | |
23 | + <a class="navbar-brand" onclick="$('.cartao').fadeIn(600);" href="#"> | |
24 | + <i class="material-icons">home</i></a> | |
25 | + </div> | |
26 | + <div id="navbar" class="navbar-collapse collapse navbar-responsive-collapse"> | |
27 | + <!-- template para permitir a traducao --> | |
28 | + <div id="menuTpl" class="hidden"> | |
29 | + <ul class="nav navbar-nav"> | |
30 | + <li class="fa"><a href="#" tabindex='-1' ><span id="bandeiras"></span></a></li> | |
31 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.map-o').fadeIn(600);">{{{mapas}}}</a></li> | |
32 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.download').fadeIn(600);">OGC/Download</a></li> | |
33 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.cogs').fadeIn(600);">{{{admin}}}</a></li> | |
34 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.book').fadeIn(600);">{{{docs}}}</a></li> | |
35 | + <li><a data-toggle="collapse" data-target=".in" role="button" href="#topo" onclick="$('.cartao').hide();$('.group').fadeIn(600);">{{{comunidade}}}</a></li> | |
36 | + <li><a role="button" href="../social/index.php" >Social</a></li> | |
37 | + <li class="dropdown"><a role="button" | |
38 | + onclick="i3GEO.login.recarrega = true; i3GEO.login.dialogo.abreLogin('../','template_mst_bt.html');" | |
39 | + href="#" class="dropdown-toggle" data-toggle="dropdown">Login <span class="caret"></span></a> | |
40 | + <ul id="i3GEOF_loginusuario" class="dropdown-menu" style="min-width: 280px; padding: 10px; background-color: white;"> | |
41 | + </ul></li> | |
42 | + </ul> | |
43 | + </div> | |
44 | + </div> | |
45 | + </div> | |
46 | + | |
47 | + </nav> | |
48 | + <nav class="navbar-fixed-bottom"> | |
49 | + <div class="container-fluid hidden"> | |
50 | + <div class="jumbotron hidden-xs" id="jumbotron" | |
51 | + style="background: rgb(255, 255, 255); background: rgba(255, 255, 255, 0.8);"> | |
52 | + <!-- Template para mensagem do i3Geo --> | |
53 | + <ul class="list-inline"> | |
54 | + <li><img class="pull-left" alt="i3Geo Logo" src='../imagens/i3Geo_bigTransp.png' | |
55 | + style='width: 80px; margin: 5px;' /> <img alt="qrcode site" class="pull-right hidden-xs" | |
56 | + src='../pacotes/qrcode/php/qr_img.php?host={{{host}}}&d={{{href}}}' | |
57 | + style='width: 80px; margin: 5px;' /> | |
58 | + <p>{{{jumbotron}}}</p></li> | |
59 | + </ul> | |
60 | + <div id="mensagemLogin"></div> | |
61 | + </div> | |
62 | + </div> | |
63 | + </nav> | |
64 | + | |
65 | + <div class="container" id="conteudoPrincipal" tabindex="-1"> | |
66 | + <div class="row center-block"> | |
67 | + <!-- Template para criacao dos quadros ver index.js --> | |
68 | + <div id="botoesTpl" class="hidden"> | |
69 | + <div class="cartao {{{fa}}} col-xs-12 center-block" | |
70 | + style="width: 260px; min-width: 260px; max-width: 260px;"> | |
71 | + <div class="panel panel-default"> | |
72 | + <div class="panel-body" tabindex="-1" > | |
73 | + <!-- | |
74 | + <div class="thumbnail" role="button" style="height: 90px;"> | |
75 | + <a target="{{{target}}}" href="{{{href}}}"> <img class="img-rounded" | |
76 | + style="height: 100%; width: 100%" src="imagens/{{{img}}}" /> | |
77 | + </a> | |
78 | + </div> | |
79 | + --> | |
80 | + <div class="thumbnail" role="button" style="height: 90px;"> | |
81 | + <a tabindex="-1" target="{{{target}}}" href="{{{href}}}"> <img alt="{{{titulo}}}" tabindex="-1" class="img-rounded {{{img}}}" | |
82 | + style="height: 100%; width: 100%" src="../imagens/branco.gif" /> | |
83 | + </a> | |
84 | + </div> | |
85 | + | |
86 | + <h4 style="height: 40px;">{{{titulo}}}</h4> | |
87 | + <h5 tabindex="-1" class="hidden-xs" style="height: 100px;">{{{subtitulo}}}</h5> | |
88 | + | |
89 | + </div> | |
90 | + <div class="panel-footer text-right" | |
91 | + style="padding: 0px; padding-right: 15px; border: 0px; background-color: white;"> | |
92 | + <div class="row center-block"> | |
93 | + <div class="col-xs-6" style="line-height: 3.5; text-align: left;"> | |
94 | + <!-- o texto no span e para acessibilidade--> | |
95 | + <button tabindex="-1" role="button" data-toggle="quadroQrcode" data-url="{{{href}}}" | |
96 | + class="btn btn-primary btn-fab btn-fab-mini" > <span | |
97 | + class="glyphicon glyphicon-qrcode" aria-hidden="true"> qrcode</span> | |
98 | + </button> | |
99 | + | |
100 | + <button tabindex="-1" role="button" onclick="favorita(this);return false;" class="btn btn-primary btn-fab btn-fab-mini"> | |
101 | + <span data-cookie="{{{img}}}" ><i class="material-icons">grade</i></span> | |
102 | + </button> | |
103 | + </div> | |
104 | + <div class="col-xs-6"> | |
105 | + <a class="btn btn-primary" style="color:#008579;" href="{{{href}}}" role="button" target="{{{target}}}"> | |
106 | + {{{abrir}}} </a> | |
107 | + </div> | |
108 | + | |
109 | + </div> | |
110 | + </div> | |
111 | + </div> | |
112 | + </div> | |
113 | + </div> | |
114 | + </div> | |
115 | + | |
116 | + </div> | |
117 | + <div tabindex="-1" class="container-fluid" | |
118 | + style="background-color: #fff; margin-top: 10px; padding-top: 10px;"> | |
119 | + <div class="row text-center hidden"> | |
120 | + <div class="col-lg-12 center-block"> | |
121 | + <a tabindex="-1" rel="license" href="http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" target="_blank"><img | |
122 | + alt="Licença Creative Commons" style="border-width: 0" | |
123 | + src="https://i.creativecommons.org/l/GPL/2.0/88x62.png" /></a><br />O i3Geo está | |
124 | + licenciado com uma Licença <a tabindex="-1" rel="license" | |
125 | + href="http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" style="color:#008579;" target="_blank">Creative | |
126 | + Commons - Licença Pública Geral GNU ("GNU General Public License")</a> | |
127 | + </div> | |
128 | + </div> | |
129 | + </div> | |
130 | + | |
131 | + <script> | |
132 | + //utilizado em ms_configura.php para customizar o local da pasta de inicializacao | |
133 | + var customDir = "<?php echo $customDir; ?>"; | |
134 | + </script> | |
135 | + <script src='indexjs.php'></script> | |
136 | + <script> | |
137 | + $(document).ready(function(){ | |
138 | + <?php | |
139 | + if (!empty ($i3geomaster) && ($i3geomaster [0] ["usuario"] == "admin" && $i3geomaster [0] ["senha"] == "admin")) { | |
140 | + echo "var men = '<div class=\'alert alert-danger\' style=\'margin-bottom:0px;\' >' + $" . "trad(19,g_traducao_init) + '</div>';"; | |
141 | + } else { | |
142 | + echo "var men = '';"; | |
143 | + } | |
144 | + ?> | |
145 | + mostraBotoesBT(men); | |
146 | + $('.hidden').removeClass('hidden'); | |
147 | + $(window).on("scroll click", | |
148 | + function(){ | |
149 | + $("#mensagemLogin").fadeOut(300); | |
150 | + $("#jumbotron").fadeOut(300) | |
151 | + } | |
152 | + ); | |
153 | + //verifica se deve ou nao esconder a mensagem de boas vindas verificando o parametro enviado pela url | |
154 | + if("<?php echo isset($_GET["home"]) ? "ok" : ""; ?>" == "ok"){ | |
155 | + $("#jumbotron").hide(); | |
156 | + } | |
157 | + //modifica a url para que ao voltar a pagina a mensagem de boas vindas nao seja mostrada | |
158 | + var u = window.location.origin + window.location.pathname + "?home="; | |
159 | + window.history.replaceState(null,null,u); | |
160 | + | |
161 | + $('[data-toggle="quadroQrcode"]').popover({ | |
162 | + html: true, | |
163 | + placement: "auto", | |
164 | + trigger: "focus", | |
165 | + content: function(){ | |
166 | + var urlqr = "../pacotes/qrcode/php/qr_img.php?host=" + window.location.host + "&u=" + $(this).attr("data-url"); | |
167 | + return "<img style='width:200px; height: 200px;' src='" + urlqr + "' '></a>"; | |
168 | + } | |
169 | + }); | |
170 | + $.material.init(); | |
171 | + }); | |
172 | + </script> | |
173 | + | |
174 | +</body> | |
175 | +</html> | ... | ... |