Commit 81e6fd0fd49fb0fe02369c2dadf3432c2a8554ac

Authored by Erik Zambom
Committed by GitHub
2 parents 2096be25 4011e26b

Merge pull request #567 from amadeusproject/refactoring

Daily Update - 20_09_2017
amadeus/static/css/base/amadeus_responsive.css
... ... @@ -41,9 +41,9 @@
41 41  
42 42 .comment-section .comment .comment-img {
43 43 padding-left: 10px;
44   - padding-right: 10px;
  44 + padding-right: 10px;
45 45 }
46   -
  46 +
47 47  
48 48  
49 49 /* Bottom Menu */
... ... @@ -52,7 +52,7 @@
52 52 }
53 53  
54 54 .bottom-menu {
55   - position: fixed;
  55 + position: fixed;
56 56 bottom: 0px;
57 57 width: 100%;
58 58 padding: 0px 30px;
... ... @@ -78,6 +78,11 @@
78 78 font-size: 35px;
79 79 }
80 80  
  81 + .language-selector{
  82 + text-align: center;
  83 + margin: 10px;
  84 + }
  85 +
81 86  
82 87 /* End Bottom Menu */
83 88 }
... ... @@ -133,7 +138,7 @@
133 138 margin-left: -30px;
134 139 margin-right: -30px;
135 140 }
136   -
  141 +
137 142 .navbar .navbar-form {
138 143 margin-top: 0px !important;
139 144 }
... ... @@ -153,7 +158,7 @@
153 158 }
154 159  
155 160 .users-cloud .small a {
156   -
  161 +
157 162 display:none;
158 163 }
159 164  
... ... @@ -172,7 +177,7 @@
172 177  
173 178 .comment-section .comment .comment-img {
174 179 padding-left: 5px;
175   - padding-right: 5px;
  180 + padding-right: 5px;
176 181 }
177 182 }
178 183  
... ... @@ -206,7 +211,7 @@
206 211 .language-selector-on-header .title{
207 212 display:none;
208 213 }
209   -
  214 +
210 215 .navbar {
211 216 height: 50px;
212 217 }
... ... @@ -253,4 +258,12 @@
253 258 .mural .post_make .post-field h4 {
254 259 line-height: 1.6em;
255 260 }
256   -}
257 261 \ No newline at end of file
  262 + .outside-title{
  263 + font-size:1.5em;
  264 + }
  265 +}
  266 +@media(max-width:610px){
  267 + .outside-title{
  268 + font-size:1.5em;
  269 + }
  270 +}
... ...
themes/views.py
... ... @@ -83,4 +83,4 @@ class CSSStyleSettings(braces_mixins.LoginRequiredMixin, braces_mixins.Staffuser
83 83 @log_decorator("contrast", "click", "contrast")
84 84 def Contrast(request):
85 85 caminho = request.META.get('HTTP_REFERER')
86 86 - return HttpResponseRedirect(caminho)
  87 + return HttpResponseRedirect(caminho)
87 88 \ No newline at end of file
... ...
users/templates/users/login.html
... ... @@ -59,35 +59,35 @@
59 59 <div class="row">
60 60 <div class="col-lg-10 col-md-10 col-sm-10 col-lg-offset-1 col-md-offset-1 col-sm-offset-1">
61 61 {% if not deny_register %}
62   - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 text-center">
63   - <button type="submite" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
  62 + <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6 text-center">
  63 + <button type="submit" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
64 64 </div>
65   - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 text-center">
  65 + <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6 text-center">
66 66 <a class="btn btn-default btn-raised btn-block" href="{% url 'users:signup' %}" formaction="#" style="position: initial;">{% trans 'Sign Up' %}</a>
67 67 </div>
68 68 {% else %}
69   - <div class="col-md-6 col-xs-6 col-sm-6 col-lg-6 col-lg-offset-3 col-md-offset-3 col-sm-offset-3 col-xs-offset-3 text-center">
70   - <button type="submite" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
  69 + <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6 col-lg-offset-3 col-md-offset-3 col-sm-offset-3 col-xs-offset-3 text-center">
  70 + <button type="submit" class="btn btn-success btn-raised btn-block" form="form-login" style="position: initial;"> {% trans 'Log in' %} </button>
71 71 </div>
72 72 {% endif %}
73 73 </div>
74 74 </div>
75   - <div class="row login_subcommands">
  75 + <div class="row login_subcommands hidden-sm hidden-xs">
76 76 {% if not deny_register %}
77 77 <div class="col-sm-offset-1 col-md-10 col-lg-10 col-sm-10 col-xs-12">
78 78 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right forgotPassword">
79 79 <a class="pull-right" href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a>
80 80 <li class="dropdown language-selector pull-right " style="margin-top:1px;margin-right:10px;">
81 81 {% get_current_language as LANGUAGE_CODE %}
82   -
83   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true">
  82 +
  83 + <a href="#" class="dropdown-toggle hidden-sm hidden-xs" data-toggle="dropdown" data-close-others="true">
84 84 <span >[{{LANGUAGE_CODE}}] </span>
85 85 </a>
86   - <a href="{% url 'themes:contrast' %}" id = "contrast_button" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a>
  86 + <a href="{% url 'themes:contrast' %}" id = "contrast_button" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust hidden-sm hidden-xs"></i></a>
87 87 <ul class="dropdown-menu">
88 88 {% get_available_languages as LANGUAGES %}
89 89 {% get_language_info_list for LANGUAGES as languages %}
90   -
  90 +
91 91 {% for language in languages %}
92 92 <li {% if language.code == LANGUAGE_CODE %}
93 93 class="active"
... ... @@ -108,12 +108,12 @@
108 108  
109 109 <li class="dropdown language-selector pull-right " style="margin-top:1px;margin-right:10px;">
110 110 {% get_current_language as LANGUAGE_CODE %}
111   - <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true">
  111 + <a href="#" class="dropdown-toggle hidden-sm hidden-xs" data-toggle="dropdown" data-close-others="true">
112 112  
113 113 <span>[{{LANGUAGE_CODE}}] </span>
114 114  
115 115 </a>
116   - <a href="{% url 'themes:contrast'%}" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a>
  116 + <a href="{% url 'themes:contrast'%}" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust hidden-sm hidden-xs"></i></a>
117 117 <ul class="dropdown-menu">
118 118 {% get_available_languages as LANGUAGES %}
119 119 {% get_language_info_list for LANGUAGES as languages %}
... ... @@ -134,8 +134,68 @@
134 134 </div>
135 135 {% endif %}
136 136 </div>
  137 + <div class="row login_subcommands hidden-lg hidden-md">
  138 + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center forgotPassword">
  139 + <a href="{% url 'users:forgot_pass' %}">{% trans 'Forgot your password?' %}</a>
  140 + </div>
  141 + </div>
137 142 </div>
138 143 </div>
  144 + <div class="row login_subcommands hidden-lg hidden-md">
  145 + {% if not deny_register %}
  146 + <div class="col-sm-12 col-xs-12">
  147 + <li class="dropdown language-selector ">
  148 + {% get_current_language as LANGUAGE_CODE %}
  149 +
  150 + <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true">
  151 + <span >[{{LANGUAGE_CODE}}] </span>
  152 + </a>
  153 + <a href="{% url 'themes:contrast' %}" id = "contrast_button_mobile" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a>
  154 + <ul class="dropdown-menu">
  155 + {% get_available_languages as LANGUAGES %}
  156 + {% get_language_info_list for LANGUAGES as languages %}
  157 +
  158 + {% for language in languages %}
  159 + <li {% if language.code == LANGUAGE_CODE %}
  160 + class="active"
  161 + {% endif %}>
  162 + <a class="language-item" value-lang="{{language.code}}">
  163 + <span>{{language.code}}</span>
  164 + </a>
  165 + </li>
  166 + {% endfor %}
  167 + </ul>
  168 + </li>
  169 + </div>
  170 + {% else %}
  171 + <div class="col-sm-12 col-xs-12">
  172 + <li class="dropdown language-selector">
  173 + {% get_current_language as LANGUAGE_CODE %}
  174 + <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-close-others="true">
  175 +
  176 + <span>[{{LANGUAGE_CODE}}] </span>
  177 +
  178 + </a>
  179 + <a href="{% url 'themes:contrast' %}" id = "contrast_button_mobile" style="margin-left:10px;"><i class="glyphicon glyphicon-adjust"></i></a>
  180 + <ul class="dropdown-menu">
  181 + {% get_available_languages as LANGUAGES %}
  182 + {% get_language_info_list for LANGUAGES as languages %}
  183 + {% for language in languages %}
  184 +
  185 + <li {% if language.code == LANGUAGE_CODE %}
  186 + class="active"
  187 + {% endif %}>
  188 + <a class="language-item" value-lang="{{language.code}}">
  189 + <span>{{language.code}}</span>
  190 + </a>
  191 + </li>
  192 +
  193 + {% endfor %}
  194 + </ul>
  195 + </li>
  196 + </div>
  197 + {% endif %}
  198 + </div>
139 199 </div>
140 200 </div>
141 201  
... ... @@ -152,6 +212,21 @@
152 212  
153 213 });
154 214 </script>
  215 +
  216 +<script type="text/javascript">
  217 + $("#contrast_button_mobile" ).click(function() {
  218 + if (Cookies.get('contrast_check')) {
  219 + Cookies.remove('contrast_check')
  220 + //location.reload()
  221 + }
  222 + else {
  223 + Cookies.set('contrast_check','contrast')
  224 + //location.reload()
  225 + }
  226 +
  227 + });
  228 +</script>
  229 +
155 230 {% endblock%}
156 231  
157 232 {% block footer %}
... ...