All Projects → fossasia → Loklak Webtweets

fossasia / Loklak Webtweets

FOSSASIA Tweets with loklak http://fossasia.github.io/loklak-webtweets/

Labels

Projects that are alternatives of or similar to Loklak Webtweets

Less Plugin Glob
Globbing support for LESS
Stars: ✭ 70 (-94.85%)
Mutual labels:  less
Opentechsummit.eu
OpenTechSummit Europe https://opentechsummit.eu
Stars: ✭ 1,240 (-8.69%)
Mutual labels:  less
Postcss Less
PostCSS Syntax for parsing LESS
Stars: ✭ 93 (-93.15%)
Mutual labels:  less
Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Stars: ✭ 9,350 (+588.51%)
Mutual labels:  less
Flow Ui
Flow-UI is a highly customizable UI framework based Seajs/jQuery。
Stars: ✭ 79 (-94.18%)
Mutual labels:  less
Hexo Theme Noise
A hexo theme
Stars: ✭ 84 (-93.81%)
Mutual labels:  less
Govicons
🇺🇸 US Government themed icons and CSS toolkit
Stars: ✭ 60 (-95.58%)
Mutual labels:  less
Nixos Homepage
Sources for nixos.org
Stars: ✭ 97 (-92.86%)
Mutual labels:  less
Cessie
Transpile your CSS bundle to support CSS variables, calc, and future CSS for legacy browsers.
Stars: ✭ 81 (-94.04%)
Mutual labels:  less
Techcul.org
UNESCO TechCul Program https://techcul.org
Stars: ✭ 1,296 (-4.57%)
Mutual labels:  less
React Antd Multi Tabs Admin
ts+react+antd-多页签后台模板(纯净版,非 antd pro!)
Stars: ✭ 73 (-94.62%)
Mutual labels:  less
Moo Css
模块化面向对象的css写法规范策略。适用于大中小型C端项目样式开发,旨在提高开发和维护效率。
Stars: ✭ 79 (-94.18%)
Mutual labels:  less
Puzzle Tokens
Batch create, manage and update Sketch styles and symbols using SCSS/LESS
Stars: ✭ 90 (-93.37%)
Mutual labels:  less
Qgis Website
QGIS-Website
Stars: ✭ 71 (-94.77%)
Mutual labels:  less
Eless
A Better 'less' - A bash script that loads emacs with minimal view-mode config - Created with Org mode
Stars: ✭ 94 (-93.08%)
Mutual labels:  less
Ghosttheme Stockholm
👻 📝 ✨ Clean Ghost theme with advanced features & customization.
Stars: ✭ 67 (-95.07%)
Mutual labels:  less
Vertical Rhythm
Put some typographical vertical rhythm in your CSS. LESS, Stylus and SCSS/SASS versions included.
Stars: ✭ 83 (-93.89%)
Mutual labels:  less
Luci Theme Argon
Argon is a clean HTML5 theme for OpenWrt LuCI. Users may setup their own favorite logins, including beautiful pics and customized mp4 videos.
Stars: ✭ 1,351 (-0.52%)
Mutual labels:  less
Redux Cnode
react+react-router+redux+es6+antd-mobile+webpack版本的Cnode
Stars: ✭ 96 (-92.93%)
Mutual labels:  less
Vue Lottery
🎨 抽奖以及截屏保存图片至本地
Stars: ✭ 90 (-93.37%)
Mutual labels:  less

loklak webtweets

FOSSASIA Tweets with loklak: Implement Webtweets with loklak

Objective of the mini project

Implement web tweets with loklak and substitute the implementation with twitter. Improve former implementations and reduce dependencies on additional files in repositories as much as possible. Make use of anonymous loklak API at http://api.loklak.org

Requirements

Expected Outcome

  • substitution of twitter implementation with loklak and accepted pull request
  • improvement of implementation e.g. possibility to call API with several hashtags, search term, specific accounts, time limit etc.

Links

Directions

  • To change the number of tweets being recycled, change the data-count attribute in the HTML of the div with class "tweets-feed". To change the query, change the data-query attribute to preference.
  • To require specific users and hashtags to be in the tweets, add a @ or # sign in front of the word, respectively. Separate each word by a space.
  • To require the tweet to be in a timeframe of days, add the attributes below to the "tweets-feed class":
data-start='YYYY-MM-DD' 
data-end='YYYY-MM-DD'
  • To filter out tweets from one user, add the data-from attribute.

An example of the attributes:
<div class="tweets-feed" id="tweets" data-count=50 data-query="fossasia #googlecodein" data-start="2015-12-08" data-end="2016-01-14" data-from="fossasia">

Client-side Tweets control

You can allow your viewers to control the tweets div in compliance to the controls detailed above by doing the following modifications:

Add the following to the end of index.html file, just before the closing `

tag:
  <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Loklak Settings</h4>
        </div>
        <div class="modal-body">
          <div class="form-group">
              <label for="query">Query:</label>
              <input class="form-control" value="fossasia #gci" id="query">
            </div>
            <div class="form-group">
              <label for="result-count">Results Count:</label>
              <input class="form-control" value="50" id="result-count">
            </div>
            <div class="form-group">
              <label for="tweet-from">Tweets From:</label>
              <input class="form-control" value="" id="tweet-from">
            </div>
            <div class="form-group">
              <label for="tweet-from-date">Tweet From Date:</label>
              <input class="form-control" value="2016-01-01" type="date" id="tweet-from-date">
            </div>
            <div class="form-group">
              <label for="tweet-to-date">Tweet To Date:</label>
              <input class="form-control" value="2016-01-18" type="date" id="tweet-to-date">
            </div>
        </div>
        <div class="modal-footer">
          <button type="button" id="submit-btn" class="btn btn-default" data-dismiss="modal">Submit</button>
        </div>
      </div>
      
    </div>
  </div>
  <script type="text/javascript">
  	$('#submit-btn').click(function(e){
  		var from = $('#tweet-from-date');
		var to = $('#tweet-to-date');
  		var date1 = new Date(from[0].value);
		var date2 = new Date(to[0].value);
		var timeDiff = Math.abs(date2.getTime() - date1.getTime());
		var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); 
		if (diffDays < 5){
			alert('Kindly provide a difference of more than 4 days between the two dates.')
		} else {
  			$('#tweets').attr('data-query', $('#query')[0].value);
  			$('#tweets').attr('data-start', $('#tweet-from-date')[0].value);
  			$('#tweets').attr('data-end', $('#tweet-to-date')[0].value);
  			$('#tweets').attr('data-from', $('#tweet-from')[0].value);
  			console.log($('#tweets').data());
  			clearInterval(interval_id);
  			$('#tweet')[0].innerHTML = 'Loading...';
  			$('#tweet-info')[0].innerHTML = 'Fetching tweets...';
  			datafetcher();
  		}
  	})
  </script>

And replace the following line:

<i class="icon social_twitter text-white"></i>

with this:

<a class="twitter-logo" data-toggle="modal" ><i class="icon social_twitter text-white"></i></a>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].