Commit f66bf1cc by Damien Moulard

links to forms & style refactoring

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