-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this possible? #60
Comments
That's quite a hard one. You mention you create the floor dynamically, would it be possible to add the PS: ReverseBuro effect was done by forcing ascensor behavior, each floor would get a data-ascensor-top/bottom attribute. |
Hi. PHP (simplified version) <?
// Structure
$website = array(
// HOME
"home" => array(
array(
"title" => "Homepage",
"content" => "Content"
),
),
// WORK
"Project 1" => array(
array(
"title" => "Start",
"content" => "At first we did..."
),
array(
"title" => "Middle",
"content" => "And then..."
),
array(
"title" => "End",
"content" => "Champagne, always :P"
),
),
"Project 2" => array(
array(
"title" => "Start",
"content" => "Once upon a time"
),
array(
"title" => "Middle",
"content" => "And then..."
),
array(
"title" => "Happily ever after",
"content" => "Champagne, once again :P"
),
),
// ABOUT
"about" => array(
array(
"title" => "About",
"content" => "I am..."
),
array(
"title" => "Clients tell stories",
"content" => "Content"
),
),
// CONTACT
"contact" => array(
array(
"title" => "Contact",
"content" => "Get in touch"
),
),
);
// GENERATE HTML
// over simplified
foreach($floors as $floor){
<floor>content</floor>
}
// GENERATE MAP
$y = 0;
$x = 0;
$map = array();
foreach ( $website as $floor){
$x=0;
foreach ( $floor as $room ){
$map[] = "$y,$x";
$x++;
}
$y++;
}
$map = [ [" . implode("],[",$map)."] ];
# print_r($map);
$map = [
[0,0], (home)
[1,0],[1,1],[1,2], (work)
[2,0],[2,1], (work-2)
[3,0],[3,1], (about)
[4,0] (contact)
]; Javascript <script>
$('#ascensor').ascensor({
direction: <? echo $map; ?>
});
</script> Nope. I tried many times to apply
Greetings, PS: ReverseBureau had the v1.0 script (but that didn't support swipe). Regards, Koen |
Maybe, thinking out loud:
|
What I would like to accomplish is that each floor (up and down) jumps back to the first element of each level of floors (above or below).
Simply put: all movements of "up and down" navigate to the first element of the next / previous level.
Difficulty: The floors are created dynamically, so manually adding "data-ascensor-..."-directions is not a possibility.
In addition: This is how ReverseBuro worked (their are now offline?).
For example
For example
Code example
With an example image:
The text was updated successfully, but these errors were encountered: