{"id":46446,"date":"2017-02-27T15:47:45","date_gmt":"2017-02-27T10:17:45","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=46446"},"modified":"2017-03-06T12:49:41","modified_gmt":"2017-03-06T07:19:41","slug":"how-to-make-a-progress-scheduler","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/how-to-make-a-progress-scheduler\/","title":{"rendered":"How to Make a Progress Scheduler?"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Have you heard about Progress Schedulers? You might have often seen Progress Schedulers on websites and applications these days. These schedulers can display a whole lot of information in a sleek and confined way. They can be\u00a0seen\u00a0as schedulers to depict a day\u2019s schedule and as status tracking systems like tracking packages on e-commerce sites.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Let us have a look on how to develop a responsive scheduler using <a title=\"frontend development services\" href=\"http:\/\/www.tothenew.com\/front-end-angularjs-development\">HTML\/CSS<\/a>.\u00a0<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46457 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-300x297.png\" alt=\"snap6\" width=\"300\" height=\"297\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-300x297.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-150x150.png 150w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6.png 416w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>1. Mobile-first approach:<\/strong><\/p>\n<p>Let us first understand making scheduler with a <a title=\"mobile first approach\" href=\"http:\/\/insights.tothenew.com\/top-considerations-for-a-mobile-first-approach\">mobile-first approach<\/a>. The most important and basic thing\u00a0is\u00a0<em>HTML structure<\/em> for a scheduler is outlined\u00a0below:<\/p>\n<p>[js]<br \/>\n&lt;ul class=&quot;scheduler&quot;&gt;<br \/>\n\t&lt;li class=&quot;scheduler-block&quot;&gt;<br \/>\n\t\t&lt;div class=&quot;scheduler-bullet&quot;&gt;&lt;\/div&gt;<br \/>\n\t\t&lt;div class=&quot;scheduler-content&quot;&gt;<br \/>\n            &lt;h3&gt; Breakfast &lt;\/h3&gt;<br \/>\n            &lt;span&gt; 8:00-9:00 &lt;\/span&gt;<br \/>\n        &lt;\/div&gt;<br \/>\n\t&lt;\/li&gt;<br \/>\n&lt;\/ul&gt;<br \/>\n[\/js]<\/p>\n<p>Once the basic step is accomplished, provide\u00a0styling\u00a0to\u00a0a <em style=\"font-weight: 400\">bullet<\/em> which is a simple circle:<\/p>\n<p>[js]<\/p>\n<p>.scheduler-bullet {<br \/>\n\twidth: 20px;<br \/>\n\theight: 20px;<br \/>\n\tborder-radius: 50%;<br \/>\n\tborder: 2px solid grey;<br \/>\n}<\/p>\n<p>[\/js]<\/p>\n<p><span style=\"font-weight: 400\">Consequently, the<em>\u00a0progress bar or vertical line<\/em>\u00a0will notify how much progress has been made. An\u00a0<em>after element<\/em> with scheduler block has been used to position the progress line. <\/span><\/p>\n<p>[js]<br \/>\n.scheduler-block:after {<br \/>\n\tcontent:&quot;&quot;;<br \/>\n\twidth: 2px;<br \/>\n    height: 30px;<br \/>\n\tposition: absolute;<br \/>\n\ttop: 24px;<br \/>\n \tleft: 11px;<br \/>\n\tbackground: grey;<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><strong><span style=\"font-weight: 400\">You must remember to make scheduler-block class non-statically (<em>relative<\/em> in this case) positioned, as the after block is positioned absolutely. Make <em>bullet<\/em> to <em>float left<\/em> and <em>content<\/em> to display as <em>inline-block<\/em> to align them side by side.<\/span><\/strong><\/p>\n<p>[js]<br \/>\n.scheduler-content {<br \/>\n\tdisplay:inline-block;<br \/>\n\tmargin-left:10px;<br \/>\n}<\/p>\n<p>.scheduler-bullet {<br \/>\n\tfloat: left;<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><strong><span style=\"font-weight: 400\">The first element is thus all set.<\/span><\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46452 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap1.png\" alt=\"snap1\" width=\"139\" height=\"60\" \/><\/p>\n<p><strong><span style=\"font-weight: 400\">Repeat the li elements to get a full day scheduler\u00a0and add a little <em>bottom margin<\/em> to <em>scheduler block<\/em> and <em>hide the line below last element<\/em>.<\/span><\/strong><\/p>\n<p>[js]<br \/>\n.scheduler-block {<br \/>\n\u00a0\u00a0\u00a0\u00a0position: relative;<br \/>\n\tmargin-bottom: 12px;<br \/>\n}<\/p>\n<p>.scheduler-block:last-child:after{<br \/>\n\tdisplay: none;<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><strong><span style=\"font-weight: 400\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46453 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap2-162x300.png\" alt=\"snap2\" width=\"162\" height=\"300\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap2-162x300.png 162w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap2.png 225w\" sizes=\"(max-width: 162px) 100vw, 162px\" \/><\/span><\/strong><\/p>\n<p><strong>2. Desktop View<\/strong><\/p>\n<p>There are some tweaks required for its desktop view. You need to use a media query for desktop, say,\u00a0min-width 768px. Once accomplished,\u00a0centralize bullets and progress lines.<\/p>\n<p><strong><span style=\"font-weight: 400\">Bullet will position at 50% from the left and progress line would need some extra space so that it can be placed at the center of the circle. Hence, add 11px of space ( 10px-half of circle\u2019s width + 1px-half of circle\u2019s border width).<\/span><\/strong><\/p>\n<p>[js]<br \/>\n.scheduler-bullet {<br \/>\n\tposition: absolute;<br \/>\n\tleft: 50%;<br \/>\n}<\/p>\n<p>.scheduler-block:after {<br \/>\n\tposition: absolute;<br \/>\n\tleft: calc(50% + 11px);<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><strong><span style=\"font-weight: 400\">Subsequently, position the content by moving it towards the\u00a0center first.\u00a0<\/span><\/strong><\/p>\n<p>[js]<br \/>\n.scheduler-content {<br \/>\n\twidth: 45%;<br \/>\n\ttext-align: right;<br \/>\n}<br \/>\n[\/js]<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46454 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap3-300x247.png\" alt=\"snap3\" width=\"300\" height=\"247\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap3-300x247.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap3.png 537w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Move the timings\u2019 span to the\u00a0right-hand side. Now,\u00a0<em>position it absolutely to 55%+10px (50% + 10px: circle\u2019s width + 5%: for the gap).<\/em><\/p>\n<p>[js]<br \/>\n.scheduler-content span {<br \/>\n\tposition: absolute;<br \/>\n\twidth: 100%;<br \/>\n\tdisplay: inline-block;<br \/>\n\ttext-align: left;<br \/>\n\ttop: 2px;<br \/>\n\tleft: calc(55% + 10px);<br \/>\n}<br \/>\n[\/js]<\/p>\n<p>It will be displayed as:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46455 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap4-300x188.png\" alt=\"snap4\" width=\"300\" height=\"188\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap4-300x188.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap4.png 468w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong><span style=\"font-weight: 400\">This, however, has reduced the height of the content block. There are margins available, but their measures will have to be determined by a hit and trial method. In this case, it is <em>30px<\/em>. <\/span><\/strong><\/p>\n<p><strong><span style=\"font-weight: 400\">Lastly, a\u00a0<em>bottom margin to scheduler-block<\/em>\u00a0is applied.<\/span><\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46456 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap5-300x222.png\" alt=\"snap5\" width=\"300\" height=\"222\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap5-300x222.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap5.png 562w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The progress of the\u00a0scheduler\u00a0can be shown by adding an <em>active<\/em> class to the scheduler-block and styling its content as follows:<\/p>\n<p>[js]<br \/>\n.active .scheduler-bullet {<br \/>\n\tbackground-color: green;<br \/>\n\tborder-color: green;<br \/>\n}<\/p>\n<p>.active:after {<br \/>\n\tbackground-color: green;<br \/>\n}<br \/>\n[\/js]<\/p>\n<p>An\u00a0active class is added to the scheduler. Thus,\u00a0the number of completed and upcoming tasks on a day&#8217;s schedule can\u00a0be tracked.\u00a0You can add\/remove<em>\u00a0active class with the help of Javascript\/jQuery<\/em>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46457 alignleft\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-300x297.png\" alt=\"snap6\" width=\"300\" height=\"297\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-300x297.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6-150x150.png 150w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/snap6.png 416w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Hope you are able to make progress scheduler with this post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you heard about Progress Schedulers? You might have often seen Progress Schedulers on websites and applications these days. These schedulers can display a whole lot of information in a sleek and confined way. They can be\u00a0seen\u00a0as schedulers to depict a day\u2019s schedule and as status tracking systems like tracking packages on e-commerce sites. Let [&hellip;]<\/p>\n","protected":false},"author":964,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[3429,1],"tags":[245,4118,4842,55,4455,379],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46446"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/964"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=46446"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46446\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=46446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=46446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=46446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}