Commit f66bf1cc by Damien Moulard

links to forms & style refactoring

parent 260bd747
...@@ -24,6 +24,16 @@ default_msettings = {'msg_accueil': {'title': 'Message borne accueil', ...@@ -24,6 +24,16 @@ default_msettings = {'msg_accueil': {'title': 'Message borne accueil',
'title': 'Lien vers le calendrier ABCD', 'title': 'Lien vers le calendrier ABCD',
'type': 'text', 'type': 'text',
'value': '' 'value': ''
},
'forms_link' : {
'title': 'Lien vers la page des formulaires',
'type': 'text',
'value': ''
},
'unsuscribe_form_link' : {
'title': 'Lien vers le formulaire de ré-inscription',
'type': 'text',
'value': ''
} }
} }
......
...@@ -19,10 +19,15 @@ body { ...@@ -19,10 +19,15 @@ body {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
border-radius: 30px; border-radius: 30px;
min-height: 350px;
margin: 1rem 1rem; margin: 1rem 1rem;
box-shadow: 2px 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1); box-shadow: 2px 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);
} }
.high_tile {
min-height: 350px;
}
.small_tile {
min-height: 250px;
}
.full_width_tile { .full_width_tile {
flex: 1 0 90%; flex: 1 0 90%;
...@@ -49,6 +54,7 @@ body { ...@@ -49,6 +54,7 @@ body {
margin: 3rem 0; margin: 3rem 0;
width: 80%; width: 80%;
display: flex; display: flex;
height: 100%;
} }
#home_tile_services_exchange .tile_content { #home_tile_services_exchange .tile_content {
...@@ -120,7 +126,7 @@ body { ...@@ -120,7 +126,7 @@ body {
} }
} }
.member_info { #home .member_info {
font-weight: bold; font-weight: bold;
} }
...@@ -193,18 +199,31 @@ body { ...@@ -193,18 +199,31 @@ body {
/* --Shifts exchange tile tile */ /* --Shifts exchange tile tile */
#go_to_shifts_calendar_area { .home_link_button_area {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
height: 100%;
} }
#go_to_shifts_calendar { .home_link_button {
width: 80%; width: 80%;
margin-top: 20px; margin: 30px auto auto auto;
white-space: normal; white-space: normal;
} }
/* -- I have a question tile */
#go_to_forms {
text-decoration: none;
}
#go_to_forms:hover {
color: white;
}
#go_to_forms.active {
color: white !important;
}
/* -- Shop info tile */ /* -- Shop info tile */
#shop_info_content { #shop_info_content {
display: flex; display: flex;
...@@ -212,7 +231,7 @@ body { ...@@ -212,7 +231,7 @@ body {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 80%; width: 80%;
height: 100%; margin: auto;
} }
.shop_info_item { .shop_info_item {
...@@ -222,6 +241,7 @@ body { ...@@ -222,6 +241,7 @@ body {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 2rem; font-size: 2rem;
flex: 1 0 50%;
} }
.shop_info_item h1,h2,h3,h4,h5,h6 { .shop_info_item h1,h2,h3,h4,h5,h6 {
...@@ -234,23 +254,27 @@ body { ...@@ -234,23 +254,27 @@ body {
font-weight: bold; font-weight: bold;
} }
.shop_message_content {
text-align: center;
}
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
.shop_info_item { .shop_info_item {
height: 90%;
padding: 0 4rem; padding: 0 4rem;
} }
.shop_message { .shop_message {
border-left: 1px solid #e7e9ed; border-left: 1px solid #e7e9ed;
} margin: 3rem 0;
.shop_message_content {
text-align: center;
} }
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
#shop_info_content {
flex-direction: column;
}
.shop_info_item { .shop_info_item {
width: 90%; flex: 1 0 50%;
height: 50%; width: 100%;
font-size: 1.6rem; font-size: 1.6rem;
padding: 1.5rem 0; padding: 1.5rem 0;
} }
...@@ -260,8 +284,10 @@ body { ...@@ -260,8 +284,10 @@ body {
.opening_hours_title { .opening_hours_title {
font-size: 1.9rem; font-size: 1.9rem;
} }
.shop_message { .shop_message {
border-top: 1px solid #e7e9ed; border-top: 1px solid #e7e9ed;
} }
.shop_message_content {
width: 90%;
}
} }
\ No newline at end of file
...@@ -95,6 +95,7 @@ function init_home() { ...@@ -95,6 +95,7 @@ function init_home() {
e.preventDefault(); e.preventDefault();
goto('mes-infos'); goto('mes-infos');
}); });
$("#go_to_forms").prop("href", forms_link);
// Init my info tile // Init my info tile
init_my_info_data(); init_my_info_data();
......
...@@ -28,8 +28,8 @@ def index(request, exception=None): ...@@ -28,8 +28,8 @@ def index(request, exception=None):
context = { context = {
'title': 'Espace Membre', 'title': 'Espace Membre',
'unsuscribe_form_link': getattr(settings, 'UNSUBSCRIBED_FORM_LINK', ''),
} }
template = loader.get_template('members_space/index.html') template = loader.get_template('members_space/index.html')
if ('failure' in credentials): if ('failure' in credentials):
...@@ -105,9 +105,10 @@ def index(request, exception=None): ...@@ -105,9 +105,10 @@ def index(request, exception=None):
context['daysToHide'] = days_to_hide context['daysToHide'] = days_to_hide
msettings = MConfig.get_settings('members') msettings = MConfig.get_settings('members')
if 'abcd_calendar_link' in msettings: context['abcd_calendar_link'] = msettings['abcd_calendar_link']['value'] if 'abcd_calendar_link' in msettings else ''
context['abcd_calendar_link'] = msettings['abcd_calendar_link']['value'] context['unsuscribe_form_link'] = msettings['unsuscribe_form_link']['value'] if 'unsuscribe_form_link' in msettings else ''
context['forms_link'] = msettings['forms_link']['value'] if 'forms_link' in msettings else ''
else: else:
# may arrive when switching database without cleaning cookie # may arrive when switching database without cleaning cookie
return redirect('/website/deconnect') return redirect('/website/deconnect')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h1>Mon espace membre</h1> <h1>Mon espace membre</h1>
</div> </div>
<div class="tiles_container"> <div class="tiles_container">
<div class="tile" id="home_tile_my_info"> <div class="tile high_tile" id="home_tile_my_info">
<div class="tile_title"> <div class="tile_title">
<i class="fas fa-user tile_icon"></i> <i class="fas fa-user tile_icon"></i>
Mes Infos Mes Infos
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<a href="#" id="see_more_info_link">Voir plus ></a> <a href="#" id="see_more_info_link">Voir plus ></a>
</div> </div>
</div> </div>
<div class="tile" id="home_tile_my_services"> <div class="tile high_tile" id="home_tile_my_services">
<div class="tile_title"> <div class="tile_title">
<i class="fas fa-clipboard tile_icon"></i> <i class="fas fa-clipboard tile_icon"></i>
Mes Services Mes Services
...@@ -51,29 +51,39 @@ ...@@ -51,29 +51,39 @@
</div> </div>
</div> </div>
</div> </div>
<div class="tile" id="home_tile_services_exchange"> <div class="tile small_tile" id="home_tile_services_exchange">
<div class="tile_title"> <div class="tile_title">
<i class="fas fa-exchange-alt tile_icon"></i> <i class="fas fa-exchange-alt tile_icon"></i>
Échange de services Échange de services
</div> </div>
<div class="tile_content"> <div class="tile_content">
<div id="go_to_shifts_calendar_area"> <div class="home_link_button_area">
<button type="button" class="btn--primary" id="go_to_shifts_calendar"> <button type="button" class="btn--primary home_link_button" id="go_to_shifts_calendar">
Accéder au calendrier d'échange de services Accéder au calendrier d'échange de services
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<div class="tile" id="home_tile_help"> <div class="tile small_tile" id="home_tile_help">
<div class="tile_title"> <div class="tile_title">
<i class="fas fa-question-circle tile_icon"></i> <i class="fas fa-question-circle tile_icon"></i>
J'ai une demande J'ai une demande
</div> </div>
<div class="tile_content"> <div class="tile_content">
À venir... <div class="home_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary home_link_button"
id="go_to_forms"
>
Accéder aux formulaires
</a>
</div>
</div> </div>
</div> </div>
<div class="tile" id="home_tile_shop_info"> <div class="tile small_tile" id="home_tile_shop_info">
<div class="tile_title"> <div class="tile_title">
<i class="fas fa-newspaper tile_icon"></i> <i class="fas fa-newspaper tile_icon"></i>
Informations magasins Informations magasins
......
...@@ -68,7 +68,10 @@ ...@@ -68,7 +68,10 @@
<script> <script>
var app_env = '{{app_env}}'; var app_env = '{{app_env}}';
var forms_link = '{{forms_link}}';
var unsuscribe_form_link = '{{unsuscribe_form_link}}'; var unsuscribe_form_link = '{{unsuscribe_form_link}}';
var abcd_calendar_link = "{{abcd_calendar_link}}"
var days_to_hide = "{{daysToHide}}"
var partner_data = { var partner_data = {
"partner_id":"{{partnerData.id}}", "partner_id":"{{partnerData.id}}",
"name":"{{partnerData.display_name}}", "name":"{{partnerData.display_name}}",
...@@ -90,8 +93,6 @@ ...@@ -90,8 +93,6 @@
"parent_id" : "{{partnerData.parent_id}}", "parent_id" : "{{partnerData.parent_id}}",
"parent_name" : "{{partnerData.parent_name}}", "parent_name" : "{{partnerData.parent_name}}",
} }
var days_to_hide = "{{daysToHide}}"
var abcd_calendar_link = "{{abcd_calendar_link}}"
</script> </script>
<script src="{% static "js/all_common.js" %}?v="></script> <script src="{% static "js/all_common.js" %}?v="></script>
<script src="{% static "js/members-space-home.js" %}?v="></script> <script src="{% static "js/members-space-home.js" %}?v="></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment