fixed floating on mobile version of the person/project submenus

This commit is contained in:
Ulf Gebhardt 2019-09-18 11:50:37 +02:00
parent 747454f48c
commit c435f492da
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
8 changed files with 58 additions and 49 deletions

View File

@ -221,7 +221,8 @@ strong {
}
.project{
padding-bottom: $distance_big;
padding-top: $distance_xlarge;
padding-bottom: $distance_medium;
img {
object-fit: cover;
width: $distance_huge;

View File

@ -21,9 +21,8 @@ class default_page implements \SYSTEM\PAGE\DefaultPage {
private static function getPersons(){
$result = '';
$column_counter = 0;
$_content_imgs = '';
$_content_details = '';
$column_counter = 0;
$content = '';
$persons = \SQL\SELECT_PERSONS_VISIBLE::QQ();
$person_badges = \SQL\SELECT_BADGES_VISIBLE::QA(array(\SAI\saimod_project::BADGE_TYPE_PERSON_ABILITIES)); // This part we filter phpside due to performance.
@ -46,24 +45,20 @@ class default_page implements \SYSTEM\PAGE\DefaultPage {
}
$row['projects'] = substr($row['projects'],0,-3);
$_content_imgs .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/person_img.tpl'))->SERVERPATH(),$row);
$_content_details .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/person_details.tpl'))->SERVERPATH(),$row);
$content .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/person.tpl'))->SERVERPATH(),$row);
// Insert full row and start a new row
if($column_counter++ === 2){
$result .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_row.tpl'))->SERVERPATH(),
array( '_content_imgs' => $_content_imgs,
'_content_details' => $_content_details));
$column_counter = 0;
$_content_imgs = '';
$_content_details = '';
array( 'content' => $content));
$column_counter = 0;
$content = '';
}
}
// Insert incomplete rows
if($column_counter != 0){
$result .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_row.tpl'))->SERVERPATH(),
array( '_content_imgs' => $_content_imgs,
'_content_details' => $_content_details));
array( 'content' => $content));
}
return $result;
@ -72,9 +67,8 @@ class default_page implements \SYSTEM\PAGE\DefaultPage {
private static function getProjects(){
$result = '';
$column_counter = 0;
$_content_imgs = '';
$_content_details = '';
$column_counter = 0;
$content = '';
$projects = \SQL\SELECT_PROJECTS_VISIBLE::QQ();
$project_focus = \SQL\SELECT_BADGES_VISIBLE::QA(array(\SAI\saimod_project::BADGE_TYPE_PROJECT_FOCUS)); // This part we filter phpside due to performance.
@ -100,24 +94,20 @@ class default_page implements \SYSTEM\PAGE\DefaultPage {
$row['persons'] .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/project_person.tpl'))->SERVERPATH(),$person);
}
$_content_imgs .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/project_img.tpl'))->SERVERPATH(),$row);
$_content_details .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/project_details.tpl'))->SERVERPATH(),$row);
$content .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/project.tpl'))->SERVERPATH(),$row);
// Insert full row and start a new row
if($column_counter++ === 2){
$result .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_row.tpl'))->SERVERPATH(),
array( '_content_imgs' => $_content_imgs,
'_content_details' => $_content_details));
$column_counter = 0;
$_content_imgs = '';
$_content_details = '';
array( 'content' => $content));
$column_counter = 0;
$content = '';
}
}
// Insert incomplete rows
if($column_counter != 0){
$result .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_row.tpl'))->SERVERPATH(),
array( '_content_imgs' => $_content_imgs,
'_content_details' => $_content_details));
array( 'content' => $content));
}
return $result;

View File

@ -1,6 +1,5 @@
<div class="container">
<div class="row">
${_content_imgs}
${_content_details}
${content}
</div>
</div>

View File

@ -0,0 +1,19 @@
<html>
<head>
${css}
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-3" style="background-color: green">A</div>
<div class="col-12 order-lg-last" style="background-color: purple">AD</div>
<div class="col-lg-3" style="background-color: red">B</div>
<div class="col-12 order-lg-last" style="background-color: grey">BD</div>
<div class="col-lg-3" style="background-color: blue">C</div>
<div class="col-12 order-lg-last" style="background-color: black">CD</div>
<div class="col-lg-3" style="background-color: yellow">D</div>
<div class="col-12 order-lg-last" style="background-color: orange">DD</div>
</div>
</div>
</body>
</html>

View File

@ -1,4 +1,14 @@
<div id="person-details-${id}" class="col-12 d-none person-details">
<div id="person-${id}" class="col-lg-4 person">
<a id="person-img-${id}" href="#person-details-${id}" person="${id}" class="person-link">
<div>
<img src="./files/persons/${img}" class="rounded-circle" alt="${name}">
</div>
<div class="person-img-name">
${name} <i class="fa fa-angle-down"></i>
</div>
</a>
</div>
<div id="person-details-${id}" class="col-12 order-lg-last d-none person-details">
<div>
<table class="table table-borderless table-condensed">
<tr>

View File

@ -1,10 +0,0 @@
<div id="person-${id}" class="col-lg-4 person">
<a id="person-img-${id}" href="#person-details-${id}" person="${id}" class="person-link">
<div>
<img src="./files/persons/${img}" class="rounded-circle" alt="${name}">
</div>
<div class="person-img-name">
${name} <i class="fa fa-angle-down"></i>
</div>
</a>
</div>

View File

@ -1,4 +1,14 @@
<div id="project-details-${id}" class="col-12 d-none project-details">
<div id="project-${id}" class="col-lg-4 project">
<a id="project-img-${id}" href="#project-details-${id}" project="${id}" class="project-link">
<div>
<img src="./files/projects/${img}" class="rounded" alt="${name}">
</div>
<div class="project-img-name">
${name} <i class="fa fa-angle-down"></i>
</div>
</a>
</div>
<div id="project-details-${id}" class="col-12 order-lg-last d-none project-details">
<div>
<table class="table table-borderless table-condensed">
<tr>

View File

@ -1,10 +0,0 @@
<div id="project-${id}" class="col-lg-4 project">
<a id="project-img-${id}" href="#project-details-${id}" project="${id}" class="project-link">
<div>
<img src="./files/projects/${img}" class="rounded" alt="${name}">
</div>
<div class="project-img-name">
${name} <i class="fa fa-angle-down"></i>
</div>
</a>
</div>