template.php
149 lines
| 1 | <style> |
| 2 | .wpmet-str { |
| 3 | display: flex; |
| 4 | flex-wrap: wrap; |
| 5 | width: 100%; |
| 6 | margin-bottom: 10px; |
| 7 | } |
| 8 | .wpmet-str-thumb { |
| 9 | width: 75px; |
| 10 | padding-right: 7px; |
| 11 | box-sizing: border-box; |
| 12 | align-self: flex-start; |
| 13 | padding-top: 5px; |
| 14 | } |
| 15 | .wpmet-str-thumb img { |
| 16 | width: 100%; |
| 17 | display: block; |
| 18 | min-height: 34px; |
| 19 | } |
| 20 | .wpmet-str-desc.with-image { |
| 21 | width: calc(100% - 75px); |
| 22 | font-weight: 400; |
| 23 | line-height: 1.5; |
| 24 | font-size: 13px; |
| 25 | } |
| 26 | .wpmet-str-desc a { |
| 27 | font-weight: 500; |
| 28 | color: #0073aa; |
| 29 | text-decoration: none; |
| 30 | padding-bottom: 5px; |
| 31 | display: inline-block; |
| 32 | } |
| 33 | .wpmet-str:last-child { |
| 34 | margin-bottom: 0; |
| 35 | } |
| 36 | .wpmet-str-desc span { |
| 37 | display: block; |
| 38 | } |
| 39 | .wpmet-bullet-wall { |
| 40 | width: 6px; |
| 41 | height: 6px; |
| 42 | border-radius: 50%; |
| 43 | background-color: black; |
| 44 | display: inline-block; |
| 45 | margin: 0 5px; |
| 46 | } |
| 47 | .wpmet-dashboard-widget-block { |
| 48 | width: 100%; |
| 49 | } |
| 50 | .wpmet-dashboard-widget-block .wpmet-title-bar a{ |
| 51 | color: #23282d; |
| 52 | font-weight: 400; |
| 53 | font-size: 12px; |
| 54 | } |
| 55 | .wpmet-dashboard-widget-block .wpmet-title-bar { |
| 56 | display: table; |
| 57 | width: 100%; |
| 58 | -webkit-box-shadow: 0 5px 8px rgba(0, 0, 0, 0.05); |
| 59 | box-shadow: 0 5px 8px rgba(0, 0, 0, 0.05); |
| 60 | margin: 0 -12px 8px; |
| 61 | padding: 0 12px 12px; |
| 62 | } |
| 63 | .wpmet-dashboard-widget-block .wpmet-footer-bar { |
| 64 | border-top: 1px solid #eee; |
| 65 | padding-top: 1rem; |
| 66 | } |
| 67 | .wpmet-dashboard-widget-block .wpmet-footer-bar a { |
| 68 | padding: 0 5px; |
| 69 | } |
| 70 | .wpmet-dashboard-widget-block a { |
| 71 | text-decoration: none; |
| 72 | font-size: 14px; |
| 73 | color: #007cba; |
| 74 | font-weight: 600; |
| 75 | } |
| 76 | .wpmet-str .wpmet-banner { |
| 77 | width: 100%; |
| 78 | } |
| 79 | .wpmet-dashboard-widget-block .dashicons { |
| 80 | vertical-align: middle; |
| 81 | font-size: 17px; |
| 82 | } |
| 83 | </style> |
| 84 | |
| 85 | <div class="wpmet-dashboard-widget-block"> |
| 86 | <div class="wpmet-title-bar"> |
| 87 | <?php |
| 88 | foreach ($this->plugin_link as $k => $link) { |
| 89 | echo '<a target="_blank" href="' . esc_url($link[1]) . '">' . esc_html($link[0]) . '</a>'; |
| 90 | if (isset($this->plugin_link[$k + 1])) { |
| 91 | echo '<div class="wpmet-bullet-wall"></div>'; |
| 92 | } |
| 93 | } |
| 94 | ?> |
| 95 | </div> |
| 96 | </div> |
| 97 | |
| 98 | <?php |
| 99 | foreach ($this->stories as $story) : |
| 100 | if($story['type'] === 'news' || $story['type'] === '') : |
| 101 | ?> |
| 102 | <div class="wpmet-str <?php echo ((isset($story['story_image']) && $story['story_image'] != '') ? 'with-image' : ''); ?>"> |
| 103 | <?php if(isset($story['story_image']) && $story['story_image'] != ''): ?> |
| 104 | <div class="wpmet-str-thumb"> |
| 105 | <img src="<?php echo esc_url($story['story_image']); ?>" /> |
| 106 | </div> |
| 107 | <?php endif; ?> |
| 108 | |
| 109 | <div class="wpmet-str-desc"> |
| 110 | |
| 111 | <a target="_blank" href="<?php echo esc_url($story['story_link']) ?>"> |
| 112 | <?php echo esc_html($story['title']); ?> |
| 113 | </a> |
| 114 | |
| 115 | <?php if(isset($story['description']) && $story['description'] != ''): ?> |
| 116 | <span><?php echo esc_html($story['description']); ?> </span> |
| 117 | <?php endif; ?> |
| 118 | |
| 119 | </div> |
| 120 | </div> |
| 121 | <?php |
| 122 | elseif($story['type'] === 'banner') : |
| 123 | ?> |
| 124 | <div class="wpmet-str"> |
| 125 | <a target="_blank" href="<?php echo esc_url($story['story_link']) ?>"> |
| 126 | <img class="wpmet-banner" src="<?php echo isset($story['story_image']) && $story['story_image'] != '' ? esc_url($story['story_image']) : '#'; ?>" /> |
| 127 | </a> |
| 128 | </div> |
| 129 | <?php |
| 130 | endif; |
| 131 | endforeach; |
| 132 | ?> |
| 133 | |
| 134 | <div class="wpmet-dashboard-widget-block"> |
| 135 | <div class="wpmet-footer-bar"> |
| 136 | <a href="https://wpmet.com/support-ticket" target="_blank"> |
| 137 | <?php echo esc_html__('Need Help?', 'shopengine'); ?> |
| 138 | <span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 139 | </a> |
| 140 | <a href="https://wpmet.com/blog/" target="_blank"> |
| 141 | <?php echo esc_html__('Blog', 'shopengine') ;?> |
| 142 | <span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 143 | </a> |
| 144 | <a href="https://wpmet.com/fb-group" target="_blank" style="color: #27ae60;"> |
| 145 | <?php echo esc_html__('Facebook Community', 'shopengine'); ?> |
| 146 | <span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 147 | </a> |
| 148 | </div> |
| 149 | </div> |