Changeset 3428394
- Timestamp:
- 12/27/2025 08:43:55 PM (2 months ago)
- Location:
- lifepress
- Files:
-
- 82 added
- 23 edited
-
assets/banner-1544x500-rtl.png (modified) (previous)
-
assets/banner-1544x500.png (modified) (previous)
-
assets/banner-772x250-rtl.png (modified) (previous)
-
assets/banner-772x250.png (modified) (previous)
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-5.png (added)
-
assets/screenshot-6.png (added)
-
tags/2.2 (added)
-
tags/2.2/README.txt (added)
-
tags/2.2/assets (added)
-
tags/2.2/assets/admin.css (added)
-
tags/2.2/assets/admin.js (added)
-
tags/2.2/assets/global.css (added)
-
tags/2.2/assets/libs (added)
-
tags/2.2/assets/libs/fontawesome (added)
-
tags/2.2/assets/libs/fontawesome/all.js (added)
-
tags/2.2/assets/libs/fontawesome/all.min.js (added)
-
tags/2.2/assets/libs/fontawesome/brands.js (added)
-
tags/2.2/assets/libs/fontawesome/brands.min.js (added)
-
tags/2.2/assets/libs/fontawesome/conflict-detection.js (added)
-
tags/2.2/assets/libs/fontawesome/conflict-detection.min.js (added)
-
tags/2.2/assets/libs/fontawesome/fontawesome.js (added)
-
tags/2.2/assets/libs/fontawesome/fontawesome.min.js (added)
-
tags/2.2/assets/libs/fontawesome/regular.js (added)
-
tags/2.2/assets/libs/fontawesome/regular.min.js (added)
-
tags/2.2/assets/libs/fontawesome/solid.js (added)
-
tags/2.2/assets/libs/fontawesome/solid.min.js (added)
-
tags/2.2/assets/libs/fontawesome/v4-shims.js (added)
-
tags/2.2/assets/libs/fontawesome/v4-shims.min.js (added)
-
tags/2.2/assets/libs/handlebars.js (added)
-
tags/2.2/assets/libs/jquery-ui (added)
-
tags/2.2/assets/libs/jquery-ui/images (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-bg_glass_100_f8f8f8_1x400.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-bg_glass_35_dddddd_1x400.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-bg_glass_60_eeeeee_1x400.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-bg_inset-hard_75_999999_1x100.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-bg_inset-soft_50_c9c9c9_1x100.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-icons_3383bb_256x240.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-icons_454545_256x240.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-icons_70b2e1_256x240.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-icons_999999_256x240.png (added)
-
tags/2.2/assets/libs/jquery-ui/images/ui-icons_fbc856_256x240.png (added)
-
tags/2.2/assets/libs/jquery-ui/jquery-ui.css (added)
-
tags/2.2/assets/libs/jquery-ui/jquery-ui.min.css (added)
-
tags/2.2/assets/libs/jquery-ui/theme.css (added)
-
tags/2.2/assets/libs/spectrum.css (added)
-
tags/2.2/assets/libs/spectrum.js (added)
-
tags/2.2/assets/libs/trumbowyg (added)
-
tags/2.2/assets/libs/trumbowyg/trumbowyg.min.js (added)
-
tags/2.2/assets/libs/trumbowyg/ui (added)
-
tags/2.2/assets/libs/trumbowyg/ui/icons.svg (added)
-
tags/2.2/assets/libs/trumbowyg/ui/trumbowyg.css (added)
-
tags/2.2/assets/libs/trumbowyg/ui/trumbowyg.min.css (added)
-
tags/2.2/assets/script.js (added)
-
tags/2.2/includes (added)
-
tags/2.2/includes/admin (added)
-
tags/2.2/includes/admin/class-admin-ajax.php (added)
-
tags/2.2/includes/admin/class-admin.php (added)
-
tags/2.2/includes/class-ajax.php (added)
-
tags/2.2/includes/class-entries.php (added)
-
tags/2.2/includes/class-entry.php (added)
-
tags/2.2/includes/class-frontend.php (added)
-
tags/2.2/includes/class-helper.php (added)
-
tags/2.2/includes/class-install.php (added)
-
tags/2.2/includes/class-lp_type_data.php (added)
-
tags/2.2/includes/class-lunisolar.php (added)
-
tags/2.2/includes/class-metrics.php (added)
-
tags/2.2/includes/class-settings.php (added)
-
tags/2.2/includes/class-shortcode.php (added)
-
tags/2.2/includes/class-time.php (added)
-
tags/2.2/includes/lib (added)
-
tags/2.2/includes/lib/MoonPhase.php (added)
-
tags/2.2/lang (added)
-
tags/2.2/lang/lifepress.mo (added)
-
tags/2.2/lang/lifepress.po (added)
-
tags/2.2/lifepress.php (added)
-
tags/2.2/templates (added)
-
tags/2.2/templates/class-template_parts.php (added)
-
tags/2.2/templates/dashboard.php (added)
-
tags/2.2/templates/header.php (added)
-
tags/2.2/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/assets/admin.css (modified) (3 diffs)
-
trunk/assets/admin.js (added)
-
trunk/assets/global.css (modified) (35 diffs)
-
trunk/assets/script.js (modified) (31 diffs)
-
trunk/includes/admin/class-admin-ajax.php (added)
-
trunk/includes/admin/class-admin.php (modified) (9 diffs)
-
trunk/includes/class-ajax.php (modified) (20 diffs)
-
trunk/includes/class-entries.php (modified) (1 diff)
-
trunk/includes/class-helper.php (modified) (4 diffs)
-
trunk/includes/class-lunisolar.php (added)
-
trunk/includes/class-metrics.php (added)
-
trunk/includes/class-settings.php (modified) (2 diffs)
-
trunk/includes/class-time.php (modified) (2 diffs)
-
trunk/includes/lib (added)
-
trunk/includes/lib/MoonPhase.php (added)
-
trunk/lang/lifepress.mo (modified) (previous)
-
trunk/lang/lifepress.po (modified) (3 diffs)
-
trunk/lifepress.php (modified) (6 diffs)
-
trunk/templates/class-template_parts.php (modified) (13 diffs)
-
trunk/templates/header.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lifepress/trunk/README.txt
r3244643 r3428394 4 4 Author URI: https://ashanjay.com 5 5 Requires at least: 6.0 6 Tested up to: 6. 7.27 Stable tag: 2. 1.36 Tested up to: 6.9 7 Stable tag: 2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 https://www.youtube.com/watch?v=umNuBKNpHBI 16 16 17 LifePress is a calendar based journal recorder that will allow you to track back progress and review past events to learn from the past and make positive progress in future. With LifePress you can record unlimited daily events easily with unlimited color-coded categories separated for each user. Track back recorded events quickly with weekly and monthly calendar view. 18 19 You are the creator of wonderful events, journal them with **[LifePress](https://ashanjay.com/lifepress/)**. 17 LifePress is a calendar-based personal journal designed to help you consciously record, reflect, and grow through your life events. 18 19 Instead of scattered notes or forgotten logs, LifePress gives you a visual timeline of your life — allowing you to look back, recognize patterns, track progress, and move forward with clarity. 20 21 Each logged-in user gets their own private journal calendar, with unlimited entries, color-coded categories, rich descriptions, images, and now custom data metrics and a lunisolar (moon phase) calendar view. 22 23 You are the creator of your life experiences. LifePress helps you record them with intention. 24 25 Learn More: **[LifePress](https://ashanjay.com/lifepress/)**. 20 26 21 27 == Main FEATURES == 22 28 23 * Record **unlimited** daily events 24 * Create unlimited color-coded event categories 25 * Edit event categories in real-time 26 * Ability to write lengthy description for entries if desired 27 * Record events by each loggedin website user 28 * Navigate through months or weeks from top navigator 29 * Easily check back and view or track recorded events and progress 30 * Weekly and monthly view of events 31 * Search previously recorded events 32 * Compatible with responsive design for veiwing from various devices 33 * Various pluggable actions and filters allow developers to extend features 34 * Quickly access any month from fast selector 35 * From any date come back easily to current date 36 * Attach images to entries 37 * Insert Calendar dashboard anywhere on your site using shortcode 38 * Ability to set timezone for entries 39 40 == 21 days to make a change in your life == 41 42 Scientists have calculated that an average of 21 days are required to be established as a habit in your life, if done repeatedly on those days. LifePress offers a great platform to record your repeated attempts at learning a new talent or practice to improve for 21 days. If you record these repeated attempts in LifePress, you can easily look back and see when you started the 21 day challenge, when you fell off, and how you are making progress. 43 44 45 == Own your personal Journal Data == 46 47 With LifePress, journal entry data is all yours. Your personal data is privately saved only in your database and only you can see them. Each logged in user will have their own separate LifePress calendar. 48 49 == Business Applications == 50 51 LifePress is a great solution for business organizations that want to influence their members to record daily entries to track progress in a calendar format. Each user's data is only visible to that user and admin in the calendar, which makes it a great team empowering solution. This would be an ideal solution for life coaches, fitness instructors, physical/life therapists who want their clients to record progressive data to help their clients make tangible changes in life. 52 53 == LifePress Pro - Coming Soon! == 54 55 As we have received several requests to improve the lifepress plugin for greater application, we are developing the Lifepress Pro, plugin as an extension to LifePress that will bring greater data metric information for calendar entries. We are also hoping in future iterations to implement data visualization for weekly and monthly data aggregates and ability to set goals and calculate progress towards them. 29 * Record **unlimited** daily journal entries 30 * Create **unlimited** color-coded categories 31 * Real-time category editing 32 * Write short notes or long-form journal entries 33 * Each logged-in user has their own private calendar 34 * Weekly and monthly calendar views 35 * Navigate quickly between months and weeks 36 * Fast date selector + return to today anytime 37 * Search past entries easily 38 * Attach images to journal entries 39 * Timezone support for accurate entries 40 * Responsive design for all devices 41 * Insert the LifePress calendar anywhere using a shortcode 42 * Developer-friendly with pluggable actions and filters 43 44 == 🗄️ Data Metrics (New in 2.2) == 45 46 LifePress now supports custom data metrics, allowing you to go beyond simple journaling. 47 48 Create unlimited custom fields and attach them to journal entries to track meaningful data alongside your notes. 49 50 Supported metric types include: 51 52 * Text fields 53 * Checkable (yes/no) fields 54 * Multiple selectable values 55 56 Perfect for tracking things like: 57 58 * Mood, energy, or focus 59 * Habits and consistency 60 * Health, fitness, or learning progress 61 * Any personal or professional metric that matters to you 62 63 Your journal becomes a living dataset of your life. 64 65 == 🌙 Lunisolar Calendar - Moon View (New in 2.2) == 66 67 Switch from the standard calendar to a moon-phase (lunisolar) view and align your journaling with natural rhythms. 68 69 Center your life awareness around: 70 71 * New moons 72 * Full moons 73 * Waxing and waning cycles 74 75 This view is ideal for those who prefer to plan, reflect, and reset in harmony with nature’s cycles rather than purely linear time. 76 77 78 == 🏆 21 days to make a change in your life == 79 80 Research suggests it takes around 21 days of consistent effort to form a habit. 81 82 LifePress provides a powerful way to: 83 84 * Record daily practice attempts 85 * Visually track streaks and breaks 86 * Reflect on when you started, paused, or recommitted 87 88 Whether you’re building a habit, learning a skill, or healing through consistency, LifePress makes progress visible and honest. 89 90 91 == 💪 Own your personal Journal Data == 92 93 Your data stays fully under your control. 94 95 * All entries are stored in your own WordPress database 96 * Journals are private by default 97 * Each user only sees their own LifePress calendar 98 * No external services, no data harvesting 99 100 Your life data belongs to you. 101 102 103 == 🌐 Business Applications == 104 105 LifePress is also ideal for organizations and professionals who want to empower people through self-tracking: 106 107 * Life coaches 108 * Fitness instructors 109 * Therapists 110 * Educators 111 * Wellness communities 112 113 Users record daily entries privately, while admins can support and guide progress — making LifePress a powerful accountability and growth tool. 114 115 == 🚀 Future Plans! == 116 117 LifePress is actively evolving, as we too use it daily for our personal journalling. Next we plan to add: List View and Lifespan/ long-term timeline view. 118 119 Have ideas of feature requests? -- Please let us know via support forum! 56 120 57 121 58 122 == Screenshots == 59 123 60 1. LifePress front-end interactive dashboard for loggedin user61 2. Super quick add new entry form124 1. LifePress dashboard for logged-in users 125 2. New entry form 62 126 3. Journal entry with image view 63 4. Edit entry tag form 127 4. Quick month select view 128 5. Entry tag edit view 129 6. Manage Metric Data editor 64 130 65 131 == Changelog == 132 = 2.2 (2025-12-27) = 133 ADDED: Option to enable Sun and moon information in footer 134 ADDED: Moon month view focused around moon phases 135 ADDED: Data metrics for entry 136 FIXED: header getting hidden behind wp bar - thank you steve 137 FIXED: tag text color adjustment based on background 138 FIXED: to focus on search field when clicked 139 FIXED: Ajax calls CSRF preventions 140 UPDATED: timezones to use wordpress based timezone list 141 UPDATED: Moved tags to top of the new entry form 142 UPDATED: Layout design and styles 143 66 144 = 2.1.3 (2025-2-21) = 67 145 ADDED: Ability to add a home page link to header -
lifepress/trunk/assets/admin.css
r3138542 r3428394 1 1 /* 2 2 * Lifepress Admin Styles 3 * @version 2. 13 * @version 2.2 4 4 */ 5 5 6 #lifepress_settings label{display: inline-block;} 7 #lifepress_settings input[type=text]{display: block;width: 100%} 6 :root{ 7 --lp_color_1: #212121; 8 --lp_color_blue: #5abdcd; 9 --lp_color_orange: #F38630; 10 --lp_border_color_1: #dadce0; 11 --bgc_focus:#ffefe5; 12 --bgc_past:#e9f9f8; 13 --bgc_prev:#e9f9f8; 14 --bgc_next:#f2e9f9; 15 --lp_font_1: 'Poppins', sans-serif; 16 --lp_font_2:'Noto Sans', arial; 17 --lp_color_grey1:#666666; 18 --lp_color_grey2:#d4d3d3; 19 20 --lpcg0: #f6f7f7; 21 --lpcg5: #dcdcde; 22 --lpcg10: #c3c4c7; 23 --lpcg20: #a7aaad; 24 --lpcg30: #8c8f94; 25 --lpcg40: #787c82; 26 --lpcg50: #646970; 27 --lpcg60: #50575e; 28 --lpcg70: #3c434a; 29 --lpcg80: #2c3338; 30 --lpcg90: #1d2327; 31 --lpcg100:#101517; 32 33 --lpclg0: #ffffff; 34 --lpclg3: #fbfbfc; 35 --lpclg6: #f7f7f8; 36 --lpclg8: #f5f5f6; 37 --lpclg10: #f2f2f3; 38 --lpclg20: #e6e6e8; 39 --lpclg30: #dadadd; 40 --lpclg40: #ceced2; 41 --lpclg50: #c2c2c6; 42 --lpclg60: #b6b6bb; 43 --lpclg70: #aaaaaa; 44 --lpclg80: #9e9e9f; 45 --lpclg90: #929293; 46 --lpclg100: #858687; 47 } 48 49 /* Generic */ 50 .lpcurp{cursor: pointer;} 51 .lphop7:hover{opacity: .7} 52 53 .lpclb{color:var(--lp_color_blue)} 54 55 .lp_trans{ 56 -webkit-transition: all .2s ease; 57 -moz-transition: all .2s ease; 58 -ms-transition: all .2s ease; 59 -o-transition: all .2s ease; 60 transition: all .2s ease; 61 } 62 63 /* Display */ 64 .dfx,.lpdfx{display: -webkit-flex;display: -moz-flex;display: -ms-flex;display: -o-flex;display: flex;} 65 .lpgap5{gap:5px;}.lpgap10{gap:10px;}.lpgap15{gap:15px;}.lpgap20{gap: 20px;} 66 .lpfxjcc, .lpfx_jc_c{-ms-flex-pack:center;justify-content:center;} 67 .lpfxjcsb, .lpfx_jc_sb,.jutc-spacebt{-ms-flex-pack:space-between;justify-content:space-between;} 68 .lpfx_jc_se{-ms-flex-pack:space-evenly;justify-content:space-evenly;} 69 .lpfx_jc_sa{-ms-flex-pack:space-around;justify-content:space-around;} 70 .lpfx_jc_fe{-ms-flex-pack:flex-end;justify-content:flex-end;} 71 .lpfx_jc_fs{-ms-flex-pack:flex-start;justify-content:flex-start;} 72 .lpfxaic, .lpfx_ai_c, .alic{align-items:center;} 73 .lpfxaife, .lpfx_ai_fe{align-items:flex-end;} 74 .lpfxaifs, .lpfx_ai_fs{align-items:flex-start;} 75 .lpfxdrc, .lpfx_dr_c{flex-direction:column;} 76 .lpfxdrcr, .lpfx_dr_cr{flex-direction:column-reverse;} 77 .lpfxdrr, .lpfx_dr_r{flex-direction:row;} 78 .lpfxdrrr, .lpfx_dr_rr{flex-direction:row-reverse;} 79 .lpfxww, .lpfx_ww{flex-wrap: wrap;} 80 .lpfx_b_50{flex-basis: 50%} 81 .lpfx_110{flex:1} 82 .lpfx_1{flex:1 1 auto;} 83 .lpfx_10a{flex:1 0 auto;} 84 .lpfx_g1{flex-grow:1;} 85 .lpdn,.dn{display:none} 86 .lpdb,.db{display:block} 87 .lpdib{display:inline-block} 88 89 /* opacity */ 90 .lpop0{opacity:0}.lpop1{opacity:.1}.lpop2{opacity:.2}.lpop3{opacity:.3}.lpop4{opacity:.4}.lpop5{opacity:.5}.lpop6{opacity:.6}.lpop7{opacity:.7}.lpop8{opacity:.8}.lpop9{opacity:.9}.lpop10{opacity:1} 91 92 /* Font */ 93 .lpfz10{font-size: 10px;}.lpfz11{font-size: 11px;}.lpfz12{font-size: 12px;}.lpfz14{font-size: 14px;}.lpfz16,.fz16{font-size: 16px;}.lpfz18{font-size: 18px;}.lpfz24{font-size: 24px;}.lpfz30{font-size: 30px;} 94 95 /* Background */ 96 .lpbgclg0{background-color:var(--lpclg0)}.lpbgclg3{background-color:var(--lpclg3)}.lpbgclg6{background-color:var(--lpclg6)}.lpbgclg8{background-color:var(--lpclg8)}.lpbgclg10{background-color:var(--lpclg10)}.lpbgclg20{background-color:var(--lpclg20)}.lpbgclg30{background-color:var(--lpclg30)}.lpbgclg40{background-color:var(--lpclg40)}.lpbgclg50{background-color:var(--lpclg50)}.lpbgclg60{background-color:var(--lpclg60)}.lpbgclg70{background-color:var(--lpclg70)}.lpbgclg80{background-color:var(--lpclg80)}.lpbgclg90{background-color:var(--lpclg90)}.lpbgclg100{background-color:var(--lpclg100)}.lpbgcg0{background-color:var(--lpcg0)}.lpbgcg5{background-color:var(--lpcg5)}.lpbgcg10{background-color:var(--lpcg10)}.lpbgcg20{background-color:var(--lpcg20)}.lpbgcg30{background-color:var(--lpcg30)}.lpbgcg40{background-color:var(--lpcg40)}.lpbgcg50{background-color:var(--lpcg50)}.lpbgcg60{background-color:var(--lpcg60)}.lpbgcg70{background-color:var(--lpcg70)}.lpbgcg80{background-color:var(--lpcg80)}.lpbgcg90{background-color:var(--lpcg90)}.lpbgcg100{background-color:var(--lpcg100)} 97 98 /* hover */ 99 .lphbgclg0:hover{background-color:var(--lpclg0)}.lphbgclg3:hover{background-color:var(--lpclg3)}.lphbgclg6:hover{background-color:var(--lpclg6)}.lphbgclg8:hover{background-color:var(--lpclg8)}.lphbgclg10:hover{background-color:var(--lpclg10)}.lphbgclg20:hover{background-color:var(--lpclg20)}.lphbgclg30:hover{background-color:var(--lpclg30)}.lphbgclg40:hover{background-color:var(--lpclg40)}.lphbgclg50:hover{background-color:var(--lpclg50)}.lphbgclg60:hover{background-color:var(--lpclg60)}.lphbgclg70:hover{background-color:var(--lpclg70)}.lphbgclg80:hover{background-color:var(--lpclg80)}.lphbgclg90:hover{background-color:var(--lpclg90)}.lphbgclg100:hover{background-color:var(--lpclg100)}.lphbgcg0:hover{background-color:var(--lpcg0)}.lphbgcg5:hover{background-color:var(--lpcg5)}.lphbgcg10:hover{background-color:var(--lpcg10)}.lphbgcg20:hover{background-color:var(--lpcg20)}.lphbgcg30:hover{background-color:var(--lpcg30)}.lphbgcg40:hover{background-color:var(--lpcg40)}.lphbgcg50:hover{background-color:var(--lpcg50)}.lphbgcg60:hover{background-color:var(--lpcg60)}.lphbgcg70:hover{background-color:var(--lpcg70)}.lphbgcg80:hover{background-color:var(--lpcg80)}.lphbgcg90:hover{background-color:var(--lpcg90)}.lphbgcg100:hover{background-color:var(--lpcg100)} 100 101 /* border */ 102 .lpbr5{border-radius: 5px;}.lpbr10{border-radius: 10px;}.lpbr15{border-radius: 15px;}.lpbr20{border-radius: 20px;}.lpbr25{border-radius: 25px;} 103 104 .lpmarl10{margin-left: 10px;} 105 .lpmarr10{margin-right: 10px;} 106 .lpmar5-0{margin:5px 0;} 107 .lppad10{padding:10px;} 108 .lpw100p{width: 100%;} 109 110 .lp_trans{ 111 -webkit-transition: all .2s ease; 112 -moz-transition: all .2s ease; 113 -ms-transition: all .2s ease; 114 -o-transition: all .2s ease; 115 transition: all .2s ease; 116 } 117 118 119 /* General */ 120 #lifepress_settings label{display: inline-block;font-size: 14px;} 121 #lifepress_settings input[type=text]{display: block;width: 100%; flex:1} 8 122 .lifepress_form_subbox{ 9 123 background-color: #dbf9f7; … … 14 128 padding: 0px;margin-top: 10px; box-shadow: 0px 0px 20px -5px #0000001c; 15 129 } 16 .lifepress_sub_form{ 17 background-color: #c2ecea; 18 padding: 10px 20px; 19 border-radius: 10px; 20 margin: 10px 0; 21 } 130 .lifepress_sub_form{} 22 131 .lp_settings_row{ 23 132 padding:1px 20px; 24 133 border-bottom: 1px solid #e7e7e7 25 134 } 26 .lp_settings_row p{display: flex; justify-content: space-between;align-items: center;}135 .lp_settings_row p{display: flex;align-items: center; flex-wrap:wrap;} 27 136 .lp_settings_row p label{flex-basis: 50%;} 28 137 .lp_settings_row:last-child{border:none;} … … 30 139 31 140 /* loading */ 32 .lp_loading{position: relative;} 141 .lp_loader{ 142 height: 20px; width: 100px; 143 border-radius: 20px; 144 border:2px solid #828282; 145 display: block; 146 overflow: hidden; 147 margin:40px auto; 148 } 149 @keyframes superman { 150 0% { transform: translate(-40px, 0); } 151 100% { transform: translate(100px, 0); } 152 } 153 @keyframes initloaderA { 154 0% {} 155 100% { transform: translateY(-66.67%);} 156 } 157 .lp_loader:before{ 158 content:""; 159 width: 40px; 160 height: 20px; 161 background-color: #84c5d0; 162 display: block; 163 position: relative; 164 animation-name: superman; 165 animation-duration: 0.7s; 166 animation-iteration-count: infinite; 167 animation-direction: alternate; 168 animation-timing-function: ease-in-out; 169 animation-fill-mode: none; 170 animation-delay: 0s; 171 } 172 .lp_loading{position: relative;overflow: hidden!important;} 33 173 .lp_loading:before{ 34 174 content:""; 35 background-color: #ffffffb5; 175 /*background-color: #ffffffb5;*/ 176 background: rgb(247,247,247); 177 background: linear-gradient(0deg, 178 rgb(255, 255, 255, 0.5) 33.37%, 179 rgb(189, 220, 253, 0.7) 50%, 180 rgb(255, 255, 255, 0.5) 66.67%); 181 animation:initloaderA 1.5s ease-in-out 0s infinite normal none running; 182 transform:translateY(0%); 183 top:0;left: 0;bottom: 0; 36 184 position: absolute; 37 width: 100%; height: 100%; z-index: 10;top:0; left:0; 38 } 185 width: 100%; height: 300%; z-index: 10; 186 } 187 .lp_loading.lp_lightbox_in:before{top: 0;left: 0; border-radius: 20px;} 188 189 /* Lightbox */ 190 #lp_lightboxes{ position: fixed;width: 100%;z-index: 900000; top:0; } 191 #lp_lightboxes .lp_one_lightbox{ 192 opacity: 0; visibility: hidden; 193 transition: all 0.1s ease; 194 background: rgba(222, 222, 222, 0.7); 195 position: fixed; 196 width: 100%; 197 height: 100%;top:0;right:0; bottom:0; 198 overflow-y: auto 199 } 200 #lp_lightboxes .lp_one_lightbox.show{opacity: 1; visibility: visible;} 201 .lp_one_lightbox .lp_one_lb_in{ 202 -webkit-transition: -webkit-transform 0.15s ease; 203 transition: transform 0.15s ease; 204 -webkit-transform: translateY(50px); 205 transform: translateY(50px); 206 box-shadow: 0px 0px 30px -5px #0000003d; 207 background-color: #fbfbfb; 208 position: relative; 209 width: 90%; 210 margin: 50px auto 30px; padding: 50px; 211 border: none; 212 border-radius: 25px; 213 box-sizing: border-box; 214 } 215 .lp_one_lightbox.show .lp_one_lb_in{ 216 -webkit-transform: translateY(0px); 217 transform: translateY(0px); 218 } 219 220 .lp_lb_toprow{ 221 position: absolute; 222 padding: 10px; 223 height: 60px; 224 width: 100%; 225 display: flex; 226 flex-direction: row; 227 margin: 0; 228 justify-content: flex-end; 229 box-sizing: border-box; 230 top: 0; 231 right: 0; 232 } 233 .lp_lb_toprow button{ 234 outline: none;border: none; background: none; 235 font-size: 16px; height: 40px; width: 40px; 236 border-radius: 50%; cursor: pointer; 237 } 238 .lp_lb_toprow button svg{color: var(--lp_color_grey1);} 239 .lp_lb_toprow button:hover{ 240 outline: none;border: none; 241 background-color: var(--lp_color_grey2) 242 } 243 .lp_lb_toprow button:hover svg{ color: var(--lp_color_1) } 244 .lp_lb_close{ 245 position: relative; 246 z-index: 90001; 247 margin: 0 0px 0 10px; 248 color: var(--lp_color_grey1); 249 background-color: #f0f0f0; 250 border-radius: 50%; 251 padding: 20px; 252 height: 28px; 253 width: 28px; 254 text-align: center; 255 line-height: 90%; 256 font-size: 28px; 257 cursor: pointer; 258 text-indent: -9999px; 259 font-weight: 300; 260 box-sizing: content-box; 261 -moz-box-sizing: content-box; 262 box-sizing: border-box; 263 264 } 265 .lp_lb_close:hover{background-color: var(--lp_color_grey2)} 266 .lp_lb_close:hover:before,.lp_lb_close:hover:after{ background-color: var(--lp_color_1); } 267 .lp_lb_close:before{transform: rotate(45deg);} 268 .lp_lb_close:after{transform: rotate(-45deg);} 269 .lp_lb_close:before, .lp_lb_close:after{ 270 position: absolute; 271 left: 18px; 272 top: 9px; 273 content: ' '; 274 height: 50%; 275 width: 2px; 276 background-color: #666666; 277 } 278 .lp_one_lightbox{} 279 .lp_entry_image img{border-radius: 10px;} 280 .lp_editor_box {flex:1;} 281 282 /* Metrics */ 283 .lpm_fields_content p{} 284 .lpm_fields_content p.ui-state-highlight, 285 .lpp_metrics .ui-state-highlight-big{display: inline-block; width: 150px;height:43px; margin:0; padding:0;background-color: #e6f3f5; border-radius: 15px;} 286 .lpp_metrics .ui-state-highlight-big{display: block;width: 100%; height: 100px;margin-bottom: 5px;} 287 /* IO Elements */ 288 .lp_toggle { cursor: pointer; display: inline-block;} 289 .lp_toggle:hover{opacity: 0.8} 290 291 /* When checked → ON state */ 292 .toggle-svg.on .track { fill: var(--lp_color_blue); transition: fill 0.4s ease;} 293 .toggle-svg.on .knob { 294 transform: translateX(260px); /* move from left to right */ 295 transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 296 } 297 /* Base styles & transitions */ 298 .toggle-svg .track {transition: fill 0.4s ease;} 299 .toggle-svg .knob { 300 transform: translateX(0); 301 transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); 302 transform-origin: center; 303 } 304 305 -
lifepress/trunk/assets/global.css
r3244643 r3428394 1 1 /** 2 2 * LifePress Styles 3 * @version 2. 1.33 * @version 2.2 4 4 */ 5 5 … … 17 17 --lp_color_grey1:#666666; 18 18 --lp_color_grey2:#d4d3d3; 19 20 --lpcg0: #f6f7f7; 21 --lpcg5: #dcdcde; 22 --lpcg10: #c3c4c7; 23 --lpcg20: #a7aaad; 24 --lpcg30: #8c8f94; 25 --lpcg40: #787c82; 26 --lpcg50: #646970; 27 --lpcg60: #50575e; 28 --lpcg70: #3c434a; 29 --lpcg80: #2c3338; 30 --lpcg90: #1d2327; 31 --lpcg100:#101517; 32 33 --lpclg0: #ffffff; 34 --lpclg3: #fbfbfc; 35 --lpclg6: #f7f7f8; 36 --lpclg8: #f5f5f6; 37 --lpclg10: #f2f2f3; 38 --lpclg20: #e6e6e8; 39 --lpclg30: #dadadd; 40 --lpclg40: #ceced2; 41 --lpclg50: #c2c2c6; 42 --lpclg60: #b6b6bb; 43 --lpclg70: #aaaaaa; 44 --lpclg80: #9e9e9f; 45 --lpclg90: #929293; 46 --lpclg100: #858687; 19 47 } 20 48 … … 23 51 cursor: pointer; 24 52 text-transform: uppercase; 25 padding: 10px 20px;53 padding: 7px 20px; 26 54 display: inline-block; 27 55 border-radius: 20px; 28 56 background-color: #fff; 29 color: #c3c3c3;57 color: var(--lp_color_1); 30 58 font-size: 13px; 31 59 font-weight: bold; … … 38 66 .lp_btn.grey, .lp_form .lp_btn.grey,.lp_btn_grey{background-color: #c5c5c5; color:#fff;} 39 67 .lp_clickable{cursor: pointer;} 68 .lp_btn.outlined{background-color: transparent; box-shadow: 0px 0px 0px 1px var(--lpcg40)} 69 .lp_btn.outlined:hover{background-color: var(--lpcg40); color:#fff} 40 70 .lp_hide{display: none;} 41 42 .mart5{margin-top:5px} .mart10{margin-top:10px} .mart15{margin-top:15px} .mart20{margin-top:20px} .mart25{margin-top:25px} .mart30{margin-top:30px} .mart40{margin-top:40px} .mart50{margin-top:50px} 43 .marb0{margin-bottom:0px}.marb5{margin-bottom:5px} .marb10{margin-bottom:10px} .marb15{margin-bottom:15px} .marb20{margin-bottom:20px} .marb25{margin-bottom:25px} .marb30{margin-bottom:30px} .marb35{margin-bottom:35px} .marb40{margin-bottom:40px} .marb45{margin-bottom:45px} .marb50{margin-bottom:50px} 71 .lp_btn.lp_svg{display: inline-flex; align-items: center; padding: 0; background-color: transparent;} 72 .lp_btn.lp_svg svg{margin:0!important; padding: 5px 10px 5px 5px;} 73 74 .lp_trans{ 75 -webkit-transition: all .2s ease; 76 -moz-transition: all .2s ease; 77 -ms-transition: all .2s ease; 78 -o-transition: all .2s ease; 79 transition: all .2s ease; 80 } 81 82 .lpmar0{margin:0;}.mart5{margin-top:5px} .mart10{margin-top:10px} .mart15{margin-top:15px} .mart20{margin-top:20px} .mart25{margin-top:25px} .mart30{margin-top:30px} .mart40{margin-top:40px} .mart50{margin-top:50px} 83 .marb0{margin-bottom:0px}.marb5{margin-bottom:5px} .lpmarb10,.marb10{margin-bottom:10px} .marb15{margin-bottom:15px} .marb20{margin-bottom:20px} .marb25{margin-bottom:25px} .marb30{margin-bottom:30px} .marb35{margin-bottom:35px} .marb40{margin-bottom:40px} .marb45{margin-bottom:45px} .marb50{margin-bottom:50px} 44 84 .padb5{padding-bottom:5px} .padb10{padding-bottom:10px} .padb15{padding-bottom:15px} .padb20{padding-bottom:20px} .padb25{padding-bottom:25px} .padb30{padding-bottom:30px} .padb40{padding-bottom:40px} .padb50{padding-bottom:50px} 45 85 .padt0{padding-top:0px}.padt5{padding-top:5px} .padt10{padding-top:10px} .padt15{padding-top:15px} .padt20{padding-top:20px} .padt25{padding-top:25px} .padt30{padding-top:30px} .padt40{padding-top:40px} .padt50{padding-top:50px} .padt60{padding-top:60px} 46 86 .padr5{padding-right:5px} .padr10{padding-right:10px} .padr15{padding-right:15px} .padr20{padding-right:20px} .padr25{padding-right:25px} .padr30{padding-right:30px} .padr40{padding-right:40px} .padr50{padding-right:50px} .padr60{padding-right:60px} 87 .padl10{padding-left: 10px;} 47 88 .marr5{margin-right:5px} .marr10{margin-right:10px} .marr15{margin-right:15px} .marr20{margin-right:20px} .marr25{margin-right:25px} .marr30{margin-right:30px} .marr40{margin-right:40px} .marr50{margin-right:50px} .marr60{margin-right:60px} 48 89 .marl5{margin-left:5px} .marl10{margin-left:10px} .marl15{margin-left:15px} .marl20{margin-left:20px} .marl25{margin-left:25px} .marl30{margin-left:30px} .marl40{margin-left:40px} .marl50{margin-left:50px} .marl60{margin-left:60px} … … 50 91 .pad0{padding:0px} .pad5{padding:5px} .pad10{padding:10px} .pad15{padding:15px} .pad20{padding:20px} .pad25{padding:25px}.pad30{padding:30px} 51 92 .mar0{margin:0px}.mar5{margin:5px} .mar10{margin:10px} .mar15{margin:15px} .mar20{margin:20px} .mar25{margin:25px} 93 .lppad10{padding: 10px;} 52 94 53 95 .pad0-20{padding: 0 20px;} 54 96 .pad0-30{padding: 0 30px;} 55 .posr{position: relative;} .posa{position: absolute;} 97 .lpposr, .posr{position: relative;} .posa, .lpposa{position: absolute;} 98 99 .lpmar0i{margin: 0!important} 56 100 57 101 /* Display */ 58 102 .dfx,.lpdfx{display: -webkit-flex;display: -moz-flex;display: -ms-flex;display: -o-flex;display: flex;} 59 103 .lpgap5{gap:5px;}.lpgap10{gap:10px;}.lpgap15{gap:15px;}.lpgap20{gap: 20px;} 60 .lpfx _jc_c{-ms-flex-pack:center;justify-content:center;}61 .lpfx _jc_sb,.jutc-spacebt{-ms-flex-pack:space-between;justify-content:space-between;}104 .lpfxjcc, .lpfx_jc_c{-ms-flex-pack:center;justify-content:center;} 105 .lpfxjcsb, .lpfx_jc_sb,.jutc-spacebt{-ms-flex-pack:space-between;justify-content:space-between;} 62 106 .lpfx_jc_se{-ms-flex-pack:space-evenly;justify-content:space-evenly;} 63 107 .lpfx_jc_sa{-ms-flex-pack:space-around;justify-content:space-around;} 64 108 .lpfx_jc_fe{-ms-flex-pack:flex-end;justify-content:flex-end;} 65 109 .lpfx_jc_fs{-ms-flex-pack:flex-start;justify-content:flex-start;} 66 .lpfx _ai_c, .alic{align-items:center;}67 .lpfx _ai_fe{align-items:flex-end;}68 .lpfx _ai_fs{align-items:flex-start;}69 .lpfx _dr_c{flex-direction:column;}70 .lpfx _dr_cr{flex-direction:column-reverse;}71 .lpfx _dr_r{flex-direction:row;}72 .lpfx _dr_rr{flex-direction:row-reverse;}73 .lpfx _ww{flex-wrap: wrap;}110 .lpfxaic, .lpfx_ai_c, .alic{align-items:center;} 111 .lpfxaife, .lpfx_ai_fe{align-items:flex-end;} 112 .lpfxaifs, .lpfx_ai_fs{align-items:flex-start;} 113 .lpfxdrc, .lpfx_dr_c{flex-direction:column;} 114 .lpfxdrcr, .lpfx_dr_cr{flex-direction:column-reverse;} 115 .lpfxdrr, .lpfx_dr_r{flex-direction:row;} 116 .lpfxdrrr, .lpfx_dr_rr{flex-direction:row-reverse;} 117 .lpfxww, .lpfx_ww{flex-wrap: wrap;} 74 118 .lpfx_b_50{flex-basis: 50%} 75 119 .lpfx_110{flex:1} … … 81 125 .lpdib{display:inline-block} 82 126 127 /* border */ 128 .lpbr5{border-radius: 5px;}.lpbr10{border-radius: 10px;}.lpbr15{border-radius: 15px;}.lpbr20{border-radius: 20px;}.lpbr25{border-radius: 25px;} 129 .lpbr50p{border-radius: 50%;} 83 130 84 131 .w100{width: 100%;} … … 92 139 -moz-box-sizing: border-box; 93 140 box-sizing: border-box;} 141 .lpofh{overflow: hidden;} 94 142 95 143 /* fonts */ 96 144 .lpfont1, .lpff_1{font-family: var(--lp_font_1)}.lpfont2, .lpff_2{font-family: var(--lp_font_2)} 97 145 98 .lpfz1 4{font-size: 14px;}.lpfz16,.fz16{font-size: 16px;}.lpfz18{font-size: 18px;}.lpfz24{font-size: 24px;}.lpfz30{font-size: 30px;}146 .lpfz10{font-size: 10px;}.lpfz11{font-size: 11px;}.lpfz12{font-size: 12px;}.lpfz14{font-size: 14px;}.lpfz16,.fz16{font-size: 16px;}.lpfz18{font-size: 18px;}.lpfz24{font-size: 24px;}.lpfz30{font-size: 30px;} 99 147 100 148 /* hover */ … … 106 154 .lpop0{opacity:0}.lpop1{opacity:.1}.lpop2{opacity:.2}.lpop3{opacity:.3}.lpop4{opacity:.4}.lpop5{opacity:.5}.lpop6{opacity:.6}.lpop7{opacity:.7}.lpop8{opacity:.8}.lpop9{opacity:.9}.lpop10{opacity:1} 107 155 108 .lp_trans{ 109 -webkit-transition: all .2s ease; 110 -moz-transition: all .2s ease; 111 -ms-transition: all .2s ease; 112 -o-transition: all .2s ease; 113 transition: all .2s ease; 156 157 158 @media (max-width: 850px){ 159 .lpdn_m{display: none;} 160 } 161 @media (max-width: 550px){ 162 .lpfxjccS{justify-content: center;} 163 .lpdn_s{display: none;} 114 164 } 115 165 … … 133 183 body.lifepress{ 134 184 margin: 0; padding: 0; color:var(--lp_color_1); 135 background-color: #fff;font-size: 14px;185 font-size: 14px; 136 186 box-sizing:border-box; 187 font-family: var(--lp_font_1); 188 background-color: var(--lp_color_1); 137 189 } 138 190 body.lifepress *{box-sizing:border-box;line-height: 100%; … … 152 204 153 205 .lp_dashboard{ 206 top:0; 154 207 box-sizing:border-box; 155 208 font-size: 14px; 156 209 line-height: 100%; 157 210 flex-direction:column; 158 width: 100%; height: 100%; 211 border-radius: 10px; 212 margin: 5px; 213 background-color: #ffffff; 214 box-sizing: border-box; 215 width: calc(100% - 10px); 216 height: calc(100% - 10px); 217 overflow: hidden; 159 218 position: absolute; 160 219 } … … 169 228 } 170 229 .lp_new_btn{ 171 font-size: 24px;230 font-size: 18px; 172 231 padding: 0; 173 border-radius: 50%; 232 border-radius: 10px; 233 margin: 0px; 174 234 height: 35px; 175 235 width: 35px; … … 177 237 text-align: center; 178 238 border: none; 179 /* font-weight: normal; */180 background-color: #fd5f00;181 color: #fff;182 239 } 183 240 .lp_new_btn:hover{background-color:#9ad8e2 } 184 .top_views .view{font-size: 20px; padding:14px 15px;cursor: pointer;}241 .top_views .view{font-size: 20px;min-width: 40px; text-align: center;} 185 242 .top_views .view:hover{background-color: #efefef} 186 243 .top_views .view.focus{background-color: var(--lp_color_blue);color:#fff; } … … 268 325 } 269 326 .lp_topbar .header_right .homelink{display: none;} 327 .lp_footer{border-top:1px solid var(--lp_border_color_1);} 270 328 /* in page layout */ 271 329 :root{ … … 287 345 border: none;} 288 346 347 348 /* Moon */ 349 :root{ 350 --moon_color:#fff; 351 --moon_dark:#111; 352 } 353 .lp_moon_data{ overflow: hidden;} 354 .lpmoon_container { 355 display: flex; 356 justify-content: space-between; 357 align-items: flex-start; 358 flex-wrap: nowrap; 359 max-width: 1100px; 360 margin: 0 auto; 361 } 362 .lp_moonphase { 363 text-align: center; 364 flex: 1; 365 min-width: 40px; 366 } 367 .lp_moonphase .lp_moon, .lunarday.lp_moon { 368 width: 20px; 369 height: 20px; 370 border-radius: 50%; 371 margin: 0 auto 12px; 372 background: #fff; 373 position: relative; 374 overflow: hidden; 375 border:1px solid var(--moon_dark); 376 } 377 /* moon bar */ 378 .lp_moon_bar{ 379 background-color: #d8d8d8; 380 height: 3px; 381 border-radius: 10px; 382 margin-top: 10px; 383 } 384 .lp_moon_bar .lp_moon_bar_on{ 385 background-color: #5f5f5f;border-radius: 10px; 386 height: 3px; 387 display: block; 388 width: 40%; position: relative; 389 } 390 .lp_moon_bar .lp_moon_bar_on b{ 391 background-color: #5f5f5f; 392 display: block; 393 width: 5px; 394 height: 5px; 395 border-radius: 50%; 396 margin-top: -1px; 397 position: absolute; 398 right: 0; 399 } 400 401 /* 8 Moon Phases */ 402 .lp_moon.new , .lunarday.lp_moon.new { background: #111; box-shadow: inset 0 0 30px #000; } 403 .lp_moon.waxing-crescent::before { content:""; position:absolute; width:70%; height:100%; left:0; background:#111; border-radius:0 50% 50% 0; } 404 .lp_moon.first-quarter { background: linear-gradient(to right, #111 50%, #fff 50%); } 405 .lp_moon.waxing-gibbous::before { content:""; position:absolute; width:70%; height:100%; right:0px; background:var(--moon_color); border-radius:50%; } 406 .lp_moon.full { background: #fff; } 407 .lp_moon.waning-gibbous::before { content:""; position:absolute; width:70%; height:100%; left:0%; background:var(--moon_color); border-radius:0 50% 50% 0; } 408 .lp_moon.last-quarter { background: linear-gradient(to right, #fff 50%, #111 50%); } 409 .lp_moon.waning-crescent::before { content:""; position:absolute; width:70%; height:100%; right:0%; background:#111; border-radius:50% 0 0 50%; } 410 411 .lp_moonphase .lp_moon.waxing-gibbous, 412 .lp_moonphase .lp_moon.waning-gibbous 413 {background-color: var(--moon_dark)} 414 415 .lp_moonphase .lp_label { font-size: 0.9rem; margin-top: 8px; opacity: 0.9; display: none;} 416 417 .lp_current-moon-highlight { 418 transform: scale(1.25); 419 border: 3px solid #4fc3f7; 420 box-shadow: 0 0 30px #4fc3f7 !important; 421 } 422 289 423 /* no access */ 290 424 .lp_no_access{text-align: center;padding: 50px;} … … 294 428 #lp_lightboxes .lp_one_lightbox{ 295 429 opacity: 0; visibility: hidden; 296 transition: all 0. 3s;430 transition: all 0.1s ease; 297 431 background: rgba(222, 222, 222, 0.7); 298 432 position: fixed; … … 303 437 #lp_lightboxes .lp_one_lightbox.show{opacity: 1; visibility: visible;} 304 438 .lp_one_lightbox .lp_one_lb_in{ 305 -webkit-transition: -webkit-transform 0. 2s;306 transition: transform 0. 2s;439 -webkit-transition: -webkit-transform 0.15s ease; 440 transition: transform 0.15s ease; 307 441 -webkit-transform: translateY(50px); 308 442 transform: translateY(50px); … … 379 513 } 380 514 .lp_one_lightbox{} 515 .lp_entry_image{ 516 background-color: #333; 517 border-radius: 15px; 518 text-align: center; 519 padding: 10px; 520 } 381 521 .lp_entry_image img{border-radius: 10px;} 382 522 .lp_editor_box {flex:1;} … … 398 538 0% {} 399 539 100% { transform: translateY(-66.67%);} 540 } 541 @keyframes preload_anim { 542 0% {} 543 100% { transform: translateX(140%);} 400 544 } 401 545 .lp_loader:before{ … … 430 574 } 431 575 .lp_loading.lp_lightbox_in:before{top: 0;left: 0; border-radius: 20px;} 576 .lp_lazy_loading{position: relative; overflow: hidden; min-height: 30px; display: block; 577 background-color:rgb(233 233 233);border-radius: 10px;} 578 .lp_lazy_loading:before{ 579 background: linear-gradient(90deg, rgba(233, 233, 233,1) 0%, rgba(226,226,226,1) 25%, rgba(226,226,226,1) 75%, rgba(233, 233, 233,1) 100%); 580 content:""; 581 width: 100%; 582 height: 100%; 583 display: block; 584 position: absolute; 585 left: 0; 586 animation:preload_anim 1.5s ease-in-out 0s infinite normal none running; 587 top:0; 588 transform:translateX(-100%); 589 } 432 590 /* tooltip */ 433 591 .lp_elms{ position: absolute; z-index: 48392749832;pointer-events: none;} … … 511 669 512 670 form.lp_form .no_icon{padding-left: 30px;} 513 form .existing_tags{ 514 display: none; 515 left: 30px; 516 top: 28px; 517 z-index: 2; 518 background-color: #e8e8e8; 519 padding: 15px 10px; 520 border-radius: 15px; 521 min-width: 50%; 522 } 671 form .existing_tags{ min-width: 50%; } 523 672 form .form_tags_in{} 524 673 .lp_form .selected_tag{ … … 528 677 margin-right: 10px;line-height: 100%; font-size: 13px; 529 678 } 530 form .existing_tags{display: block;}531 679 form .existing_tags.dn{display: none;} 532 form .form_tags_in{display:inline-block;}533 680 form .existing_tags i{ 534 681 cursor: pointer; 535 padding: 7px 10px;682 padding: 5px 10px; 536 683 border-radius: 5px; 537 684 background-color: #f3f3f3; 538 margin-right: 5px; margin-bottom:5px;539 685 display:inline-block; font-style: normal; 540 686 } 687 form .existing_tags i.on{ box-shadow: 0px 0px 0px 2px #333;} 541 688 form .existing_tags i:hover{opacity: 0.7} 542 689 form.lp_form .tag_colors em{ … … 610 757 box-shadow: none; 611 758 border-radius: 30px; 612 padding: 10px 20px ;759 padding: 10px 20px 10px 50px; 613 760 font-size:18px; 614 761 background-color: #f2f2f2; … … 620 767 border:1px solid transparent; 621 768 } 622 body .lp_search_input input:focus{outline:none;border-color: var(--lp_border_color_1)} 769 body .lp_search_input input:focus{ 770 outline:none;border-color: var(--lp_color_1)} 623 771 .lp_search_input .lp_btn{ 624 right: 1 0px; top: 30px; margin-right: 0px625 } 626 .search_entry :hover{opacity: 1}772 right: 15px; top: 33px; margin-right: 0px 773 } 774 .search_entry .entry_date{background-color: transparent;padding: 0px;} 627 775 .search_entry{ 628 transition: all 0.3s;opacity: 0.6; 629 color:#808080; 776 color:var(--lp_color_1); 630 777 background-color: #f5f5f5; 631 778 margin-bottom: 10px; 632 779 padding: 10px 10px 5px; 633 780 border-radius: 10px;cursor: pointer;} 634 .search_entry .entry_date{margin-bottom: 5px;color: #808080;}781 .search_entry .entry_date{margin-bottom: 5px;color:var(--lp_color_1);} 635 782 .search_entry h3{padding: 0; 636 783 margin: 0; … … 659 806 .lp_weeks_grid .dot.past{border-color:#c7c7c7 } 660 807 .lp_weeks_grid .dot.before{opacity: 0.2; } 661 /* month view */808 /* month view & Lunisolar */ 662 809 .date_range .prev, .date_range .next{ 663 810 width: 30px; … … 672 819 } 673 820 .date_range .prev:hover, .date_range .next:hover{background-color: #808080;color:#fff;} 674 .lp_month_view .day_names .date_box{ 821 .lp_month_view .day_names .date_box, 822 .lp_moon_view .day_names .date_box 823 { 675 824 display: block; 676 825 float: left; … … 694 843 box-sizing: border-box; 695 844 } 696 .lp_month_view .day_names .date_box em{display:none;} 845 .lp_month_view .day_names .date_box em,.lp_moon_view .day_names .date_box em{display:none;} 846 .lp_moon_view .days .date_box, 697 847 .lp_month_view .days .date_box{ 698 848 display: block; … … 719 869 box-sizing: border-box; 720 870 } 721 .lp_month_view {flex-direction:column;}722 .lp_month_view .weeks {flex-direction:column; }723 .lp_month_view .week {871 .lp_month_view, .lp_moon_view{flex-direction:column;} 872 .lp_month_view .weeks, .lp_moon_view .weeks{flex-direction:column; } 873 .lp_month_view .week, .lp_moon_view .week{ 724 874 flex-direction:row; 725 875 } 726 .lp_month_view .week .day {876 .lp_month_view .week .day, .lp_moon_view .week .day{ 727 877 min-height: 120px; 728 878 /*flex:1 1 0%;*/ … … 736 886 width:calc(100%/7); 737 887 } 738 .lp_month_view .week .day:hover {background-color: #fbfbfb}739 .lp_month_view .day_top {888 .lp_month_view .week .day:hover,.lp_moon_view .week .day:hover{background-color: #fbfbfb} 889 .lp_month_view .day_top, .lp_moon_view .day_top{ 740 890 display: block; 741 891 padding: 0px 0 5px; … … 744 894 font-family: var(--lp_font_1); 745 895 } 746 .lp_month_view .lp_entry_item {896 .lp_month_view .lp_entry_item, .lp_moon_view .lp_entry_item{ 747 897 border-radius: 5px; 748 898 padding: 4px 6px 6px; … … 753 903 flex: 0 1 auto; 754 904 } 755 .lp_month_view .lp_entry_in{ /*overflow: hidden;*/text-align: left} 905 .lp_month_view .lp_entry_in, 906 .lp_moon_view .lp_entry_in 907 { /*overflow: hidden;*/text-align: left} 756 908 .lp_month_view .day.past{background-color: var(--bgc_past)} 757 909 .lp_month_view .day.prev{background-color: var(--bgc_prev)} 758 910 .lp_month_view .day.next{background-color: var(--bgc_next)} 759 .lp_month_view .day.today,.lp_month_view .day.today.focus_mo{background-color: var(--bgc_focus)} 911 .lp_moon_view .day.today, 912 .lp_month_view .day.today, 913 .lp_month_view .day.today.focus_mo{background-color: var(--bgc_focus)} 760 914 .lp_month_view .day.focus_mo{background-color: #ffffff} 761 .lp_month_view .list_entries{ 915 .lp_month_view .list_entries, 916 .lp_moon_view .list_entries{ 762 917 display: flex; 763 918 flex-wrap: wrap; 764 919 align-content: flex-start; 765 920 } 921 /* lunar month */ 922 .lp_moon_view .week .day{display: flex;flex-direction: column;} 923 .lp_moon_view .lunar_new_month{display: block;} 924 .lp_moon_view .lunar_otherday{ opacity: 0.5;} 925 .lp_moon_view .lunarday{ margin-right: 3px;} 926 .lp_moon_view .day_top{ display: flex; justify-content: space-between; } 927 .lp_moon_view .lunar_reg_day{ opacity: 0.5; display:flex; gap:3px;} 928 .lp_moon_view .lunar_top{ display:flex; } 929 .lp_moon_view .lunarday.lp_moon{ margin: 0 5px 0 0; height: 13px; width: 13px; text-indent: -9999px;} 930 .lp_moon_view .day.full{background-color: #f5f5f5;} 931 .lp_moon_view .day.new{ background-color: #f8f8f8;} 932 .lp_moon_view .day.newMonth{ border-left: 3px solid var(--lp_color_blue);} 766 933 767 934 /* list view */ … … 822 989 .lp_week_view .week_col .day_name em, 823 990 .lp_list_view .list_row .date em, 824 .lp_month_view .week .day_top em 991 .lp_month_view .week .day_top em, 992 .lp_moon_view .week .day_top em 825 993 {display:none; font-style: normal;} 826 994 .lp_week_view .lp_entry_item{ … … 855 1023 .lp_lb_single_entry .entry_footer b{margin: 0 10px 0 0;} 856 1024 1025 /* metrics */ 1026 .lppmss{ 1027 border-radius: 10px; 1028 margin-bottom: 15px; 1029 border: 1px solid #c5c5c5; 1030 } 1031 .lpps{ 1032 padding: 10px 15px;margin:0; 1033 border-bottom: 1px solid #c5c5c5 1034 } 1035 .lpps:last-child{border:none;} 1036 .lpps p.lpps_{cursor: pointer;margin:0;padding:0;} 1037 .lpps p.lpps_.select{} 1038 .lpps p.lpps_:hover{ opacity: 0.7} 1039 .lpps .lppsf{display: none; padding:15px 0 0;} 1040 .lpps.select .lppsf{display: flex;gap:20px;flex-wrap: wrap;} 1041 1042 .lp_week_view .lp_entry_item .lpp_ti{margin:0 0px 0 0px;} 1043 .lp_week_view .lp_entry_item .lpp_metrics{font-size: 11px;} 1044 .lp_list_view .list_row .lp_entry_item .lpp_metrics{display: inline-block; margin:0;padding:0 0 0 10px;} 1045 1046 .lp_entry_item .lpp_metrics, 1047 .lp_entry_item.notitle .lp_entry_in > .lpp_metrics ~ .lpp_metrics 1048 {display: block;border-top: 1px solid #ffffff4a; margin-top: 5px; padding-top: 5px;} 1049 .lp_entry_item.notitle .lp_entry_in > .lpp_metrics {border:none; padding-top: 0; margin-top: 0} 1050 1051 .lppsf .lpps_check{cursor: pointer; 1052 background-color: #ddfaff; 1053 border-radius: 10px; 1054 padding: 5px 15px; 1055 box-sizing: border-box; 1056 } 1057 .lppsf .lpps_check:hover{opacity: 0.7} 1058 .lppsf .lpps_check svg{margin-top:0;font-size: 24px;} 1059 1060 .lppsf .lp_metrics_box.lpps_select{flex-direction: column;gap:5px; align-items: flex-start;} 1061 .lppsf .lpps_select .lpps_selectable{ 1062 padding: 8px 10px; 1063 display: inline-block; 1064 background-color: #e3edec; 1065 border-radius: 10px; 1066 margin: 0 5px 5px 0; 1067 cursor: pointer; 1068 } 1069 .lppsf .lpps_select .lpps_selectable:hover{opacity: 0.7} 1070 .lppsf .lpps_select .lpps_selectable.select{ background-color: #c5c5c5; color: #fff;} 1071 .lppsf{} 1072 .lppsf .lp_metrics_box{ 1073 min-width: 200px; 1074 margin: 0; 1075 display: flex; 1076 align-items: center; 1077 flex: 1; 1078 } 1079 857 1080 /* footer notices */ 858 1081 .footer_notices{ … … 889 1112 @media (max-width: 1000px){ 890 1113 .lp_lightbox_in{width: 90%} 891 .lp_month_view .list_entries {overflow:hidden;}892 .lp_month_view .lp_entry_in {overflow:hidden;}893 .lp_month_view .lp_entry_item {1114 .lp_month_view .list_entries, .lp_moon_view .list_entries{overflow:hidden;} 1115 .lp_month_view .lp_entry_in, .lp_moon_view .lp_entry_in{overflow:hidden;} 1116 .lp_month_view .lp_entry_item, .lp_moon_view .lp_entry_item{ 894 1117 height: 16px;padding: 2px 5px 3px; 895 1118 margin-right: 0px;width: 100%; … … 901 1124 .lp_range_title{font-size: 18px;} 902 1125 .lp_topbar .lifepress_title{display:none;} 1126 1127 .lp_moon_view .lunar_new_month 1128 {display: none;} 903 1129 } 904 1130 @media (max-width: 500px){ 905 1131 .lp_topbar{height:auto; padding:0;} 1132 .header_right{padding: 4px 0;} 906 1133 907 1134 .top_right{width: 100%;align-content: center; flex-direction: column;} … … 939 1166 .lp_month_view .day_names .date_box span 940 1167 {display:none;} 1168 1169 .lp_moon_view .lunar_otherday 1170 {display: none;} 1171 .lp_moon_view .lunar_miniday{display: block;} 941 1172 942 1173 .lp_month_view .week .day_top em, -
lifepress/trunk/assets/script.js
r3244643 r3428394 1 1 /** 2 2 * JS 3 * @version 2. 1.33 * @version 2.2 4 4 */ 5 5 jQuery(document).ready(function($){ … … 20 20 DD = LIFEPRESS_DATA = false; // other data 21 21 var TAGS_DATA = {}; // tags data 22 var FOOTER_DATA = {}; // footer data 22 23 _TEMP_DATA = {} // ajax loaded temp data 23 24 VIEW = 'week_view'; … … 59 60 //154,759,680,0000 --php 1547596800 60 61 //1547625600 - 154762560 62 const LUNAR_CYCLE_MS = 29.530588853 * 86400000; 63 var LUNAR_DATA = {}; // all lunar data phases, moon index. 64 var LUNAR_REF = {}; // lunar month index ref 65 var LUNAR_NOW = {}; // current lunar cycle data 61 66 62 67 // UTC … … 87 92 var defaults = { 88 93 'd':{}, 94 footer:{}, 89 95 'entry':{}, 90 96 'temp':{}, … … 105 111 106 112 range_title(); 107 interaction() 113 interaction(); 114 footer(); 108 115 109 116 } … … 111 118 var range_title = function(){ 112 119 if(!('mo_names' in dash.O.d)) return false; 113 114 txt = dash.O.d.mo_names[ FOCUS.getMonth() ]+' '+FOCUS.getFullYear();115 el.find('.lp_range_title').html(txt);116 120 } 117 121 … … 129 133 var inp = $(this).siblings('input'); 130 134 AJAXDATA['s'] = inp.val(); 135 AJAXDATA['nonce'] = lp_ajax.lp_nonce; 131 136 132 137 $.ajax({ … … 188 193 } 189 194 195 var footer = function(e){ 196 if( dash.O.footer ){ 197 BODY.find('.lp_footer').html( dash.O.footer ); 198 __draw_footer(); 199 } 200 } 201 190 202 init(); 191 203 } … … 203 215 AJAXDATA['sM'] = DS.getMonth(); 204 216 AJAXDATA['sY'] = DS.getFullYear(); 205 206 217 AJAXDATA['nonce'] = lp_ajax.lp_nonce; 207 218 208 219 $.ajax({ … … 216 227 TEMP = data.temp; 217 228 TAGS_DATA = data.tags; 229 FOOTER_DATA = data.footer_data; 218 230 DD = data.d; 219 231 … … 222 234 LOADED_date_range['s'] = parseInt(data.d.start_u)*1000; 223 235 LOADED_date_range['e'] = parseInt(data.d.end_u)*1000; 236 237 if( 'lunar_data' in data.d){ 238 LUNAR_DATA = data.d.lunar_data; 239 update_lunar_ref( data.d.lunar_data.ref ); 240 LUNAR_NOW = {'s': data.d.lunar_data.start, 'e': data.d.lunar_data.end}; 241 } 242 224 243 225 244 modify_range_start(); … … 233 252 234 253 _draw_entries(); 235 __draw_tags(); 254 __draw_tags(); 255 mod_range_title(); 236 256 237 257 $('body').lp_dash({ 238 258 d: data.d, 239 entry: data.entry 259 entry: data.entry, 260 footer: data.footer, 240 261 }); 241 262 } … … 290 311 291 312 } 313 if(VIEW == 'moon_view' ){ 314 //const LUNAR_CYCLE_MS = 29.530588853 * 86400000; 315 316 // initialize focus on first load 317 if (!FOCUS) FOCUS = new Date(parseInt(LUNAR_DATA.start) * 1000); 318 319 DS = new Date( parseInt( LUNAR_DATA.start ) * 1000 ); 320 DE = new Date( parseInt( LUNAR_DATA.end ) * 1000 ); 321 322 if( direction == 'today'){ 323 DS = new Date( parseInt( LUNAR_NOW.s ) * 1000 ); 324 DE = new Date( parseInt( LUNAR_NOW.e ) * 1000 ); 325 } 326 327 // move focus by ONE lunar cycle 328 if (direction === 'next'){ 329 330 DE.setDate( DE.getDate() + 1 ); 331 const nextRange = LUNAR_REF[ DE.getFullYear()+'-'+ (DE.getMonth()+1) +'-'+ DE.getDate() ]; 332 333 if( nextRange[0] && nextRange[1]){ 334 LUNAR_DATA.start = nextRange[0]; 335 LUNAR_DATA.end = nextRange[1]; 336 DS = new Date( parseInt( nextRange[0] ) * 1000 ); 337 DE = new Date( parseInt( nextRange[1] ) * 1000 ); 338 }else{ 339 DS = new Date( DS.getTime() + LUNAR_CYCLE_MS - 1000 ); 340 DE = new Date( DE.getTime() + LUNAR_CYCLE_MS - 1000 ); 341 } 342 } 343 if (direction === 'prev'){ 344 345 const currentDate = DS.getFullYear()+'-'+ (DS.getMonth()+1) +'-'+ DS.getDate(); 346 //console.log('CUR '+currentDate); 347 //console.log(LUNAR_REF); 348 349 const keys = Object.keys(LUNAR_REF); 350 keys.sort((a, b) => new Date(a) - new Date(b)); 351 352 const index = keys.indexOf(currentDate); 353 const prevKey = index > 0 ? keys[index - 1] : null; 354 const prevItem = prevKey ? LUNAR_REF[prevKey] : null; 355 //console.log('PREV '+ prevItem); 356 if( prevItem[0] && prevItem[1]){ 357 LUNAR_DATA.start = prevItem[0]; 358 LUNAR_DATA.end = prevItem[1]; 359 DS = new Date( parseInt( prevItem[0] ) * 1000 ); 360 DE = new Date( parseInt( prevItem[1] ) * 1000 ); 361 //console.log('NEW C '+ DS.getFullYear()+'-'+ (DS.getMonth()+1) +'-'+ DS.getDate() ); 362 }else{ 363 DS = new Date( DS.getTime() - LUNAR_CYCLE_MS - 1000 ); 364 DE = new Date( DE.getTime() - LUNAR_CYCLE_MS - 1000 ); 365 } 366 } 367 368 } 292 369 if(VIEW == 'week_view' ){ 293 370 … … 305 382 306 383 } 384 385 mod_range_title(); 307 386 } 308 387 … … 349 428 350 429 // do translative month name 351 txt = DD.mo_names[ FOCUS.getMonth() ]+' '+FOCUS.getFullYear(); 430 var txt = DD.mo_names[ FOCUS.getMonth() ]+' '+FOCUS.getFullYear(); 431 //console.log(txt); 432 433 if(VIEW == 'moon_view' ){ 434 txt = LUNAR_DATA.moon_title ; 435 var currentMoonRef = ''; 436 437 currentMoonRef = LUNAR_REF[ DS.getFullYear()+'-'+ (DS.getMonth()+1) +'-'+ DS.getDate() ]; 438 //console.log('TITLE'+currentMoonRef); 439 440 txt = currentMoonRef[2]; 441 442 } 352 443 BODY.find('.lp_range_title').html(txt); 353 354 444 } 355 445 356 446 // draw the entries view on body 357 447 function get_temp_processed_html(temp_type, data){ 448 //console.log(TEMP); 449 //console.log(temp_type); 450 //console.log(data); 358 451 template = Handlebars.compile( TEMP[temp_type]); 359 452 return template( data ); … … 523 616 } 524 617 618 // Moon View 619 if(VIEW == 'moon_view'){ 620 621 tempDATA['weeks'] = {}; 622 var box_count = 0; 623 _week = 0; 624 lunarday = 1; 625 626 //console.log( DS); 627 //console.log( DE); 628 var lunar_sow = DS.getDay(); 629 630 631 // EACH DAY 632 for( var d = new Date( DS.getFullYear() , DS.getMonth() , DS.getDate()) ; 633 d.getTime() <= DE.getTime(); 634 d.setDate( d.getDate() +1) 635 ){ 636 637 if( lunar_sow > 6) lunar_sow = 0; 638 var day_of_week = DD.day_names[ lunar_sow ]; 639 var daybox_classes = []; 640 641 i = box_count; 642 643 // week 644 if( box_count % 7 == 0 ){ 645 _week++; 646 tempDATA.weeks[ _week] = {}; 647 tempDATA.weeks[ _week]['days'] = {}; 648 } 649 650 var month_start_html = ''; 651 var attr = ''; 652 if( d.getDate() == 1){ 653 month_start_html = `<span class='lunar_new_month'>${ DD.mo_names[ (d.getMonth() ) ]}</span>`; 654 } 655 656 var moon_occasions = ''; 657 if( lunarday == 1 ) { 658 moon_occasions = 'lp_moon new lp_tooltip'; 659 daybox_classes.push('new'); 660 attr = `title="${LUNAR_DATA.phases_plus[0]['time']}"`; 661 } 662 if( LUNAR_DATA && LUNAR_DATA.phases.first_quarter == d.getFullYear() +'-'+ ( d.getMonth()+1) +'-'+ d.getDate()){ 663 moon_occasions = 'lp_moon first-quarter'; 664 daybox_classes.push('first-quarter'); 665 } 666 if( LUNAR_DATA && LUNAR_DATA.phases.full_moon == d.getFullYear() +'-'+ ( d.getMonth()+1) +'-'+ d.getDate()) { 667 moon_occasions = 'lp_moon full lp_tooltip'; 668 daybox_classes.push('full'); 669 attr = `title="${LUNAR_DATA.phases_plus[4]['time']}"`; 670 } 671 if( LUNAR_DATA && LUNAR_DATA.phases.last_quarter == d.getFullYear() +'-'+ ( d.getMonth()+1) +'-'+ d.getDate()) { 672 moon_occasions = 'lp_moon last-quarter'; 673 } 674 if( LUNAR_DATA && LUNAR_DATA.phases.next_new_moon == d.getFullYear() +'-'+ ( d.getMonth()+1) +'-'+ d.getDate()) { 675 moon_occasions = 'lp_moon new'; 676 } 677 678 // new month 679 if( d.getDate() == 1 ) daybox_classes.push('newMonth'); 680 const lunar_day_html = `<spam class='lunarday ${moon_occasions}' ${attr}>${lunarday}</spam>`; 681 682 683 tempDATA.weeks[_week].days[i] = {}; 684 tempDATA.weeks[_week].days[i]['lunarday'] = lunarday; 685 tempDATA.weeks[_week].days[i]['time'] = d.getTime()/1000; 686 tempDATA.weeks[_week].days[i]['this_date'] = `<span class='lunar_top'>${lunar_day_html}<span class='lunar_reg_day'>${d.getDate()} <span class='lunar_otherday ${lunar_sow}'>${day_of_week.s}</span> 687 <span class='lunar_miniday lpdn'>${day_of_week.m}</span> 688 </span> 689 </span>${month_start_html}`; 690 691 thisD_SU = Math.floor(d.getTime()/1000); 692 thisD_EU = thisD_SU + 86400; // day ending unix 693 694 695 // start of week 696 if( NOW.getDate() == d.getDate() && NOW.getMonth() == d.getMonth() && NOW.getFullYear() == d.getFullYear() ) tempDATA.weeks[_week].days[i]['today'] = true ; 697 if(NOW.getTime() > d.getTime()) tempDATA.weeks[_week].days[i]['past'] = true ; 698 if(FOCUS.getMonth() == d.getMonth()) tempDATA.weeks[_week].days[i]['focus_mo'] = true ; 699 700 // previous and next month 701 if( FOCUS.getMonth() != d.getMonth() ) { 702 if( d.getMonth() > FOCUS.getMonth() ) 703 tempDATA.weeks[_week].days[i]['next'] = true ; 704 705 if( d.getMonth() < FOCUS.getMonth() ) 706 tempDATA.weeks[_week].days[i]['prev'] = true ; 707 } 708 709 // entries 710 if(EN && typeof EN === 'object' ){ 711 tempDATA.weeks[_week].days[i]['entries'] = {}; 712 $.each(EN, function(ind,val){ 713 if( val === undefined) return; 714 if(val.time >= thisD_SU && val.time < thisD_EU){ 715 tempDATA.weeks[_week].days[i].entries[ind] = __populate_with_tag_data(val); 716 } 717 }); 718 } 719 720 // day box classes 721 tempDATA.weeks[_week].days[i]['classes'] = daybox_classes.join(' '); 722 723 box_count++; 724 lunarday++; 725 lunar_sow++; 726 } 727 728 } 729 525 730 //console.log( tempDATA); 526 731 BODY.trigger('populate_tempDATA',[tempDATA]); … … 528 733 _html = get_temp_processed_html(VIEW, tempDATA); 529 734 530 BODY.find('.lp_body_view_content').html( _html ); 735 BODY.find('.lp_body_view_content').html( _html ); 736 531 737 } 532 738 … … 540 746 _html = get_temp_processed_html('tags_view', tempDATA); 541 747 BODY.find('.lp_tags').html( _html ); 748 } 749 750 function __draw_footer(){ 751 //console.log(FOOTER_DATA); 752 753 _html = get_temp_processed_html('footer_left', FOOTER_DATA); 754 _htmlR = get_temp_processed_html('footer_right', FOOTER_DATA); 755 BODY.find('.lp_footer_left').html( _html ); 756 BODY.find('.lp_footer_right').html( _htmlR ); 757 } 758 759 // LUNAR Functions 760 function update_lunar_ref(REF_DATA){ 761 console.log('REF UPDATE'); 762 $.each( REF_DATA , function(index, val){ 763 LUNAR_REF[ index ] = val; 764 }); 542 765 } 543 766 … … 551 774 552 775 // Click interactions 776 const LP_Actions = { 777 E:{ 778 BB: $('body'), 779 }, 780 init(){ 781 const { E } = this; 782 // bind events 783 E.BB.on('get_temp_data', (e, data) => this.handle_get_temp_data(e, data) ); 784 785 // metrics 786 E.BB.on('click','.lpps_',function(){ 787 const box = $(this).parent(); 788 box.toggleClass("select"); 789 }); 790 // select a check field 791 E.BB.on('click','.lpps_check',function(){ 792 const $el = $(this); 793 $el.toggleClass('uncheck'); 794 $el.find('svg').toggleClass('fa-circle fa-circle-check'); 795 $el.find('input').val( $el.hasClass('uncheck') ? '':'y' ); 796 }); 797 798 // select selectable field 799 E.BB.on('click','.lpps_selectable',function(){ 800 const $el = $(this); 801 const type = $el.closest('.lpps_select').hasClass('single') ? 'single':'multi'; 802 803 if( type == 'single'){ 804 $el.siblings('span').removeClass('select'); 805 $el.addClass('select'); 806 }else{ 807 $el.toggleClass('select'); 808 } 809 810 var value = []; 811 $el.parent().find('span.select').each(function(){ 812 value.push( $(this).data('val') ); 813 }); 814 815 $el.siblings('input').val( value.join(', ') ); 816 }); 817 818 }, 819 handle_get_temp_data(e, data){ 820 var AJAXDATA = {} 821 AJAXDATA['action'] = 'lp_load_temp_content'; 822 AJAXDATA['d'] = data; 823 AJAXDATA['nonce'] = lp_ajax.lp_nonce; 824 825 $.ajax({ 826 beforeSend: function(){ }, 827 type: 'POST',url:lp_ajax.ajaxurl,data: AJAXDATA,dataType:'json', 828 success:function(data){ 829 if(data.status == 'good'){ 830 _TEMP_DATA = data.content; 831 } 832 },complete:function(){ } 833 }); 834 } 835 } 836 LP_Actions.init(); 837 553 838 BODY 554 839 // others 555 .on('get_temp_data',function(e,data){556 var AJAXDATA = {}557 AJAXDATA['action'] = 'lp_load_temp_content';558 AJAXDATA['d'] = data;559 560 $.ajax({561 beforeSend: function(){ },562 type: 'POST',url:lp_ajax.ajaxurl,data: AJAXDATA,dataType:'json',563 success:function(data){564 if(data.status == 'good'){565 _TEMP_DATA = data.content;566 }567 },complete:function(){ }568 });569 })570 840 .on('click','.lp_trig_action',function(event, other_data){ 571 841 O = $(this); 572 842 d = O.data('d'); 573 843 844 // select a month 845 if(d.type == 'lb_temp' && d.temp_key == 'month_select_view' && VIEW == 'moon_view') { 846 console.log('Moon View does not support month selecting'); 847 return; 848 } 849 850 574 851 //console.log(d); 575 852 … … 592 869 d['tags'] = {}; 593 870 d.tags = TAGS_DATA; 594 871 872 595 873 //console.log(d); 596 874 … … 602 880 _content = get_temp_processed_html(d.temp_key, d ); 603 881 BODY.find('.lp_lb_content').html( _content ); 882 883 // if search 884 if( d.temp_key == 'search_view'){ 885 setTimeout( () => { BODY.find('.lp_search_inputfield').focus();},500 ); 886 } 604 887 605 888 // for entry form process text editor … … 713 996 714 997 // click on entry items from anywhere 715 .on('click','.lp_entry_item',function(){ 998 .on('click','.lp_entry_item',function(e){ 999 e.preventDefault(); e.stopPropagation(); 716 1000 717 1001 entry_id = $(this).data('id'); … … 769 1053 }) 770 1054 771 // when navigated to new date ranges 1055 // when navigated to new date ranges -- month arrow click 772 1056 .on('click','.lp_view_change',function(){ 773 1057 … … 779 1063 780 1064 // click on a month date box 781 .on('click','.lp_month_view .day ',function(event){1065 .on('click','.lp_month_view .day, .lp_moon_view .day',function(event){ 782 1066 event.stopImmediatePropagation(); 783 1067 //console.log($(event.target).attr('class')); … … 894 1178 895 1179 AJAXDATA['start_u'] = DS.getTime(); 896 AJAXDATA['end_u'] = DE.getTime(); 1180 AJAXDATA['end_u'] = DE.getTime(); 1181 AJAXDATA['nonce'] = lp_ajax.lp_nonce; 897 1182 898 1183 // console.log( LOADED_date_range.s+' '+ AJAXDATA.start_u); … … 909 1194 $.ajax({ 910 1195 beforeSend: function(){ 911 //_draw_entries(); // draw the grids before entried populated 912 mod_range_title(); 1196 //_draw_entries(); // draw the grids before entried populated 913 1197 BODY.find('.lp_body_view_content').addClass('lp_loading'); 914 1198 }, … … 925 1209 LOADED_date_range['e'] = (LOADED_date_range.e >= data.end_u? LOADED_date_range.e :data.end_u); 926 1210 1211 if( 'lunar_data' in data.d){ 1212 LUNAR_DATA = data.d.lunar_data; 1213 update_lunar_ref( data.d.lunar_data.ref ); 1214 } 1215 1216 modify_range_start(); 927 1217 _draw_entries(); 1218 mod_range_title(); 928 1219 929 1220 },complete:function(){ … … 1060 1351 FOCUS.setFullYear( NOW.getFullYear() ); 1061 1352 1062 modify_range_start( );1353 modify_range_start('today'); 1063 1354 1064 1355 _load_new_entry_content_after_set(); … … 1089 1380 1090 1381 BODY.on('click','.lp_entry_tag',function(){ 1091 O = $(this); 1092 term = O.html(); 1093 term_id = O.data('id'); 1094 c = O.data('c'); 1095 1382 const O = $(this); 1383 const term = O.html(); 1384 const term_id = O.data('id'); 1385 const c = O.data('c'); 1386 1387 O.addClass('on').siblings('i').removeClass('on'); 1096 1388 O.closest('form').find('input[name=tag]').val(term); 1097 1389 O.closest('form').find('input[name=tag_id]').val(term_id); 1098 1390 O.closest('form').find('input[name=tag_color]').val(c); 1099 1391 O.closest('.lp_entry_tags').find('.selected_tag').html(term).css('background-color', c); 1100 1101 O.parent().parent().addClass('dn');1102 1392 1103 1393 }) … … 1110 1400 row.find('input').val( $(this).data('id') ); 1111 1401 }); 1112 BODY.on('click','.create_new_tag_btn',function(){ 1113 O = $(this); 1114 1115 // select existing 1116 if(O.siblings('.lp_tag_new').is(':visible')){ 1117 O.siblings('.selected_tag').show(); 1118 O.siblings('.lp_tag_new').addClass('dn'); 1119 // create new 1120 }else{ 1121 O.siblings('.selected_tag').hide(); 1122 O.siblings('.existing_tags').addClass('dn'); 1123 O.siblings('.lp_tag_new').removeClass('dn'); 1124 } 1402 BODY.on('click','.create_new_tag_btn',function(){ 1403 $(this).closest('.lp_post_tags_content').find('.lp_tag_new').toggleClass('dn'); 1404 }) 1405 // adding new tag to list and selecting it 1406 .on('click','.add_new_tag_btn',function(){ 1407 const O = $(this); 1408 const $box = O.closest('.lp_post_tags_content'); 1409 const $form = $box.find('.lp_tag_new'); 1410 const color = $form.find('.newtag_c').val(); 1411 1412 const html = `<i class='lp_tag_added_new lp_entry_tag lpfz12 on' data-id='new' style='background-color:#${color}' data-c='#${color}'>${$form.find('.tags').val()}</i>`; 1413 1414 $box.find('.form_tags_in').append( html ); 1415 $box.find('.lp_tag_added_new').trigger('click'); 1416 // reset form 1417 $form.find('.tags').val(''); 1418 $form.find('.lp1.lp_new_tag_color').trigger('click');// close new tag form 1419 $form.addClass('dn'); 1125 1420 }) 1126 1421 .on('click','.lp_new_tag_color',function(){ … … 1239 1534 //console.log(v1); 1240 1535 return ''; 1536 }); 1537 Handlebars.registerHelper('tagSelect',function(v1, v2, options){ 1538 1539 return v1 == v2 ? 'on':'off'; 1241 1540 }); 1242 1541 -
lifepress/trunk/includes/admin/class-admin.php
r3244643 r3428394 2 2 /** 3 3 * Admin Section 4 * @versino 2. 1.34 * @versino 2.2 5 5 */ 6 6 … … 34 34 35 35 public function admin_styles(){ 36 wp_register_script('fontawesome_solid', LIFEPRESS_URL. '/assets/libs/fontawesome/solid.js', array(),LIFEPRESS()->version,true ); 37 wp_register_script('fontawesome_fa', LIFEPRESS_URL. '/assets/libs/fontawesome/fontawesome.js', array(),LIFEPRESS()->version,true ); 38 wp_register_script('fontawesome', LIFEPRESS_URL. '/assets/libs/fontawesome/all.js', array(),LIFEPRESS()->version,true ); 39 40 wp_enqueue_script('fontawesome_solid'); 41 wp_enqueue_script('fontawesome_fa'); 36 42 wp_enqueue_style('admin', LIFEPRESS_URL. '/assets/admin.css','',LIFEPRESS()->version ); 37 43 wp_enqueue_script('lifepress_admin', LIFEPRESS_URL. '/assets/admin.js',array('jquery', 'jquery-ui-sortable'),LIFEPRESS()->version , true); 44 wp_localize_script('lifepress_admin', 'lifepress_vars', 45 [ 46 'url' => admin_url('admin-ajax.php'), 47 'nonce' => wp_create_nonce('lp_ajax_nonce') 48 ] 49 ); 38 50 do_action('lifepress_admin_styles'); 39 40 51 } 41 52 … … 56 67 ?> 57 68 69 <div id='lp_lightboxes'></div> 58 70 <div id='lifepress_settings' style=''> 59 71 … … 79 91 ), 80 92 array( 81 'type'=>' select',93 'type'=>'yesno', 82 94 'label'=> __('Add a home page link to top header in dashboard'), 83 95 'name'=>'_homelink', 84 'options'=> array( 85 'no'=> __('No','lp'), 86 'yes'=> __('Yes','lp'), 87 ), 96 ), 97 array( 98 'type'=>'yesno', 99 'label'=> __('Show moon and sun information'), 100 'name'=>'_moonsun', 101 'tooltip'=> __('Display moon and sun information in the footer'), 102 ),array( 103 'type'=>'yesno', 104 'label'=> __('Enable Moon Month View [Beta]'), 105 'name'=>'_moonview', 106 'tooltip'=> __('Allow calendar to show as moon month view'), 88 107 ), 89 108 array( … … 93 112 'week_view'=> __('Week View','lp'), 94 113 'month_view'=> __('Month View','lp'), 114 'moon_view'=> __('Moon Month View (If enabled)','lp'), 95 115 )), 96 116 'default'=>'Week View', … … 127 147 'default'=>'5', 128 148 'name'=>'_years_count', 129 ) 149 ), 150 array( 151 'type'=>'custom1', 152 'label'=> __('Configure Data Metrics'), 153 'name'=>'_datametrics', 154 'tooltip'=> __('Add measurable data types for each entry') 155 ), 130 156 )); 131 157 132 133 158 do_action('lifepress_admin_settings_end'); 134 135 159 ?> 136 137 160 <div class='lp_settings_row'> 138 161 <p class='submit'> … … 163 186 164 187 switch( $type){ 188 case 'custom1': 189 ?> 190 <p> 191 <span class='lpdfx lpfxdrc' style='flex-basis: 50%'> 192 <label><?php echo $label;?></label> 193 <?php if( !empty($tooltip) ) echo "<span class='lpop7'>{$tooltip}</span>"; ?> 194 </span> 195 <button class='lp_trig_datametric_trig button button-primary' data-action='lp_get_metric_init'><?php _e('Configure');?></button> 196 </p> 197 <?php 198 break; 165 199 case 'notice': 166 200 ?> 167 201 <p><?php echo $content;?></p> 202 <?php 203 break; 204 case 'yesno': 205 $value = $value == 'yes'? 'yes':'no'; 206 ?> 207 <p> 208 <span class='lpdfx lpfxdrc' style="flex-basis: 50%;"> 209 <label><?php echo esc_html( $label );?></label> 210 <?php if( !empty($tooltip) ) echo "<span class='lpop7'>{$tooltip}</span>"; ?> 211 </span> 212 <span> 213 <input type="hidden" name='<?php echo $name;?>' value='<?php echo $value;?>'> 214 <svg class="lp_toggle toggle-svg <?php echo $value == 'yes'? 'on':'';?>" viewBox="0 0 550 500" width="50" height="34"> 215 <!-- Background pill --> 216 <rect class="track" x="8" y="90" width="600" height="330" rx="170" fill="#333"></rect> 217 <circle class="knob" cx="180" cy="256" r="112" fill="white"/> 218 </svg> 219 </span> 220 </p> 168 221 <?php 169 222 break; … … 186 239 echo "<option {$S} value='". esc_html( $F )."'>". esc_html( $V )."</option>"; 187 240 } 188 189 241 ?> 190 242 </select> … … 223 275 return ob_get_clean(); 224 276 } 277 225 278 226 279 function save_settings(){ -
lifepress/trunk/includes/class-ajax.php
r3229860 r3428394 5 5 */ 6 6 7 8 7 9 class LIFEPRESS_AJAX{ 8 10 public $SOW; … … 17 19 18 20 $ajax_events = array( 19 'init_load' =>'init_load',20 'load_temp_content' =>'load_temp_content',21 'load_entries' =>'load_entries',22 'get_item_data' =>'get_item_data',23 'form_submit' =>'form_submit',24 'delete_item' =>'delete_item',25 'search_entries' =>'search_entries',26 'load_months' =>'load_months',21 'init_load' =>'init_load', 22 'load_temp_content' =>'load_temp_content', 23 'load_entries' =>'load_entries', 24 'get_item_data' =>'get_item_data', 25 'form_submit' =>'form_submit', 26 'delete_item' =>'delete_item', 27 'search_entries' =>'search_entries', 28 'load_months' =>'load_months', 27 29 ); 28 30 foreach ( $ajax_events as $ajax_event => $class ) { … … 56 58 57 59 // initial load data and templates 58 function init_load(){ 60 public function init_load(){ 61 62 check_ajax_referer('lp_nonce_key', 'nonce'); 59 63 60 64 global $current_user; 61 62 65 if(!empty($current_user)) $this->user_id = $current_user->ID; 66 $settings = new LIFEPRESS_Settings(); 67 68 $view = sanitize_text_field( $_POST['view']); 63 69 64 70 $J = array(); … … 89 95 $DD->setDate($sY,$sM ,1)->setTime( 0,0,0); 90 96 $sD = $DD->format('d'); 91 92 97 93 98 $startDate = clone $DD; … … 107 112 108 113 // end of month 109 $DD->modify( 'last day of this month' ) 110 ->setTime(23, 59, 59); 111 114 $DD->modify( 'last day of this month' )->setTime(23, 59, 59); 112 115 $end_range = $DD->format('U'); 113 116 … … 122 125 } 123 126 124 127 // lunisolar inclusion 128 $LUN = LIFEPRESS()->lunisolar; 129 $LUN->set_time(); 130 $LUNDATA = $LUN->get_moon_data(); 131 132 if( $settings->check_yn('_moonview')){ 133 134 135 $startDate->setTimestamp( $LUNDATA['start'] ); 136 $DD->setTimestamp( $LUNDATA['end'] ); 137 138 $date_range = apply_filters('lifepress_ajax_date_range', [$startDate, $DD]); 139 140 141 // lunar data 142 $J['d']['lunar_data'] = $LUNDATA; 143 /* 144 [ 145 'index' => $LUNDATA['moon_index'], 146 'lun_date' => $startDate->format('Y-m-d'), 147 'lun_start_u' => $startDate->format('U'), 148 'lun_end_u' => $DD->format('U'), 149 'lun_end_date' => $DD->format('Y-m-d'), // for debug 150 'lun_sow' => $startDate->format('w'), 151 'lun_moonth' => __('Moon','lp'). ' '. $LUNDATA['moon_index'], 152 'lun_phases' => $LUNDATA['phases'], 153 'ref' => $LUNDATA['ref'], 154 'moons_in_year' => $LUNDATA['moons_in_year'], 155 ]; 156 */ 157 158 }else{ 159 $date_range = apply_filters('lifepress_ajax_date_range', [$startDate, $DD]); 160 } 161 125 162 $ENT = new LIFEPRESS_Entries(); 126 163 127 $J['entry'] = $ENT->get_entries( $start_range, $end_range); 164 $J['entry'] = $ENT->get_entries( 165 $date_range[0]->format('U'), 166 $date_range[1]->format('U') 167 ); 128 168 $J['temp'] = array( 129 169 'week_view'=>LIFEPRESS()->temp->get('week_view'), … … 138 178 'search_res_view'=>LIFEPRESS()->temp->get('search_res_view'), 139 179 'month_select_view'=>LIFEPRESS()->temp->get('month_select_view'), 180 'footer_left'=>LIFEPRESS()->temp->get('footer_left'), 181 'footer_right'=>LIFEPRESS()->temp->get('footer_right'), 140 182 ); 141 183 142 184 $J['d']['start_u'] = $start_range; 143 185 $J['d']['end_u'] = $end_range; 186 144 187 145 188 // day names 146 189 $J['d']['day_names'] = 147 190 array( 148 0=> array('f'=> __('Sunday','lp'), 's'=> __('Sun','lp') ,'i'=>0 ),149 array('f'=> __('Monday','lp'), 's'=> __('Mon','lp') ,'i'=>1 ),150 array('f'=> __('Tuesday','lp'), 's'=> __('Tue','lp') ,'i'=>2 ),151 array('f'=> __('Wednesday','lp'), 's'=> __('Wed','lp') ,'i'=>3 ),152 array('f'=> __('Thursday','lp'), 's'=> __('Thu','lp') ,'i'=>4 ),153 array('f'=> __('Friday','lp'), 's'=> __('Fri','lp') ,'i'=>5 ),154 array('f'=> __('Saturday','lp'), 's'=> __('Sat','lp') ,'i'=>6 )191 0=> array('f'=> __('Sunday','lp'), 's'=> __('Sun','lp') ,'i'=>0, 'm'=> __('S','lp')), 192 array('f'=> __('Monday','lp'), 's'=> __('Mon','lp') ,'i'=>1, 'm'=> __('M','lp')), 193 array('f'=> __('Tuesday','lp'), 's'=> __('Tue','lp') ,'i'=>2, 'm'=> __('T','lp')), 194 array('f'=> __('Wednesday','lp'), 's'=> __('Wed','lp') ,'i'=>3, 'm'=> __('W','lp')), 195 array('f'=> __('Thursday','lp'), 's'=> __('Thu','lp') ,'i'=>4, 'm'=> __('T','lp')), 196 array('f'=> __('Friday','lp'), 's'=> __('Fri','lp') ,'i'=>5, 'm'=> __('F','lp')), 197 array('f'=> __('Saturday','lp'), 's'=> __('Sat','lp') ,'i'=>6, 'm'=> __('S','lp')) 155 198 ); 156 199 … … 182 225 $Dx->setTime(0,0,01); 183 226 184 $J['d']['debugs'] = $Dx; 227 $J['d']['debugs'] = [ 228 'now'=> $Dx, 229 'start'=> $date_range[0], 230 'end'=> $date_range[1], 231 ]; 232 233 // footer content 234 $tz_string = LIFEPRESS()->time->timezone_string; 235 $z = $LUN::getSunConstellation('traditional'); 236 237 $J['footer'] = $this->get_footer_content(); 238 $J['footer_data'] = [ 239 'icon' => true, 240 'today_daylight' => $LUN::getDaylightLength( $tz_string ), 241 'days_till_solar_event' => $LUN::getDaysToNextSolsticeEquinox( $tz_string ), 242 'solar_constellation' => (( $z && isset($z['name']) )? $z['name'] :''), 243 'phases' => $LUNDATA['phases_plus'], 244 'moon_progress' => $LUNDATA['progress'], 245 'age' => $LUNDATA['age'], 246 ]; 247 248 185 249 186 250 wp_send_json( apply_filters('lifepress_ajax_init_load', $J ) ); wp_die(); … … 211 275 212 276 // load months 213 public function load_months(){ 214 277 public function load_months(){ 215 278 wp_send_json(array( 216 279 'status'=>'bad', 'error_msg'=>__('Could not create an entry','lp'), … … 223 286 public function form_submit(){ 224 287 225 226 // verify nonce 227 if( empty($_POST['lp_nonce']) || !wp_verify_nonce( wp_unslash( $_POST['lp_nonce'] ), 'lp_nonce_key') ){ 228 wp_die( esc_html__( 'Action failed. Please refresh the page and retry.','lp') ); 229 } 288 check_ajax_referer( 'lp_nonce_key', 'lp_nonce' ); 230 289 231 290 $HELP = new LIFEPRESS_Helper(); … … 270 329 271 330 // creating a new tag 272 if( isset($post['new_tag']) && !empty($post['new_tag'])){ 273 $new_tag_id = $EN->set_lp_type_term( $post['new_tag'] ); 274 275 if(!is_wp_error($new_tag_id ) ){ 276 $C = isset($post['c'])? $post['c']:'808080'; 277 $C = str_replace('#', '', $C); 278 $ETD = new LIFEPRESS_Type_Data(); 279 280 $ETD->set_id($new_tag_id); 281 $ETD->set_new_meta('c',$C); 282 $tag_data = $ETD->get_one_tag_json_data($new_tag_id); 283 } 331 if( isset($post['tag_id']) && $post['tag_id'] == 'new'){ 332 $tag_data = $this->create_new_tag($EN, $post); 284 333 }else{ 285 334 $new_tag_id = $EN->set_lp_type_term( $post['tag'] ); … … 336 385 337 386 // creating a new tag 338 if( isset($post['new_tag']) && !empty($post['new_tag'])){ 339 340 $new_tag_id = $EN->set_lp_type_term( $post['new_tag'] ); 341 342 if(!is_wp_error($new_tag_id ) ){ 343 $C = isset($post['c'])? $post['c']:'808080'; 344 $C = str_replace('#', '', $C); 345 346 $ETD = new LIFEPRESS_Type_Data(); 347 348 $ETD->set_id($new_tag_id); 349 $ETD->set_new_meta('c',$C); 350 $tag_data = $ETD->get_one_tag_json_data($new_tag_id); 351 } 387 if( isset($post['tag_id']) && $post['tag_id'] == 'new'){ 388 $tag_data = $this->create_new_tag($EN, $post); 352 389 353 390 }else{ … … 425 462 } 426 463 464 private function create_new_tag($EN, $post){ 465 $new_tag_id = $EN->set_lp_type_term( $post['tag'] ); 466 //error_log($new_tag_id); 467 $tag_data = ''; 468 469 if(!is_wp_error($new_tag_id ) ){ 470 $C = isset($post['tag_color'])? $post['tag_color']:'808080'; 471 $C = str_replace('#', '', $C); 472 $ETD = new LIFEPRESS_Type_Data(); 473 474 $ETD->set_id($new_tag_id); 475 $ETD->set_new_meta('c',$C); 476 $tag_data = $ETD->get_one_tag_json_data($new_tag_id); 477 } 478 return $tag_data; 479 } 480 481 // get footer content 482 private function get_footer_content(){ 483 484 $settings = new LIFEPRESS_Settings(); 485 486 // if moon sun data not enabled 487 if( !$settings->check_yn('_moonsun')) return; 488 489 ob_start();?> 490 <div class='lp_footer_in lpdfx lpfxdrr lpfxjcsb lpgap10 lpfxaic pad5 lpofh lpbr15 lpfxjccS' style=""> 491 <div class='lp_footer_left lpdfx lpfxdrr lpgap15 padl10 lpdn_s'></div> 492 493 <div class='lp_footer_right lpdfx lpfxdrr lpfxaic lpgap15 pad5 lpbr15 lpofh'></div> 494 </div> 495 <?php 496 return ob_get_clean(); 497 } 498 427 499 // Save image as featured image to post 428 p ublicfunction save_featured_image($postid, $var_name){500 private function save_featured_image($postid, $var_name){ 429 501 if ($_FILES[$var_name]['error'] !== UPLOAD_ERR_OK) __return_false(); 430 502 … … 445 517 public function delete_item(){ 446 518 447 // verify nonce 448 if( empty($_POST['lp_nonce']) || !wp_verify_nonce( wp_unslash( $_POST['lp_nonce'] ), 'lp_nonce_key') ){ 449 wp_die( esc_html__( 'Action failed. Please refresh the page and retry.','lp') ); 450 } 519 check_ajax_referer( 'lp_nonce_key', 'lp_nonce' ); 451 520 452 521 $HELP = new LIFEPRESS_Helper(); … … 483 552 // get an item data 484 553 public function get_item_data(){ 554 check_ajax_referer('lp_nonce_key', 'nonce'); 555 485 556 if( !isset($_POST['item_id']) || !isset($_POST['item_type'])){ 486 557 wp_send_json(array( … … 504 575 505 576 // LOAD all entries 506 function load_entries(){ 577 public function load_entries(){ 578 579 check_ajax_referer('lp_nonce_key', 'nonce'); 507 580 508 581 $view = sanitize_text_field($_POST['view']); … … 512 585 $sY = (int)$_POST['sY']; 513 586 514 if($view == 'list_view'){ 515 $sD = 1; 516 } 587 $start_unix = (int)( (int)($_POST['start_u']) /1000); 588 $end_unix = (int)( (int)($_POST['end_u']) /1000); 589 590 if($view == 'list_view') $sD = 1; 517 591 518 592 $cD = new DateTime($sY.'-'.$sM.'-'.$sD); 519 593 $cD->setTimezone( LIFEPRESS()->time->timezone ); 594 $startDate = clone $cD; 520 595 521 596 $_ee = $cD->format('Y-m'); 522 597 $S = $cD->format('U'); 598 599 $JSON = []; 523 600 524 601 // end of month value … … 536 613 $E = $cD->format('U'); 537 614 break; 615 case 'moon_view': 616 617 $LUN = LIFEPRESS()->lunisolar; 618 $LUN->set_time(); 619 $LUNDATA = $LUN->get_moon_data( $start_unix ); 620 $startDate->setTimestamp( $LUNDATA['start'] ); 621 622 $start_unix = $LUNDATA['start']; 623 $end_unix = $LUNDATA['end']; 624 625 $JSON['lun_moonth'] = __('Moon','lp'). ' '. $LUNDATA['moon_index']; 626 $JSON['d']['lunar_data'] = $LUNDATA; 627 628 break; 538 629 } 539 630 … … 542 633 543 634 $ENT = new LIFEPRESS_Entries(); 544 $DD = new DateTime(); 545 $DD->setTimestamp( ( sanitize_text_field( $_POST['start_u'] )/1000) ); 635 $DD = ( new DateTime() )->setTimestamp( $start_unix ); 546 636 $S = $DD->format('U'); 547 $DD->setTimestamp( ( sanitize_text_field( $_POST['end_u'] )/1000) ); 637 $JSON['d']['s'] = $DD->format('Y-m-d'); 638 $DD->setTimestamp( $end_unix ); 548 639 $E = $DD->format('U'); 549 550 wp_send_json( array( 551 'entries'=> $ENT->get_entries($S, $E), 552 'start_u'=> $S * 1000, 553 'end_u'=> $E * 1000, 554 ) ); wp_die(); 640 $JSON['d']['e'] = $DD->format('Y-m-d'); 641 642 $JSON['entries'] = $ENT->get_entries($S, $E); 643 $JSON['start_u'] = $S * 1000; 644 $JSON['end_u'] = $E * 1000; 645 646 wp_send_json( $JSON ); wp_die(); 555 647 } 556 648 557 649 // search entries 558 function search_entries(){ 650 public function search_entries(){ 651 check_ajax_referer('lp_nonce_key', 'nonce'); 559 652 560 653 $s = sanitize_text_field($_POST['s']); … … 571 664 572 665 // TEMPLATES 573 function load_temp_content(){ 666 public function load_temp_content(){ 667 check_ajax_referer('lp_nonce_key', 'nonce'); 574 668 $d = $_POST['d']; 575 669 -
lifepress/trunk/includes/class-entries.php
r2432078 r3428394 51 51 } 52 52 53 function create_new($args){53 public function create_new($args){ 54 54 if(!empty($args) && is_array($args)){ 55 55 $valid_type = (function_exists('post_type_exists') && post_type_exists($args['post_type'])); -
lifepress/trunk/includes/class-helper.php
r3138542 r3428394 2 2 /** 3 3 * Helper functions 4 * @version 2. 14 * @version 2.2 5 5 */ 6 6 … … 26 26 27 27 // color calculations 28 function is_light_color($hex){ 29 $hex = str_replace( '#', '', $hex ); 30 31 $c_r = hexdec( substr( $hex, 0, 2 ) ); 32 $c_g = hexdec( substr( $hex, 2, 2 ) ); 33 $c_b = hexdec( substr( $hex, 4, 2 ) ); 34 35 $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000; 36 37 return $brightness > 155? false: true; 28 public function is_light_color($hex){ 29 $hex = str_replace('#', '', $hex); 30 31 // Handle short hex (#FFF) 32 if (strlen($hex) == 3) { 33 $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; 34 } 35 36 $r = hexdec(substr($hex, 0, 2)); 37 $g = hexdec(substr($hex, 2, 2)); 38 $b = hexdec(substr($hex, 4, 2)); 39 40 // YIQ weighted luminance (same weights as your original but scaled to 0-255 range) 41 $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; 42 43 // Threshold of 128 works well in practice for black vs white text 44 return ($yiq >= 128) ? true : false; 38 45 } 39 46 … … 44 51 45 52 // Timezones 46 47 // @updated 2.1 48 // $unix value passed to calculate DST for a given date - otherwise DST for now 49 function get_timezone_array( $unix = '' , $adjusted = true) { 50 51 $tzs = $this->get_default_timezones_array(); 53 private function __get_evo_timezone_choices($selected_zone, $locale = null ){ 54 return apply_filters( 55 'lp_timezone_choice', 56 wp_timezone_choice( $selected_zone, $locale ), 57 $selected_zone, 58 $locale 59 ); 60 } 52 61 53 if(!$adjusted) return $tzs; 54 55 // adjust GMT values based on daylight savings time 62 function get_timezone_array($unix = ''){ 63 // using WP timezones 64 $html = $this->__get_evo_timezone_choices('UTC'); 65 //EVO_Debug($html); 66 67 preg_match_all('/<option value="([^"]+)">/', $html, $matches); 68 $tzs = $matches[1]; 69 56 70 $DD = new DateTime( 'now' ); 71 $updated_zones = ['UTC' => '(GMT+00:00) Universal Time UTC']; 57 72 58 if( !empty( $unix )) $DD->setTimestamp( $unix ); 59 60 $updated_zones = array(); 61 foreach($tzs as $f=>$v){ 62 $DD->setTimezone( new DateTimeZone( $f )); 63 $nv = explode(') ', $v); 64 $updated_zones[ $f] = '(GMT'. $DD->format('P').') '. $nv[1]; 65 73 // if unix is passed adjust according to time present in unix 74 //if( !empty( $unix )) $DD->setTimestamp( $unix ); 75 76 //$updated_zones = array(); 77 foreach($tzs as $tz_string ){ 78 79 if( strpos($tz_string, 'UTC') !== false ) continue; 80 81 try { 82 $DD->setTimezone( new DateTimeZone( $tz_string )); 83 } 84 catch (Exception $e) { 85 // invalid timezone name 86 error_log(print_r($e->getMessage(), TRUE)); 87 continue; 88 } 89 $updated_zones[ $tz_string ] = '(GMT'. $DD->format('P').') '. $tz_string; 66 90 } 67 91 return $updated_zones; 68 } 69 92 } 93 70 94 71 95 function get_timezone_name($key){ … … 74 98 } 75 99 76 private function get_default_timezones_array(){77 return array(78 "Pacific/Midway" => "(GMT-11:00) Midway Island, Samoa ",79 "Pacific/Pago_Pago" => "(GMT-11:00) Pago Pago ",80 "Pacific/Honolulu" => "(GMT-10:00) Hawaii ",81 "America/Anchorage" => "(GMT-8:00) Alaska ",82 "America/Vancouver" => "(GMT-7:00) Vancouver ",83 "America/Los_Angeles" => "(GMT-7:00) Pacific Time (US and Canada)",84 "America/Tijuana" => "(GMT-7:00) Tijuana ",85 "America/Phoenix" => "(GMT-7:00) Arizona ",86 "America/Edmonton" => "(GMT-6:00) Edmonton ",87 "America/Denver" => "(GMT-6:00) Mountain Time (US and Canada)",88 "America/Mazatlan" => "(GMT-6:00) Mazatlan ",89 "America/Regina" => "(GMT-6:00) Saskatchewan ",90 "America/Guatemala" => "(GMT-6:00) Guatemala ",91 "America/El_Salvador" => "(GMT-6:00) El Salvador ",92 "America/Managua" => "(GMT-6:00) Managua ",93 "America/Costa_Rica" => "(GMT-6:00) Costa Rica ",94 "America/Tegucigalpa" => "(GMT-6:00) Tegucigalpa ",95 "America/Winnipeg" => "(GMT-5:00) Winnipeg ",96 "America/Chicago" => "(GMT-5:00) Central Time (US and Canada)",97 "America/Mexico_City" => "(GMT-5:00) Mexico City ",98 "America/Panama" => "(GMT-5:00) Panama ",99 "America/Bogota" => "(GMT-5:00) Bogota ",100 "America/Lima" => "(GMT-5:00) Lima ",101 "America/Caracas" => "(GMT-4:30) Caracas ",102 "America/Montreal" => "(GMT-4:00) Montreal ",103 "America/New_York" => "(GMT-4:00) Eastern Time (US and Canada)",104 "America/Indianapolis" => "(GMT-4:00) Indiana (East)",105 "America/Puerto_Rico" => "(GMT-4:00) Puerto Rico ",106 "America/Santiago" => "(GMT-4:00) Santiago ",107 "America/Halifax" => "(GMT-3:00) Halifax ",108 "America/Montevideo" => "(GMT-3:00) Montevideo ",109 "America/Araguaina" => "(GMT-3:00) Brasilia ",110 "America/Argentina/Buenos_Aires" => "(GMT-3:00) Buenos Aires, Georgetown ",111 "America/Sao_Paulo" => "(GMT-3:00) Sao Paulo ",112 "Canada/Atlantic" => "(GMT-3:00) Atlantic Time (Canada)",113 "America/St_Johns" => "(GMT-2:30) Newfoundland and Labrador ",114 "America/Godthab" => "(GMT-2:00) Greenland ",115 "Atlantic/Cape_Verde" => "(GMT-1:00) Cape Verde Islands ",116 "Atlantic/Azores" => "(GMT+0:00) Azores ",117 "UTC" => "(GMT+0:00) Universal Time UTC ",118 "Etc/Greenwich" => "(GMT+0:00) Greenwich Mean Time ",119 "Atlantic/Reykjavik" => "(GMT+0:00) Reykjavik ",120 "Africa/Nouakchott" => "(GMT+0:00) Nouakchott ",121 "Europe/Dublin" => "(GMT+1:00) Dublin ",122 "Europe/London" => "(GMT+1:00) London ",123 "Europe/Lisbon" => "(GMT+1:00) Lisbon ",124 "Africa/Casablanca" => "(GMT+1:00) Casablanca ",125 "Africa/Bangui" => "(GMT+1:00) West Central Africa ",126 "Africa/Algiers" => "(GMT+1:00) Algiers ",127 "Africa/Tunis" => "(GMT+1:00) Tunis ",128 "Europe/Belgrade" => "(GMT+2:00) Belgrade, Bratislava, Ljubljana ",129 "CET" => "(GMT+2:00) Sarajevo, Skopje, Zagreb ",130 "Europe/Oslo" => "(GMT+2:00) Oslo ",131 "Europe/Copenhagen" => "(GMT+2:00) Copenhagen ",132 "Europe/Brussels" => "(GMT+2:00) Brussels ",133 "Europe/Berlin" => "(GMT+2:00) Amsterdam, Berlin, Rome, Stockholm, Vienna ",134 "Europe/Amsterdam" => "(GMT+2:00) Amsterdam ",135 "Europe/Rome" => "(GMT+2:00) Rome ",136 "Europe/Stockholm" => "(GMT+2:00) Stockholm ",137 "Europe/Vienna" => "(GMT+2:00) Vienna ",138 "Europe/Luxembourg" => "(GMT+2:00) Luxembourg ",139 "Europe/Paris" => "(GMT+2:00) Paris ",140 "Europe/Zurich" => "(GMT+2:00) Zurich ",141 "Europe/Madrid" => "(GMT+2:00) Madrid ",142 "Africa/Harare" => "(GMT+2:00) Harare, Pretoria ",143 "Europe/Warsaw" => "(GMT+2:00) Warsaw ",144 "Europe/Prague" => "(GMT+2:00) Prague Bratislava ",145 "Europe/Budapest" => "(GMT+2:00) Budapest ",146 "Africa/Tripoli" => "(GMT+2:00) Tripoli ",147 "Africa/Cairo" => "(GMT+2:00) Cairo ",148 "Africa/Johannesburg" => "(GMT+2:00) Johannesburg ",149 "Europe/Helsinki" => "(GMT+3:00) Helsinki ",150 "Africa/Nairobi" => "(GMT+3:00) Nairobi ",151 "Europe/Sofia" => "(GMT+3:00) Sofia ",152 "Europe/Istanbul" => "(GMT+3:00) Istanbul ",153 "Europe/Athens" => "(GMT+3:00) Athens ",154 "Europe/Bucharest" => "(GMT+3:00) Bucharest ",155 "Asia/Nicosia" => "(GMT+3:00) Nicosia ",156 "Asia/Beirut" => "(GMT+3:00) Beirut ",157 "Asia/Damascus" => "(GMT+3:00) Damascus ",158 "Asia/Jerusalem" => "(GMT+3:00) Jerusalem ",159 "Asia/Amman" => "(GMT+3:00) Amman ",160 "Europe/Moscow" => "(GMT+3:00) Moscow ",161 "Asia/Baghdad" => "(GMT+3:00) Baghdad ",162 "Asia/Kuwait" => "(GMT+3:00) Kuwait ",163 "Asia/Riyadh" => "(GMT+3:00) Riyadh ",164 "Asia/Bahrain" => "(GMT+3:00) Bahrain ",165 "Asia/Qatar" => "(GMT+3:00) Qatar ",166 "Asia/Aden" => "(GMT+3:00) Aden ",167 "Africa/Khartoum" => "(GMT+3:00) Khartoum ",168 "Africa/Djibouti" => "(GMT+3:00) Djibouti ",169 "Africa/Mogadishu" => "(GMT+3:00) Mogadishu ",170 "Europe/Kiev" => "(GMT+3:00) Kiev ",171 "Asia/Dubai" => "(GMT+4:00) Dubai ",172 "Asia/Muscat" => "(GMT+4:00) Muscat ",173 "Asia/Tehran" => "(GMT+4:30) Tehran ",174 "Asia/Kabul" => "(GMT+4:30) Kabul ",175 "Asia/Baku" => "(GMT+5:00) Baku, Tbilisi, Yerevan ",176 "Asia/Yekaterinburg" => "(GMT+5:00) Yekaterinburg ",177 "Asia/Tashkent" => "(GMT+5:00) Islamabad, Karachi, Tashkent ",178 "Asia/Calcutta" => "(GMT+5:30) India ",179 "Asia/Kolkata" => "(GMT+5:30) Mumbai, Kolkata, New Delhi ",180 "Asia/Kathmandu" => "(GMT+5:45) Kathmandu ",181 "Asia/Novosibirsk" => "(GMT+6:00) Novosibirsk ",182 "Asia/Almaty" => "(GMT+6:00) Almaty ",183 "Asia/Dacca" => "(GMT+6:00) Dacca ",184 "Asia/Dhaka" => "(GMT+6:00) Astana, Dhaka ",185 "Asia/Krasnoyarsk" => "(GMT+7:00) Krasnoyarsk ",186 "Asia/Bangkok" => "(GMT+7:00) Bangkok ",187 "Asia/Saigon" => "(GMT+7:00) Vietnam ",188 "Asia/Jakarta" => "(GMT+7:00) Jakarta ",189 "Asia/Irkutsk" => "(GMT+8:00) Irkutsk, Ulaanbaatar ",190 "Asia/Shanghai" => "(GMT+8:00) Beijing, Shanghai ",191 "Asia/Hong_Kong" => "(GMT+8:00) Hong Kong ",192 "Asia/Taipei" => "(GMT+8:00) Taipei ",193 "Asia/Kuala_Lumpur" => "(GMT+8:00) Kuala Lumpur ",194 "Asia/Singapore" => "(GMT+8:00) Singapore ",195 "Australia/Perth" => "(GMT+8:00) Perth ",196 "Asia/Yakutsk" => "(GMT+9:00) Yakutsk ",197 "Asia/Seoul" => "(GMT+9:00) Seoul ",198 "Asia/Tokyo" => "(GMT+9:00) Osaka, Sapporo, Tokyo ",199 "Australia/Darwin" => "(GMT+9:30) Darwin ",200 "Australia/Adelaide" => "(GMT+9:30) Adelaide ",201 "Asia/Vladivostok" => "(GMT+10:00) Vladivostok ",202 "Pacific/Port_Moresby" => "(GMT+10:00) Guam, Port Moresby ",203 "Australia/Brisbane" => "(GMT+10:00) Brisbane ",204 "Australia/Sydney" => "(GMT+10:00) Canberra, Melbourne, Sydney ",205 "Australia/Hobart" => "(GMT+10:00) Hobart ",206 "Asia/Magadan" => "(GMT+10:00) Magadan ",207 "SST" => "(GMT+11:00) Solomon Islands ",208 "Pacific/Noumea" => "(GMT+11:00) New Caledonia ",209 "Asia/Kamchatka" => "(GMT+12:00) Kamchatka ",210 "Pacific/Fiji" => "(GMT+12:00) Fiji Islands, Marshall Islands ",211 "Pacific/Auckland" => "(GMT+12:00) Auckland, Wellington"212 );213 }214 215 100 } -
lifepress/trunk/includes/class-settings.php
r3244643 r3428394 2 2 /** 3 3 * Settings 4 * @version 2. 1.34 * @version 2.2 5 5 */ 6 6 … … 45 45 $new = array(); 46 46 foreach($post as $f=>$v){ 47 $new[$f] = addslashes(esc_html(stripslashes(($v))));47 $new[$f] = sanitize_text_field( addslashes(esc_html(stripslashes(($v)))) ); 48 48 } 49 49 $this->props = $new; -
lifepress/trunk/includes/class-time.php
r3138542 r3428394 9 9 public $timezone; 10 10 public $timezone0, $time_format, $current_time, $date_format; 11 public $timezone_string; 11 12 12 13 public function __construct(){ … … 16 17 $settings = new LIFEPRESS_Settings(); 17 18 $tz_string = $settings->get_prop('_tz'); 19 $this->timezone_string = $tz_string; 18 20 19 21 // fallback timezone from site -
lifepress/trunk/lang/lifepress.po
r2676775 r3428394 2 2 msgstr "" 3 3 "Project-Id-Version: LifePress 2.0.2\n" 4 "POT-Creation-Date: 202 2-02-10 14:43-0800\n"5 "PO-Revision-Date: 202 2-02-10 14:43-0800\n"4 "POT-Creation-Date: 2025-12-27 12:27-0800\n" 5 "PO-Revision-Date: 2025-12-27 12:27-0800\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: Ashan Jay\n" … … 11 11 "Content-Transfer-Encoding: 8bit\n" 12 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3. 0.1\n"13 "X-Generator: Poedit 3.4.4\n" 14 14 "X-Poedit-Basepath: ..\n" 15 15 "X-Poedit-KeywordsList: __;_e\n" 16 16 "X-Poedit-SearchPath-0: .\n" 17 17 18 #: includes/admin/class-admin.php:47 18 #: includes/admin/class-admin-ajax.php:36 19 msgid "Manage Metric Data" 20 msgstr "" 21 22 #: includes/admin/class-admin-ajax.php:59 23 msgid "Missing Required fields" 24 msgstr "" 25 26 #: includes/admin/class-admin-ajax.php:65 27 msgid "Successfully Saved" 28 msgstr "" 29 30 #: includes/admin/class-admin-ajax.php:86 31 msgid "Successfully Deleted" 32 msgstr "" 33 34 #: includes/admin/class-admin-ajax.php:101 35 msgid "Successfully Created" 36 msgstr "" 37 38 #: includes/admin/class-admin-ajax.php:101 39 msgid "Successfully Updated" 40 msgstr "" 41 42 #: includes/admin/class-admin-ajax.php:163 43 msgid "Missing Data Values" 44 msgstr "" 45 46 #: includes/admin/class-admin-ajax.php:193 47 msgid "Create Metric Data Series" 48 msgstr "" 49 50 #: includes/admin/class-admin-ajax.php:193 51 msgid "Update Metric Data Series" 52 msgstr "" 53 54 #: includes/admin/class-admin-ajax.php:196 55 msgid "Metric Data Series Name" 56 msgstr "" 57 58 #: includes/admin/class-admin-ajax.php:197 59 msgid "Description" 60 msgstr "" 61 62 #: includes/admin/class-admin-ajax.php:200 63 #: includes/admin/class-admin-ajax.php:303 includes/admin/class-admin.php:162 64 msgid "Save Changes" 65 msgstr "" 66 67 #: includes/admin/class-admin-ajax.php:212 68 msgid "Missing Series Slug" 69 msgstr "" 70 71 #: includes/admin/class-admin-ajax.php:223 72 msgid "Create Metric Data Field For" 73 msgstr "" 74 75 #: includes/admin/class-admin-ajax.php:223 76 msgid "Update Metric Data Field For" 77 msgstr "" 78 79 #: includes/admin/class-admin-ajax.php:229 80 msgid "Field Full Name" 81 msgstr "" 82 83 #: includes/admin/class-admin-ajax.php:230 84 msgid "This name will be used as the slug to save data." 85 msgstr "" 86 87 #: includes/admin/class-admin-ajax.php:234 88 msgid "Field Abbreviation Code" 89 msgstr "" 90 91 #: includes/admin/class-admin-ajax.php:235 92 msgid "Type in a field abbreviation code with less then 4 letters." 93 msgstr "" 94 95 #: includes/admin/class-admin-ajax.php:237 96 msgid "e.g., BR" 97 msgstr "" 98 99 #: includes/admin/class-admin-ajax.php:239 100 msgid "Measurement Unit Code (Optional)" 101 msgstr "" 102 103 #: includes/admin/class-admin-ajax.php:240 104 msgid "" 105 "Use 8 or less characters to set data measuring unit code. This will show " 106 "after the data. Leave blank for no units." 107 msgstr "" 108 109 #: includes/admin/class-admin-ajax.php:242 110 msgid "e.g., ft for feet" 111 msgstr "" 112 113 #: includes/admin/class-admin-ajax.php:265 114 msgid "Field Data Type" 115 msgstr "" 116 117 #: includes/admin/class-admin-ajax.php:270 118 msgid "Text Field" 119 msgstr "" 120 121 #: includes/admin/class-admin-ajax.php:271 122 msgid "Multiple Selectable Values" 123 msgstr "" 124 125 #: includes/admin/class-admin-ajax.php:272 126 msgid "Check Field" 127 msgstr "" 128 129 #: includes/admin/class-admin-ajax.php:283 130 msgid "Field Option Values" 131 msgstr "" 132 133 #: includes/admin/class-admin-ajax.php:284 134 msgid "Separate field option values by comma. eg. jump,run." 135 msgstr "" 136 137 #: includes/admin/class-admin-ajax.php:286 138 msgid "Selection Type" 139 msgstr "" 140 141 #: includes/admin/class-admin-ajax.php:291 142 msgid "Only one option at a time" 143 msgstr "" 144 145 #: includes/admin/class-admin-ajax.php:292 146 msgid "Multiple options" 147 msgstr "" 148 149 #: includes/admin/class-admin.php:59 19 150 msgid "LifePress Settings" 20 151 msgstr "" 21 152 22 #: includes/admin/class-admin.php: 52153 #: includes/admin/class-admin.php:64 23 154 msgid "Settings Saved" 24 155 msgstr "" 25 156 26 #: includes/admin/class-admin.php: 67157 #: includes/admin/class-admin.php:83 27 158 msgid "Dashboard Title" 28 159 msgstr "" 29 160 30 #: includes/admin/class-admin.php:76 161 #: includes/admin/class-admin.php:89 162 msgid "LifePress dashboard page URL" 163 msgstr "" 164 165 #: includes/admin/class-admin.php:94 166 msgid "Add a home page link to top header in dashboard" 167 msgstr "" 168 169 #: includes/admin/class-admin.php:99 170 msgid "Show moon and sun information" 171 msgstr "" 172 173 #: includes/admin/class-admin.php:101 174 msgid "Display moon and sun information in the footer" 175 msgstr "" 176 177 #: includes/admin/class-admin.php:104 178 msgid "Enable Moon Month View [Beta]" 179 msgstr "" 180 181 #: includes/admin/class-admin.php:106 182 msgid "Allow calendar to show as moon month view" 183 msgstr "" 184 185 #: includes/admin/class-admin.php:110 31 186 msgid "Default Dashboard View" 32 187 msgstr "" 33 188 34 #: includes/admin/class-admin.php: 78189 #: includes/admin/class-admin.php:112 35 190 msgid "Week View" 36 191 msgstr "" 37 192 38 #: includes/admin/class-admin.php: 79193 #: includes/admin/class-admin.php:113 39 194 msgid "Month View" 40 195 msgstr "" 41 196 42 #: includes/admin/class-admin.php:85 197 #: includes/admin/class-admin.php:114 198 msgid "Moon Month View (If enabled)" 199 msgstr "" 200 201 #: includes/admin/class-admin.php:121 43 202 msgid "Month data loading method" 44 203 msgstr "" 45 204 46 #: includes/admin/class-admin.php: 87205 #: includes/admin/class-admin.php:123 47 206 msgid "Using previously loaded data, if available" 48 207 msgstr "" 49 208 50 #: includes/admin/class-admin.php: 88209 #: includes/admin/class-admin.php:124 51 210 msgid "Load fresh data at all times" 52 211 msgstr "" 53 212 54 #: includes/admin/class-admin.php:102 213 #: includes/admin/class-admin.php:131 214 msgid "Default Timezone" 215 msgstr "" 216 217 #: includes/admin/class-admin.php:138 218 msgid "Select the years count for past and future" 219 msgstr "" 220 221 #: includes/admin/class-admin.php:152 222 msgid "Configure Data Metrics" 223 msgstr "" 224 225 #: includes/admin/class-admin.php:154 226 msgid "Add measurable data types for each entry" 227 msgstr "" 228 229 #: includes/admin/class-admin.php:162 55 230 msgid "submit" 56 231 msgstr "" 57 232 58 #: includes/admin/class-admin.php:1 0259 msgid " Save Changes"60 msgstr "" 61 62 #: includes/admin/class-admin.php: 190233 #: includes/admin/class-admin.php:195 234 msgid "Configure" 235 msgstr "" 236 237 #: includes/admin/class-admin.php:288 63 238 msgid "Settings not saved, nonce verification failed! Please try again later!" 64 239 msgstr "" 65 240 66 #: includes/admin/class-admin.php: 202241 #: includes/admin/class-admin.php:300 67 242 msgid "LifePress Information" 68 243 msgstr "" 69 244 70 #: includes/admin/class-admin.php: 205245 #: includes/admin/class-admin.php:303 71 246 msgid "Life Span Start Date" 72 247 msgstr "" 73 248 74 #: includes/class-ajax.php: 38249 #: includes/class-ajax.php:48 75 250 msgid "Login required" 76 251 msgstr "" 77 252 78 #: includes/class-ajax.php:1 25253 #: includes/class-ajax.php:189 79 254 msgid "Sunday" 80 255 msgstr "" 81 256 82 #: includes/class-ajax.php:1 25257 #: includes/class-ajax.php:189 83 258 msgid "Sun" 84 259 msgstr "" 85 260 86 #: includes/class-ajax.php:126 261 #: includes/class-ajax.php:189 includes/class-ajax.php:195 262 msgid "S" 263 msgstr "" 264 265 #: includes/class-ajax.php:190 87 266 msgid "Monday" 88 267 msgstr "" 89 268 90 #: includes/class-ajax.php:1 26269 #: includes/class-ajax.php:190 91 270 msgid "Mon" 92 271 msgstr "" 93 272 94 #: includes/class-ajax.php:127 273 #: includes/class-ajax.php:190 274 msgid "M" 275 msgstr "" 276 277 #: includes/class-ajax.php:191 95 278 msgid "Tuesday" 96 279 msgstr "" 97 280 98 #: includes/class-ajax.php:1 27281 #: includes/class-ajax.php:191 99 282 msgid "Tue" 100 283 msgstr "" 101 284 102 #: includes/class-ajax.php:128 285 #: includes/class-ajax.php:191 includes/class-ajax.php:193 286 msgid "T" 287 msgstr "" 288 289 #: includes/class-ajax.php:192 103 290 msgid "Wednesday" 104 291 msgstr "" 105 292 106 #: includes/class-ajax.php:1 28293 #: includes/class-ajax.php:192 107 294 msgid "Wed" 108 295 msgstr "" 109 296 110 #: includes/class-ajax.php:129 297 #: includes/class-ajax.php:192 298 msgid "W" 299 msgstr "" 300 301 #: includes/class-ajax.php:193 111 302 msgid "Thursday" 112 303 msgstr "" 113 304 114 #: includes/class-ajax.php:1 29305 #: includes/class-ajax.php:193 115 306 msgid "Thu" 116 307 msgstr "" 117 308 118 #: includes/class-ajax.php:1 30309 #: includes/class-ajax.php:194 119 310 msgid "Friday" 120 311 msgstr "" 121 312 122 #: includes/class-ajax.php:1 30313 #: includes/class-ajax.php:194 123 314 msgid "Fri" 124 315 msgstr "" 125 316 126 #: includes/class-ajax.php:131 317 #: includes/class-ajax.php:194 318 msgid "F" 319 msgstr "" 320 321 #: includes/class-ajax.php:195 127 322 msgid "Saturday" 128 323 msgstr "" 129 324 130 #: includes/class-ajax.php:1 31325 #: includes/class-ajax.php:195 131 326 msgid "Sat" 132 327 msgstr "" 133 328 134 #: includes/class-ajax.php: 135329 #: includes/class-ajax.php:200 135 330 msgid "January" 136 331 msgstr "" 137 332 138 #: includes/class-ajax.php: 136333 #: includes/class-ajax.php:201 139 334 msgid "February" 140 335 msgstr "" 141 336 142 #: includes/class-ajax.php: 137337 #: includes/class-ajax.php:202 143 338 msgid "March" 144 339 msgstr "" 145 340 146 #: includes/class-ajax.php: 138341 #: includes/class-ajax.php:203 147 342 msgid "April" 148 343 msgstr "" 149 344 150 #: includes/class-ajax.php: 139 templates/class-template_parts.php:96345 #: includes/class-ajax.php:204 templates/class-template_parts.php:123 151 346 msgid "May" 152 347 msgstr "" 153 348 154 #: includes/class-ajax.php: 140349 #: includes/class-ajax.php:205 155 350 msgid "June" 156 351 msgstr "" 157 352 158 #: includes/class-ajax.php: 141353 #: includes/class-ajax.php:206 159 354 msgid "July" 160 355 msgstr "" 161 356 162 #: includes/class-ajax.php: 142357 #: includes/class-ajax.php:207 163 358 msgid "August" 164 359 msgstr "" 165 360 166 #: includes/class-ajax.php: 143361 #: includes/class-ajax.php:208 167 362 msgid "September" 168 363 msgstr "" 169 364 170 #: includes/class-ajax.php: 144365 #: includes/class-ajax.php:209 171 366 msgid "October" 172 367 msgstr "" 173 368 174 #: includes/class-ajax.php: 145369 #: includes/class-ajax.php:210 175 370 msgid "November" 176 371 msgstr "" 177 372 178 #: includes/class-ajax.php: 146373 #: includes/class-ajax.php:211 179 374 msgid "December" 180 375 msgstr "" 181 376 182 #: includes/class-ajax.php: 186 includes/class-ajax.php:338377 #: includes/class-ajax.php:277 includes/class-ajax.php:415 183 378 msgid "Could not create an entry" 184 379 msgstr "" 185 380 186 #: includes/class-ajax.php: 187 includes/class-ajax.php:339381 #: includes/class-ajax.php:278 includes/class-ajax.php:416 187 382 msgid "Could not create new entry" 188 383 msgstr "" 189 384 190 #: includes/class-ajax.php: 218 includes/class-ajax.php:282385 #: includes/class-ajax.php:315 includes/class-ajax.php:369 191 386 msgid "Entry on" 192 387 msgstr "" 193 388 194 #: includes/class-ajax.php: 261389 #: includes/class-ajax.php:348 195 390 msgid "Successfully updated entry" 196 391 msgstr "" 197 392 198 #: includes/class-ajax.php: 262393 #: includes/class-ajax.php:349 199 394 msgid "Successfully updated draft entry" 200 395 msgstr "" 201 396 202 #: includes/class-ajax.php: 330397 #: includes/class-ajax.php:407 203 398 msgid "Successfully created entry" 204 399 msgstr "" 205 400 206 #: includes/class-ajax.php: 331401 #: includes/class-ajax.php:408 207 402 msgid "Successfully saved draft entry" 208 403 msgstr "" 209 404 210 #: includes/class-ajax.php: 349 includes/class-ajax.php:350405 #: includes/class-ajax.php:426 includes/class-ajax.php:427 211 406 msgid "Tag ID Missing" 212 407 msgstr "" 213 408 214 #: includes/class-ajax.php: 363 includes/class-ajax.php:364409 #: includes/class-ajax.php:440 includes/class-ajax.php:441 215 410 msgid "Tag does not exists" 216 411 msgstr "" 217 412 218 #: includes/class-ajax.php: 380413 #: includes/class-ajax.php:457 219 414 msgid "Successfully updated tag" 220 415 msgstr "" 221 416 222 #: includes/class-ajax.php: 421223 msgid "Successfully deleted "224 msgstr "" 225 226 #: includes/class-ajax.php: 426227 msgid "Could not delete "228 msgstr "" 229 230 #: includes/class-ajax.php: 436417 #: includes/class-ajax.php:546 418 msgid "Successfully deleted" 419 msgstr "" 420 421 #: includes/class-ajax.php:551 422 msgid "Could not delete" 423 msgstr "" 424 425 #: includes/class-ajax.php:562 231 426 msgid "Missing Required Data" 232 427 msgstr "" 233 428 234 #: includes/class-ajax.php:527 429 #: includes/class-ajax.php:626 includes/class-lunisolar.php:112 430 #: includes/class-lunisolar.php:117 includes/class-lunisolar.php:122 431 #: includes/class-lunisolar.php:128 432 msgid "Moon" 433 msgstr "" 434 435 #: includes/class-ajax.php:672 235 436 msgid "No Temp" 236 437 msgstr "" … … 284 485 msgstr "" 285 486 286 #: templates/class-template_parts.php:22 487 #: includes/class-lunisolar.php:328 488 msgid "Today is" 489 msgstr "" 490 491 #: includes/class-lunisolar.php:330 492 msgid "Tomorrow is" 493 msgstr "" 494 495 #: includes/class-lunisolar.php:332 496 msgid "days to" 497 msgstr "" 498 499 #: includes/class-metrics.php:184 500 msgid "Add Metric Data " 501 msgstr "" 502 503 #: includes/class-metrics.php:358 504 msgid "Add New Field" 505 msgstr "" 506 507 #: templates/class-template_parts.php:25 287 508 msgid "You must login to view the LifePress Dashboard" 288 509 msgstr "" 289 510 290 #: templates/class-template_parts.php:2 4511 #: templates/class-template_parts.php:27 291 512 msgid "Login" 292 513 msgstr "" 293 514 294 515 #: templates/class-template_parts.php:39 295 msgid "Life" 296 msgstr "" 297 298 #: templates/class-template_parts.php:92 516 msgid "Tooltip Test" 517 msgstr "" 518 519 #: templates/class-template_parts.php:51 520 msgid "Life Journal" 521 msgstr "" 522 523 #: templates/class-template_parts.php:56 524 msgid "Today" 525 msgstr "" 526 527 #: templates/class-template_parts.php:84 templates/class-template_parts.php:361 528 msgid "Add New Entry" 529 msgstr "" 530 531 #: templates/class-template_parts.php:119 299 532 msgid "Jan" 300 533 msgstr "" 301 534 302 #: templates/class-template_parts.php: 93535 #: templates/class-template_parts.php:120 303 536 msgid "Feb" 304 537 msgstr "" 305 538 306 #: templates/class-template_parts.php: 94539 #: templates/class-template_parts.php:121 307 540 msgid "Mar" 308 541 msgstr "" 309 542 310 #: templates/class-template_parts.php: 95543 #: templates/class-template_parts.php:122 311 544 msgid "Apr" 312 545 msgstr "" 313 546 314 #: templates/class-template_parts.php: 97547 #: templates/class-template_parts.php:124 315 548 msgid "Jun" 316 549 msgstr "" 317 550 318 #: templates/class-template_parts.php: 98551 #: templates/class-template_parts.php:125 319 552 msgid "Jul" 320 553 msgstr "" 321 554 322 #: templates/class-template_parts.php: 99555 #: templates/class-template_parts.php:126 323 556 msgid "Aug" 324 557 msgstr "" 325 558 326 #: templates/class-template_parts.php:1 00559 #: templates/class-template_parts.php:127 327 560 msgid "Sep" 328 561 msgstr "" 329 562 330 #: templates/class-template_parts.php:1 01563 #: templates/class-template_parts.php:128 331 564 msgid "Oct" 332 565 msgstr "" 333 566 334 #: templates/class-template_parts.php:1 02567 #: templates/class-template_parts.php:129 335 568 msgid "Nov" 336 569 msgstr "" 337 570 338 #: templates/class-template_parts.php:1 03571 #: templates/class-template_parts.php:130 339 572 msgid "Dec" 340 573 msgstr "" 341 574 342 #: templates/class-template_parts.php:1 20575 #: templates/class-template_parts.php:149 343 576 msgid "Set Month" 344 577 msgstr "" 345 578 346 #: templates/class-template_parts.php:2 00579 #: templates/class-template_parts.php:225 347 580 msgid "No Results Found" 348 581 msgstr "" 349 582 350 #: templates/class-template_parts.php:222 583 #: templates/class-template_parts.php:247 584 msgid "Search Entries..." 585 msgstr "" 586 587 #: templates/class-template_parts.php:248 351 588 msgid "Search" 352 589 msgstr "" 353 590 354 #: templates/class-template_parts.php: 284591 #: templates/class-template_parts.php:309 355 592 msgid "tag" 356 593 msgstr "" 357 594 358 #: templates/class-template_parts.php: 288595 #: templates/class-template_parts.php:314 359 596 msgid "Update Entry Tag" 360 597 msgstr "" 361 598 362 #: templates/class-template_parts.php: 293363 #: templates/class-template_parts.php:3 88599 #: templates/class-template_parts.php:319 600 #: templates/class-template_parts.php:396 364 601 msgid "Tag Name" 365 602 msgstr "" 366 603 367 #: templates/class-template_parts.php:3 18368 #: templates/class-template_parts.php:4 12604 #: templates/class-template_parts.php:344 605 #: templates/class-template_parts.php:422 369 606 msgid "New Color" 370 607 msgstr "" 371 608 372 #: templates/class-template_parts.php:3 21373 #: templates/class-template_parts.php:4 19609 #: templates/class-template_parts.php:347 610 #: templates/class-template_parts.php:476 374 611 msgid "Submit" 375 612 msgstr "" 376 613 377 #: templates/class-template_parts.php:3 30614 #: templates/class-template_parts.php:356 378 615 msgid "entry" 379 616 msgstr "" 380 617 381 #: templates/class-template_parts.php:334 382 msgid "Add New Entry" 383 msgstr "" 384 385 #: templates/class-template_parts.php:338 618 #: templates/class-template_parts.php:383 619 msgid "Create New" 620 msgstr "" 621 622 #: templates/class-template_parts.php:423 623 msgid "Add New Tag" 624 msgstr "" 625 626 #: templates/class-template_parts.php:431 627 msgid "Add Date" 628 msgstr "" 629 630 #: templates/class-template_parts.php:434 386 631 msgid "Add title" 387 632 msgstr "" 388 633 389 #: templates/class-template_parts.php:352 634 #: templates/class-template_parts.php:440 635 msgid "Add description" 636 msgstr "" 637 638 #: templates/class-template_parts.php:451 390 639 msgid "Select Image" 391 640 msgstr "" 392 641 393 #: templates/class-template_parts.php:4 20642 #: templates/class-template_parts.php:477 394 643 msgid "Save Draft" 395 644 msgstr "" 396 645 397 #: templates/class-template_parts.php:4 29646 #: templates/class-template_parts.php:486 398 647 msgid "Successfully Created New Entry" 399 648 msgstr "" 400 649 401 #: templates/class-template_parts.php:4 35650 #: templates/class-template_parts.php:492 402 651 msgid "Successfully Updated New Entry" 403 652 msgstr "" 404 653 405 #: templates/class-template_parts.php:4 41654 #: templates/class-template_parts.php:498 406 655 msgid "Successfully Updated Tag" 407 656 msgstr "" 657 658 #: templates/class-template_parts.php:532 659 msgid "Daylight today" 660 msgstr "" 661 662 #: templates/class-template_parts.php:536 663 msgid "Current Sun Constellation" 664 msgstr "" 665 666 #: templates/class-template_parts.php:536 667 msgid "Constellation" 668 msgstr "" 669 670 #: templates/class-template_parts.php:542 671 msgid "Moon day in lunar cycle" 672 msgstr "" 673 674 #: templates/class-template_parts.php:543 675 msgid "Moon Day" 676 msgstr "" -
lifepress/trunk/lifepress.php
r3244643 r3428394 5 5 * Description: You are the creator of events in your life. Record and track progress in your life. 6 6 * Author: Ashan Jay 7 * Version: 2. 1.37 * Version: 2.2 8 8 * Requires at least: 6.0 9 * Tested up to: 6. 7.29 * Tested up to: 6.9 10 10 * Author URI: http://www.ashanjay.com/ 11 11 * … … 20 20 class LIFEPRESS{ 21 21 22 public $version='2. 1.322 public $version='2.2 23 23 '; 24 24 public $name = 'LifePress'; 25 25 public $date_format = 'Y-m-d'; 26 26 public $template_url; 27 public $temp, $time, $front, $props, $help, $shortcode, $assets_path ;27 public $temp, $time, $front, $props, $help, $shortcode, $assets_path, $lunisolar, $metrics; 28 28 29 29 protected static $_instance = null; … … 60 60 private function includes(){ 61 61 include_once('includes/class-install.php'); 62 //include_once('includes/class-planets.php'); 63 include_once('includes/class-lunisolar.php'); 64 include_once('includes/lib/MoonPhase.php'); 62 65 include_once('includes/class-helper.php'); 63 66 include_once('includes/class-time.php'); … … 69 72 include_once('includes/class-frontend.php'); 70 73 include_once('includes/class-settings.php'); 74 include_once('includes/class-metrics.php'); 71 75 72 76 include_once('includes/admin/class-admin.php'); … … 74 78 if ( defined('DOING_AJAX') ){ 75 79 include_once('includes/class-ajax.php'); 80 include_once('includes/admin/class-admin-ajax.php'); 76 81 } 77 82 } … … 90 95 $this->help = new LIFEPRESS_Helper(); 91 96 $this->shortcode = new LIFEPRESS_Shortcodes(); 97 $this->metrics = new LIFEPRESS_Metrics(); 98 $this->lunisolar = new LIFEPRESS_Lunisolar(); 92 99 } 93 100 -
lifepress/trunk/templates/class-template_parts.php
r3244643 r3428394 15 15 16 16 $SETTINGS = new LIFEPRESS_Settings(); 17 17 18 $def_view = $SETTINGS->get_prop('_dash_def_view'); 19 if(! $SETTINGS->check_yn('_moonview')) $def_view = 'month_view'; 20 18 21 $mdata_loading_m = $SETTINGS->get_prop('_month_data_loading_method'); 19 22 if( !$def_view ) $def_view = 'week_view'; … … 51 54 <span class='top_right dfx alic'> 52 55 <span class='date_range' data-mdld='<?php echo esc_html( $mdata_loading_m );?>'> 53 <span class='lp_btn lp_btn_grey lp_goto_today'><?php _e('Today','lp');?></span> 54 <span class='lp_view_change prev lpfx_10a'><i class='fas fa-angle-left'></i></span> 55 <span class='title lp_range_title lp_trig_action lpfw800' data-t='lb' data-d='<?php echo $month_select_data;?>'><?php echo esc_html( date('F',$now).' '. date('Y',$now) );?></span> 56 <span class='lp_view_change next lpfx_10a'><i class='fas fa-angle-right'></i></span> 56 <span class='lp_btn outlined lp_trans lp_goto_today'><?php _e('Today','lp');?></span> 57 <span class='lp_view_change prev lpfx_10a lp_trans'><i class='fas fa-angle-left'></i></span> 58 <span class='title lp_range_title lp_trig_action lpfw800' data-t='lb' data-d='<?php echo $month_select_data;?>'> 59 <span class='lp_lazy_loading' style='height:25px; width:100px;'></span> 60 </span> 61 <span class='lp_view_change next lpfx_10a lp_trans'><i class='fas fa-angle-right'></i></span> 57 62 </span> 58 63 <span class='header_right dfx alic'> … … 63 68 ?> 64 69 65 <span class='top_views dfx ' data-def_view='<?php echo esc_attr( $def_view );?>'>70 <span class='top_views dfx lpgap5' data-def_view='<?php echo esc_attr( $def_view );?>'> 66 71 67 72 <?php … … 71 76 )) as $F=>$V){ 72 77 $FF = $def_view == $F. '_view' ? 'focus':''; 73 echo "<span class='lp_view_style view ". esc_attr( $F )." ". esc_attr( $FF )."' data-t='". esc_attr( $F )."'><i class='". esc_attr( $V )."'></i></span>";78 echo "<span class='lp_view_style view lppad10 lpbr10 lpcurp lp_trans ". esc_attr( $F )." ". esc_attr( $FF )."' data-t='". esc_attr( $F )."'><i class='". esc_attr( $V )."'></i></span>"; 74 79 } 75 80 … … 77 82 </span> 78 83 <span class='lp_search_trig lp_trig_action' data-t='lb' data-d='<?php echo json_encode(array('type'=>'lb_temp','temp_key'=>'search_view'));?>' data-lbc='search'><i class='fas fa-search'></i></span> 79 <span class='lp_new_entry_btn lp_btn lp_trig_action lp_new_btn marl10 lpdfx lpfx_jc_c lpfx_ai_c' data-t='lb' data-d='<?php echo json_encode(array('type'=>'lb_temp','temp_key'=>'entry_form','form_type'=>'new'));?>' data-lbc='new_form'>+</span> 84 <span class='lp_new_entry_btn lp_btn lp_trig_action lp_new_btn lpdfx lpfx_jc_c lpfx_ai_c lp_trans ' title='<?php _e('Add New Entry','lp');?>' data-t='lb' data-d='<?php echo json_encode(array('type'=>'lb_temp','temp_key'=>'entry_form','form_type'=>'new'));?>' data-lbc='new_form'> 85 <i class='fa fa-pen-to-square'></i> 86 </span> 80 87 </span> 81 88 </span> … … 89 96 <div class='footer_notices'></div> 90 97 </div> 98 <div class='lp_footer'></div> 91 99 </div> 92 100 <?php … … 169 177 170 178 function month_view(){ 171 172 173 174 179 ?> 175 180 <div class='lp_month_view dfx'> … … 197 202 </div> 198 203 {{/each}} 199 </div> 200 204 </div> 201 205 </div> 202 206 </div> … … 208 212 {{#if has_entries}} 209 213 {{#each entries}} 210 <div class='search_entry padb10 lp_entry_item' style='background-color:#{{tag.c}}; color:#{{tag.tc}}' data-id='{{@key}}'> 211 <p class='entry_date'>{{timeR}}</p> 212 <h3>{{title}}</h3> 214 <div class='search_entry padb10 lp_entry_item lp_trans lphoop7' style='' data-id='{{@key}}'> 215 <div class='lpdfx lpfxdrr lpgap10 lpfxaic lpmarb10'> 216 <p class='entry_date lpmar0i'>{{timeR}}</p> 217 <div class='lp_search_tag lpdfx lpfxdrr lpgap5 lpfxaic lpfz12'> 218 <span class="lp_search_tag_cir lpbr50p lpdfx" style='background-color:#{{tag.c}};width: 15px;height: 15px;'></span> {{tag.n}}</div> 219 </div> 220 <h3 class='lpff_1'>{{title}}</h3> 213 221 <p>{{{details}}}</p> 214 222 </div> … … 236 244 <div class='lp_search'> 237 245 <div class='lp_search_input padt20 padb20 posr boxsbb'> 246 <i class='fa fa-search lpposa lpfz24' style="top:33px; left:15px;"></i> 238 247 <input class='w100 lp_search_inputfield' type='text' name='s' value='' placeholder='<?php _e('Search Entries...','lp');?>'/> 239 248 <span class='lp_search_submit lp_btn blue posa'><?php _e('Search');?></span> … … 352 361 <p class='padb30 lpfw800 lpfont1 lpfz30'><?php _e('Add New Entry','lp');?></p> 353 362 363 <p class='data_row tags lp_post_tags_content'> 364 <i class="fas fa-tag"></i> 365 <span class='lp_entry_tags db w100'> 366 <span class='existing_tags lpdfx lpfxdrr lpgap5'> 367 <?php 368 $terms = get_terms('lp_type', array('hide_empty'=>false)); 369 370 $ETD = new LIFEPRESS_Type_Data(); 371 372 echo "<span class='form_tags_in lpdfx lpfxaic lpfxww lpgap5'>"; 373 374 if(!empty($terms) && !is_wp_error($terms)){ 375 ?>{{#if tags}} 376 {{#each tags}} 377 <i class='lp_entry_tag lpfz12 {{#tagSelect fields.tag.n n}}{{/tagSelect}}' data-id='{{@key}}' style='background-color:#{{c}};color:#{{tc}}' data-c='#{{c}}'>{{{n}}}</i> 378 {{/each}} 379 {{/if}} 380 <?php 381 } 382 ?> 383 <span class='create_new_tag_btn lp_btn lp_svg'><i class='fa fa-plus'></i> <?php _e('Create New','lp');?></span> 384 </span> 385 386 387 </span> 388 389 <input type="hidden" name='tag' value='{{#if fields.tag.n}}{{fields.tag.n}}{{else}}General{{/if}}'/> 390 <input type="hidden" name='tag_id' value='{{fields.tag.id}}'/> 391 <input type="hidden" name='tag_color' value='{{#if fields.tag.c}}{{fields.tag.c}}{{else}}808080{{/if}}'/> 392 393 394 <span class='lp_tag_new dn'> 395 <span class='db'> 396 <input class='tags' type="text" placeholder='<?php _e('Tag Name','lp');?>' name='new_tag'> 397 <input class='newtag_c' type="hidden" name='c' value='808080'/> 398 <span class='tag_colors dfx padt5'> 399 <?php 400 $Cc = array( 401 '808080','AD1457', 'D81B60','D50000','E67C73', 402 'F4511E','EF6C00', 'F09300','f6bf26', 403 'e4c441','c0ca33', '7cb342','33b679', 404 '0b8043','009688', '039be5','4285f4', 405 '3f51b5','7986cb', 'b39ddb','9e69af', 406 '8e24aa','795548', '616161','a79b8e', 407 ); 408 409 $allC = $ETD->get_all_colors(); 410 if($allC) $Cc = array_merge($Cc, $allC); 411 $Cc = array_unique($Cc); 412 413 $index = 1; 414 foreach($Cc as $C){ 415 $C = str_replace('#', '', $C); 416 echo "<em class='lp_new_tag_color lp{$index} ". ($C=='808080'?'select':'')."' style='background-color:#". esc_html($C)."' data-c='". esc_attr($C)."'></em>"; 417 $index++; 418 } 419 420 ?> 421 </span> 422 <span class='tag_color_add_new lp_btn blue'><em></em><?php _e('New Color','lp');?></span> 423 <span class='add_new_tag_btn lp_btn orange'><?php _e('Add New Tag','lp');?></span> 424 </span> 425 </span> 426 427 </span> 428 </p> 354 429 <p class='date data_row'> 355 430 <i class="fas fa-clock"></i> … … 397 472 <?php do_action('lifepress_entry_form_mid', $this);?> 398 473 399 <p class='data_row tags'> 400 <i class="fas fa-tag"></i> 401 <span class='lp_entry_tags db w100'> 402 <span class='selected_tag lp_toggles_dn' data-t='existing_tags' style="background-color:#{{#if fields.tag.c}}{{fields.tag.c}}{{else}}808080{{/if}}">{{#if fields.tag.n}}{{fields.tag.n}}{{else}}General{{/if}}</span> 403 <input type="hidden" name='tag' value='{{#if fields.tag.n}}{{fields.tag.n}}{{else}}General{{/if}}'/> 404 <input type="hidden" name='tag_id' value='{{fields.tag.id}}'/> 405 <input type="hidden" name='tag_color' value='{{#if fields.tag.c}}{{fields.tag.c}}{{else}}808080{{/if}}'/> 406 407 <span class='create_new_tag_btn lp_btn blue'><?php _e('Create New','lp');?></span> 408 <?php 409 $terms = get_terms('lp_type', array('hide_empty'=>false)); 410 411 $ETD = new LIFEPRESS_Type_Data(); 412 413 if(!empty($terms) && !is_wp_error($terms)){ 414 echo "<span class='existing_tags dn mart10'><span class='form_tags_in dfx'>"; 415 ?>{{#if tags}} 416 {{#each tags}} 417 <i class='lp_entry_tag' data-id='{{@key}}' style='background-color:#{{c}};color:#{{tc}}' data-c='#{{c}}'>{{{n}}}</i> 418 {{/each}} 419 {{/if}} 420 <?php echo "</span></span>"; 421 } 422 ?> 423 424 <span class='lp_tag_new dn'> 425 <span class='db'> 426 <input class='tags' type="text" placeholder='<?php _e('Tag Name','lp');?>' name='new_tag'> 427 <input type="hidden" name='c' value='808080'/> 428 <span class='tag_colors dfx padt5'> 429 <?php 430 $Cc = array( 431 '808080','AD1457', 'D81B60','D50000','E67C73', 432 'F4511E','EF6C00', 'F09300','f6bf26', 433 'e4c441','c0ca33', '7cb342','33b679', 434 '0b8043','009688', '039be5','4285f4', 435 '3f51b5','7986cb', 'b39ddb','9e69af', 436 '8e24aa','795548', '616161','a79b8e', 437 ); 438 439 $allC = $ETD->get_all_colors(); 440 if($allC) $Cc = array_merge($Cc, $allC); 441 $Cc = array_unique($Cc); 442 443 foreach($Cc as $C){ 444 $C = str_replace('#', '', $C); 445 echo "<em class='lp_new_tag_color ". ($C=='808080'?'select':'')."' style='background-color:#". esc_html($C)."' data-c='". esc_attr($C)."'></em>"; 446 } 447 448 ?> 449 </span> 450 <span class='tag_color_add_new lp_btn blue'><em></em><?php _e('New Color','lp');?></span> 451 </span> 452 </span> 453 454 </span> 455 </p> 474 456 475 <p class="data_row no_icon padt30" style="justify-content: flex-start;"> 457 476 <span class='lp_btn orange form_submit'><?php _e('Submit','lp');?></span> … … 480 499 <?php 481 500 break; 501 502 case 'footer_left': ?> 503 {{#if icon}} 504 <span style="lpdfx"> 505 <svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 506 width="20px" height="20px" viewBox="0 0 47.576 47.576" 507 xml:space="preserve"> 508 <g> 509 <path d="M24.235,12.13c-6.478,0-11.748,5.269-11.748,11.748s5.27,11.747,11.748,11.747s11.748-5.27,11.748-11.747 510 S30.713,12.13,24.235,12.13z M24.235,33.275c-5.182,0-9.398-4.216-9.398-9.397c0-5.183,4.216-9.397,9.398-9.397 511 c5.183,0,9.397,4.217,9.397,9.397C33.632,29.06,29.418,33.275,24.235,33.275z M23.06,6.485V1.589c0-0.649,0.526-1.174,1.175-1.174 512 c0.648,0,1.175,0.525,1.175,1.174v4.896c0,0.648-0.528,1.175-1.175,1.175C23.586,7.66,23.06,7.133,23.06,6.485z M35.095,13.287 513 c-0.459-0.458-0.459-1.202,0-1.661l4.209-4.209c0.459-0.458,1.203-0.458,1.662,0c0.459,0.459,0.459,1.203,0,1.661l-4.209,4.209 514 c-0.229,0.229-0.528,0.344-0.83,0.344C35.627,13.631,35.326,13.516,35.095,13.287z M5.63,9.078c-0.458-0.458-0.458-1.202,0-1.661 515 c0.459-0.458,1.203-0.458,1.661,0l4.21,4.209c0.458,0.459,0.458,1.204,0,1.661c-0.229,0.229-0.53,0.344-0.83,0.344 516 c-0.301,0-0.602-0.115-0.831-0.344L5.63,9.078z M24.472,41.091v4.896c0,0.649-0.525,1.175-1.173,1.175 517 c-0.649,0-1.175-0.527-1.175-1.175v-4.896c0-0.649,0.526-1.176,1.175-1.176C23.947,39.915,24.472,40.441,24.472,41.091z 518 M12.437,34.288c0.459,0.458,0.459,1.202,0,1.661l-4.209,4.21c-0.229,0.23-0.53,0.346-0.831,0.346c-0.3,0-0.601-0.117-0.83-0.346 519 c-0.459-0.458-0.459-1.203,0-1.662l4.209-4.209C11.235,33.829,11.978,33.829,12.437,34.288z M41.902,38.497 520 c0.459,0.459,0.459,1.202,0,1.662c-0.229,0.23-0.527,0.346-0.83,0.346c-0.299,0-0.601-0.117-0.83-0.346l-4.209-4.21 521 c-0.459-0.459-0.459-1.202,0-1.661s1.201-0.459,1.66,0L41.902,38.497z M6.461,25.054H1.175C0.526,25.054,0,24.526,0,23.878 522 s0.526-1.176,1.175-1.176h5.286c0.649,0,1.175,0.527,1.175,1.176C7.635,24.526,7.11,25.052,6.461,25.054z M47.576,23.878 523 c0,0.649-0.526,1.176-1.174,1.176h-6.267c-0.649,0-1.176-0.527-1.176-1.176s0.526-1.176,1.176-1.176h6.267 524 C47.05,22.702,47.576,23.228,47.576,23.878z"/> 525 </g> 526 </svg> 527 </span> 528 {{/if}} 529 530 <p class='lpmar0i lpdfx lpfxdrc'> 531 <b>{{today_daylight}}</b> 532 <?php _e('Daylight today');?> 533 </p> 534 <p class='lpmar0i lpdfx lpfxdrc lpdn_m'>{{{days_till_solar_event}}}</p> 535 {{#if solar_constellation}} 536 <p class='lpmar0i lpdfx lpfxdrc lpdn_m'><b class='lp_tooltip' title='<?php _e('Current Sun Constellation');?>'>{{solar_constellation}}</b><?php _e("Constellation");?></p> 537 {{/if}} 538 <?php 539 break; 540 case 'footer_right': ?> 541 <div class='lpdfx lpfxdrc lpgap5 lpdn_m' style="font-size:14px;"> 542 <b class='lpff_1 lpfz16 lp_tooltip' title='<?php _e('Moon day in lunar cycle','lp');?>'>{{age}} </b> 543 <span class='lpdn '><?php _e('Moon Day');?></span> 544 </div> 545 546 <div class=''> 547 <div class="lpmoon_container"> 548 {{#each phases}} 549 <div class="lp_moonphase"> 550 <div class="lp_moon {{class}}"></div> 551 <div class="lp_label">{{name}}</div> 552 {{#if date}}<div class="date lpfz11">{{date}}</div>{{/if}} 553 </div> 554 {{/each}} 555 </div> 556 <div class='lp_moon_bar'> 557 <em class='lp_moon_bar_on' style="width: {{moon_progress}}%"><b></b></em> 558 </div> 559 </div> 560 561 <?php break; 482 562 } 483 563 -
lifepress/trunk/templates/header.php
r2432078 r3428394 5 5 ?> 6 6 <!DOCTYPE html> 7 <html <?php language_attributes(); ?> style='margin-top: 0!important'>7 <html <?php language_attributes(); ?> style='margin-top:1px!important'> 8 8 <!--<![endif]--> 9 9 <head>
Note: See TracChangeset
for help on using the changeset viewer.