Xin chào tất cả các bạn hôm nay mình xin hướng dẫn các bạn tạo tiện ích thống kê đẹp mắt cho blogger cực đơn giản toàn bộ code mình lấy bên toishare về để edit lại và chia sẽ cho các bạn mong các bạn ủng hộ blog.
HƯỚNG DẪN CÁCH LÀM:
Bước 1: Để tạo widget này các bạn vào Bố cục -> Thêm tiện ích -> Kéo xuống dưới chọn Thống kê blog và chọn kiểu 1 nhéBước 2: Tìm đoạn id='Stats1' và thay toàn bộ widget của id='Stats1' thành đoạn code bên dưới
<b:widget id='Stats1'locked='false' title=''type='Stats' version='1'> <b:widget-settings> <b:widget-settingname='showGraphicalCounter'>false</b:widget-setting> <b:widget-settingname='showAnimatedCounter'>false</b:widget-setting> <b:widget-settingname='showSparkline'>false</b:widget-setting> <b:widget-settingname='sparklineStyle'>BLACK_TRANSPARENT</b:widget-setting> <b:widget-settingname='timeRange'>ALL_TIME</b:widget-setting> </b:widget-settings> <b:includableid='main'> <b:ifcond='data:title != ""'><h2><data:title/></h2></b:if> <divclass='widget-content'> <!-- Add the bg color to the header using any of the bg-* classes --> <divclass='aubout-admin'> <div class='user1'> <ahref='https://plus.google.com/u/0/114190850184370024491'rel='nofollow' target='_blank'title='Lê Bá Long Blog'> <imgalt='Việt Blogger'src='https://i.imgur.com/KVGfn7v.jpg'/> <span class='verified-user-icon'> <svgfocusable='false' viewBox='0 0 24 24'xmlns='http://www.w3.org/2000/svg'> <path d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z'/> </svg> </span> </a></div> <!-- /.widget-user-image --> <div class='admin-1'> <h3class='admin-username'>Lê Quang Thìn</h3> <h5class='admin-desc'><iclass='far fa-gem'/> Designer and Developer <i class='far fa-gem'/></h5> </div> </div> <!-- Content is going to be visible when data will be fetched from server. --> <divexpr:id='data:widget.instanceId + "_content"'style='display: none;'> <!-- Counter and image will be injected later via AJAX call. --> <b:ifcond='data:showSparkline'> <img alt='Sparkline'expr:id='data:widget.instanceId + "_sparkline"'height='30' width='75'/> </b:if> <spanexpr:class='"counter-wrapper " + (data:showGraphicalCounter ? "graph-counter-wrapper" : "text-counter-wrapper")'><aexpr:id='data:widget.instanceId + "_totalCount"'/></span> <b:includename='quickedit'/> </div> </div><scripttype='text/javascript'> function postCount(json){ document.write("<spanclass='counts post2'> Tổng bài viết "); var count = json.feed.openSearch$totalResults.$t; document.write("<spanclass='count all-posts'>" + count + "</span>"); document.write("</span>") } functionnumberOfComments(json){ document.write("<spanclass='counts comment2'>Tổng nhận xét "); var count = json.feed.openSearch$totalResults.$t; document.write("<spanclass='count all-comments'>" + count + "</span>"); document.write("</span>") } </script><scriptsrc='/feeds/posts/default?alt=json-in-script&max-results=0&callback=postCount'type='text/javascript'/><scriptsrc='/feeds/comments/default?alt=json-in-script&max-results=0&callback=numberOfComments'/></b:includable> </b:widget>
Bước 3: Tìm đoạn ]]></b:skin> và dán toàn bộ đoạn css bên dưới lên nó nhé
#Stats1{border:0!important;box-shadow:0 1px 1pxrgba(0,0,0,.1);border-radius:3px}#Stats1 .widget-content{padding:0!important}.aubout-admin{background-color:#464646;color:
Lưu ý: Nếu không hiện số lượng truy cập blog bạn chỉ cần sửa <!--</body>--> </body> thành </body> là được
Subscribe Our Newsletter
0 Response to "Tiện ích thống kê cho blogger"
Đăng nhận xét