From 27e81ba619827128de0d5871f09376e775ef4731 Mon Sep 17 00:00:00 2001 From: Fred Trotter Date: Sun, 28 Mar 2021 00:29:58 +0000 Subject: [PATCH 1/2] initial --- views/zermelo/menu.blade.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 views/zermelo/menu.blade.php diff --git a/views/zermelo/menu.blade.php b/views/zermelo/menu.blade.php new file mode 100644 index 0000000..684939c --- /dev/null +++ b/views/zermelo/menu.blade.php @@ -0,0 +1,17 @@ + From e2f84074a30390ea66d695597f69e610f7c59b81 Mon Sep 17 00:00:00 2001 From: Fred Trotter Date: Sun, 28 Mar 2021 01:50:19 +0000 Subject: [PATCH 2/2] improving the card layout zebra pattern, does not apply to print media --- views/zermelo/card.blade.php | 69 +++++++++++---------- views/zermelo/layouts/card_layout.blade.php | 17 +++++ 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/views/zermelo/card.blade.php b/views/zermelo/card.blade.php index 975bc95..3cfd477 100644 --- a/views/zermelo/card.blade.php +++ b/views/zermelo/card.blade.php @@ -12,23 +12,17 @@ - @if ($report->is_fluid()) -
- @else -
- @endif + @if ($report->is_fluid()) +
+ @else +
+ @endif -
- -
- - - -
+
`; + + + if(block_count % 2 == 0){ + is_block_even = true; + block_test_message = ''; //for testing + extra_block_row_class = ' alternate_row '; + current_row_style = ' '; + }else{ + is_block_even = false; + block_test_message = ''; //for testing + extra_block_row_class = ''; + current_row_style = ''; + } + + + real_card_new_row = `
`; - if(isset(this_card.card_layout_block_label)){ //we have a label... so we will use it to seperate the card blocks - //is there a link or not? - if(isset(this_card.card_layout_block_url)){ //then we also have a url for the label - group_label_open_a = ``; - group_label_close_a = ``; - }else{ //we have the label but no url here... - group_label_open_a = ''; - group_label_close_a = ''; - } - //we have a label, with or without a link.. - real_card_group_label = ` + if(isset(this_card.card_layout_block_label)){ //we have a label... so we will use it to seperate the card blocks + //is there a link or not? + if(isset(this_card.card_layout_block_url)){ //then we also have a url for the label + group_label_open_a = ``; + group_label_close_a = ``; + }else{ //we have the label but no url here... + group_label_open_a = ''; + group_label_close_a = ''; + } + //we have a label, with or without a link.. + real_card_group_label = `
-

${group_label_open_a} ${this_card.card_layout_block_label} ${group_label_close_a}

+

${group_label_open_a} ${this_card.card_layout_block_label} ${group_label_close_a} ${block_test_message}

-
+
`; }else{ //there was no label... so we just need to have a newline between the rows... @@ -292,13 +302,8 @@ function doh_ajax_failed(jqxhr, textStatus, error){ //reset the last block id to this new one last_block_id = this_card.card_layout_block_id; - if( block_count % 2 == 0){ - //this is an 'even' row and needs to be colored differently.. - block_class = ' text-white bg-secondary '; - }else{ - //change it back!! - block_class = ' bg-light '; - } + block_class = ' bg-light '; + } }else{ //then this is the very first card.. lets setup our variables... diff --git a/views/zermelo/layouts/card_layout.blade.php b/views/zermelo/layouts/card_layout.blade.php index f3181f9..e565d57 100644 --- a/views/zermelo/layouts/card_layout.blade.php +++ b/views/zermelo/layouts/card_layout.blade.php @@ -20,10 +20,27 @@ height: min-content; vertical-align: middle; } + + .alternate_row { + background-color: whitesmoke; + border-radius: 10px; + padding-top: 5px; + + } + + @media print { + .alternate_row { + background-color: white; + } + + } + + +@include('Zermelo::menu') @include('Zermelo::card')