├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE.md ├── Procfile ├── README.md ├── app.rb ├── config.ru ├── fly.toml ├── lib └── Github.rb ├── public ├── avatar_list.json ├── css │ ├── magic │ │ ├── magic.css │ │ ├── magic.min.css │ │ └── magic.styl │ └── style.css ├── font │ ├── ArcadeClassic.otf │ └── TRON.TTF ├── img │ ├── ASSETS.md │ ├── background.gif │ ├── bit │ │ ├── bit.gif │ │ ├── false.gif │ │ └── true.gif │ ├── busted.gif │ ├── characters-extra │ │ ├── castor.gif │ │ ├── derezzed-blue.png │ │ ├── derezzed-red.png │ │ ├── flynn-young.png │ │ ├── infected-program.png │ │ ├── infection.png │ │ ├── logo.png │ │ ├── recognizer.png │ │ └── special-logo.gif │ ├── characters │ │ ├── ada.png │ │ ├── black_guard.png │ │ ├── calchas.png │ │ ├── clu.png │ │ ├── clu2.png │ │ ├── damaged_program.png │ │ ├── data_pusher_new_1.png │ │ ├── data_pusher_new_2.png │ │ ├── data_pusher_old_1.png │ │ ├── data_pusher_old_2.png │ │ ├── data_pusher_old_3.png │ │ ├── dumont.png │ │ ├── dyson.png │ │ ├── flynn.png │ │ ├── flynn_converted.png │ │ ├── giles.png │ │ ├── guard.png │ │ ├── iso_female_1.png │ │ ├── iso_female_3.png │ │ ├── iso_male_1.png │ │ ├── iso_male_2.png │ │ ├── iso_male_3.png │ │ ├── jarvis.png │ │ ├── jet.png │ │ ├── kevin_flynn.png │ │ ├── mcp.gif │ │ ├── old_iso_male.png │ │ ├── ophelia.png │ │ ├── paige.png │ │ ├── perl.png │ │ ├── quorra.png │ │ ├── ram.png │ │ ├── rinzler.png │ │ ├── rinzler_converted.png │ │ ├── sam.png │ │ ├── sark.png │ │ ├── sarks_lieutenant.png │ │ ├── tron.png │ │ ├── tron_uprising.png │ │ ├── yori.png │ │ ├── young_iso_female.png │ │ └── young_iso_male.png │ ├── disk │ │ ├── black-blue.gif │ │ ├── black-red.gif │ │ ├── black-yellow.gif │ │ ├── blue-purple.gif │ │ ├── blue-white-new.gif │ │ ├── blue-white.gif │ │ ├── loading.gif │ │ ├── red-white.gif │ │ └── yellow-white.gif │ └── favicon.ico ├── js │ └── noty │ │ ├── jquery.noty.js │ │ ├── layouts │ │ ├── bottom.js │ │ ├── bottomCenter.js │ │ ├── bottomLeft.js │ │ ├── bottomRight.js │ │ ├── center.js │ │ ├── centerLeft.js │ │ ├── centerRight.js │ │ ├── inline.js │ │ ├── top.js │ │ ├── topCenter.js │ │ ├── topLeft.js │ │ └── topRight.js │ │ ├── packaged │ │ ├── jquery.noty.packaged.js │ │ └── jquery.noty.packaged.min.js │ │ ├── promise.js │ │ └── themes │ │ └── default.js └── sounds │ ├── scherzo.mp3 │ └── scherzo.ogg └── views ├── error.erb ├── error_input.erb ├── error_program.erb ├── error_rage_quit.erb ├── error_rate_limit.erb ├── fight.erb ├── footer.erb ├── index.erb ├── layout.erb ├── layout2.erb └── not_found.erb /.gitignore: -------------------------------------------------------------------------------- 1 | Created by http://www.gitignore.io 2 | 3 | ### OSX ### 4 | .DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must ends with two \r. 9 | Icon 10 | 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear on external disk 16 | .Spotlight-V100 17 | .Trashes 18 | 19 | 20 | ### vim ### 21 | [._]*.s[a-w][a-z] 22 | [._]s[a-w][a-z] 23 | *.un~ 24 | Session.vim 25 | .netrwhist 26 | *~ 27 | 28 | .vscode/ 29 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | ruby "3.2.0" 3 | 4 | gem 'octokit' 5 | gem 'sinatra' 6 | gem 'thin' -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.1) 5 | public_suffix (>= 2.0.2, < 6.0) 6 | daemons (1.4.1) 7 | eventmachine (1.2.7) 8 | faraday (2.6.0) 9 | faraday-net_http (>= 2.0, < 3.1) 10 | ruby2_keywords (>= 0.0.4) 11 | faraday-net_http (3.0.1) 12 | mustermann (3.0.0) 13 | ruby2_keywords (~> 0.0.1) 14 | octokit (6.0.0) 15 | faraday (>= 1, < 3) 16 | sawyer (~> 0.9) 17 | public_suffix (5.0.0) 18 | rack (2.2.6.2) 19 | rack-protection (3.0.4) 20 | rack 21 | ruby2_keywords (0.0.5) 22 | sawyer (0.9.2) 23 | addressable (>= 2.3.5) 24 | faraday (>= 0.17.3, < 3) 25 | sinatra (3.0.4) 26 | mustermann (~> 3.0) 27 | rack (~> 2.2, >= 2.2.4) 28 | rack-protection (= 3.0.4) 29 | tilt (~> 2.0) 30 | thin (1.8.1) 31 | daemons (~> 1.0, >= 1.0.9) 32 | eventmachine (~> 1.0, >= 1.0.4) 33 | rack (>= 1, < 3) 34 | tilt (2.0.11) 35 | 36 | PLATFORMS 37 | arm64-darwin-22 38 | x86_64-darwin-21 39 | x86_64-linux 40 | 41 | DEPENDENCIES 42 | octokit 43 | sinatra 44 | thin 45 | 46 | RUBY VERSION 47 | ruby 3.2.0p0 48 | 49 | BUNDLED WITH 50 | 2.3.11 51 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | This project is not associated with GitHub, [Tron franchise](https://en.wikipedia.org/wiki/Tron_(franchise)) or Disney. 4 | This app is licensed under the MIT terms. However all graphic creations are licensed under a different license. 5 | 6 | See __GITRON Pixel Art__ in ```public/img/``` 7 | 8 | ``` 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2014 GITRON 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in 21 | all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | THE SOFTWARE.THE SOFTWARE. 30 | ``` 31 | 32 | ## Contributing 33 | 34 | 1. Fork it 35 | 2. Create your feature branch (`git checkout -b my-new-feature`) 36 | 3. Commit your changes (`git commit -am 'Add some feature'`) 37 | 4. Push to the branch (`git push origin my-new-feature`) 38 | 5. Create new Pull Request 39 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec rackup config.ru -p $PORT 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | gitron logo 3 |

4 | 5 | # Gitron 6 | 7 | >Greetings, programs! 8 | 9 | Have you ever wondered how your *github repository* would look like on a **TRON grid**? 10 | 11 | ## Description 12 | 13 | This is a web game based on [TRON](http://en.wikipedia.org/wiki/Tron) universe. Every repository on GitHub can be a TRON character *(sam, clu, flynn, tron, etc.)* and can fight against other repositories. 14 | 15 | The score is based on: 16 | 17 | * repository size 18 | * number of releases 19 | * number of contributors 20 | 21 | **issues** instead will be subtracted to the main score of your repository. 22 | The avatar is generated based on your repository **stars**, more stars it gets more important is the character generated :sunglasses: 23 | 24 | Winner is chosen according to the higher score of the two programs fighting. 25 | 26 | Beware the program who loses will be subject to immediate **deresolution**! 27 | 28 | ![sark](https://i.imgur.com/LPZ5XlX.gif) 29 | 30 | ## Achievements 31 | 32 | These are just a few achievements you can unlock in **Gitron**. 33 | 34 | Achievement | Description 35 | ----------- | ----- 36 | THE GRID | Enter The Grid 37 | FOUND ZUSE | Find a way to see Zuse *(the guy with the white hair)* 38 | ISOMORPHIC | Discover and ISO 39 | PURGE | Dereze an ISO 40 | TRON LIVES | Is Tron still alive? 41 | FAITH IN USERS | Dereze the poor Jarvis 42 | BETRAYAL | When Clu 2 derezzed Tron 43 | END OF LINE | Destroy Master Control Program 44 | THE CREATOR | ??? 45 | 46 | ## Assets 47 | 48 | Check out :zap: [THIS](https://github.com/syxanash/gitron/blob/master/public/img/ASSETS.md):zap: page for awesome pixel art! 49 | 50 | ![fight](https://i.imgur.com/vBbmmIh.gif) 51 | 52 | ## Installation 53 | 54 | This app is written in Ruby using Sinatra. 55 | 56 | ``` 57 | gem install octokit 58 | git clone git://github.com/syxanash/gitron 59 | bundle install 60 | ruby app.rb 61 | ``` 62 | 63 | ## See also 64 | 65 | Here listed a few things I used for developing this project. 66 | 67 | * [github-high-scores](https://github.com/leereilly/github-high-scores) by Lee Reilly. I was highly inspired by his work. 68 | * [Sinatra](http://www.sinatrarb.com/) a Ruby web framework 69 | * [noty](https://github.com/needim/noty) jquery notification plugin 70 | * [magic](https://github.com/miniMAC/magic) a couple of very nice CSS3 animations I used 71 | * [github API](https://developer.github.com/v3/) 72 | 73 | ## Bugs & known issues 74 | 75 | * __MCP__ apparently is still alive... 76 | 77 | ## Easter eggs 78 | 79 | :rabbit: 80 | 81 | * look up for the source code if you're interested 82 | 83 | ## About 84 | 85 | This is just a summer project I developed after finishing a few exams for university. I really hope you like it as much as I liked creating it! 86 | 87 | Let's see if your programs are lucky enough to fight for his own user. 88 | 89 | ![clu2](http://media.giphy.com/media/IRSvFo1FIXuTK/giphy.gif) 90 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | require 'json' 3 | require 'base64' 4 | require './lib/Github' 5 | 6 | # Public: github.com API key used in order to have higher rate limit 7 | GITHUB_API_KEY = ENV.fetch('GITHUB_API_KEY') 8 | 9 | COOKIE_NAME = 'ach'.freeze 10 | 11 | set :show_exceptions, false 12 | 13 | before do 14 | # variables used to set various achievements 15 | 16 | @achievements = Array.new 17 | 18 | begin 19 | @github_client = Github.new(GITHUB_API_KEY) 20 | rescue RateLimitError 21 | redirect '/errors/limit' 22 | end 23 | 24 | @achievement_list = { 25 | zuse: 'FOUND ZUSE', 26 | grid: 'THE GRID', 27 | iso: 'ISOMORPHIC', 28 | tron: 'TRON LIVES', 29 | faith: 'FAITH IN USERS', 30 | mcp: 'END OF LINE', 31 | purge: 'PURGE', 32 | betrayal: 'BETRAYAL' 33 | } 34 | 35 | # if all achievements have been unlocked 36 | # set the last achievement 37 | 38 | all_achievements = true 39 | 40 | @achievement_list.values.each do |item| 41 | next if achieved?(item) 42 | all_achievements = false 43 | end 44 | 45 | if all_achievements && !achieved?('THE CREATOR') 46 | @achievements.push('THE CREATOR') 47 | save(@achievements) 48 | end 49 | end 50 | 51 | not_found do 52 | erb :not_found, :layout => :layout2 53 | end 54 | 55 | error do 56 | @error_message = env['sinatra.error'].message 57 | erb :error 58 | end 59 | 60 | get '/errors/limit' do 61 | erb :error_rate_limit 62 | end 63 | 64 | before %r{\/errors\/(input|reponame|ragequit)} do 65 | unless achieved?(@achievement_list[:zuse]) 66 | @achievements.push(@achievement_list[:zuse]) 67 | save(@achievements) 68 | end 69 | end 70 | 71 | get '/errors/input' do 72 | erb :error_input 73 | end 74 | 75 | get '/errors/reponame' do 76 | erb :error_program 77 | end 78 | 79 | get '/errors/ragequit' do 80 | erb :error_rage_quit 81 | end 82 | 83 | before '/*' do 84 | unless achieved?(@achievement_list[:grid]) 85 | @achievements.push(@achievement_list[:grid]) 86 | save(@achievements) 87 | end 88 | end 89 | 90 | get '/' do 91 | if params[:first_repo] && params[:second_repo] 92 | first_name, first_repo = get_github(sanitize_input(params[:first_repo])) 93 | second_name, second_repo = get_github(sanitize_input(params[:second_repo])) 94 | 95 | if first_name && first_repo && second_name && second_repo 96 | redirect "/#{first_name}/#{first_repo}/vs/#{second_name}/#{second_repo}" 97 | else 98 | redirect '/errors/input' 99 | end 100 | else 101 | erb :index 102 | end 103 | end 104 | 105 | get '/:first_name/:first_repo/vs/:second_name/:second_repo/?' do 106 | @players = Array.new 107 | 108 | # parse GET parameters 109 | 110 | first_name, first_repo = params[:first_name], params[:first_repo] 111 | second_name, second_repo = params[:second_name], params[:second_repo] 112 | 113 | # check if user enters the same repo twice 114 | 115 | if first_name == second_name && first_repo == second_repo 116 | redirect '/errors/ragequit' 117 | end 118 | 119 | @players.push(name: first_name, repo: first_repo) 120 | @players.push(name: second_name, repo: second_repo) 121 | 122 | @players.each do |player| 123 | begin 124 | @github_client.set_repository(player[:name], player[:repo]) 125 | 126 | player[:score] = @github_client.score 127 | player[:avatar], player[:disk] = @github_client.generate_avatar 128 | player[:branches], player[:contribs] = @github_client.additional_disk_info 129 | rescue RepoNotFoundError 130 | redirect '/errors/reponame' 131 | end 132 | end 133 | 134 | # compare two scores to choose the higher for winner 135 | # if tie then randomly choose the winner 136 | # the winner is identified by an index between 0 and 1 137 | # this index is used to access to the item in @players 138 | 139 | # @winner_index and @loser_index 140 | # will be also used in views file fight.erb 141 | 142 | if @players[0][:score] > @players[1][:score] 143 | @winner_index = 0 144 | elsif @players[0][:score] < @players[1][:score] 145 | @winner_index = 1 146 | else 147 | @winner_index = Random.rand(2) 148 | end 149 | 150 | # check if new achievements have been unlocked 151 | # okay, the following code block is just pure shit 152 | # I'll update it one day, I swear! 153 | 154 | @loser_index = (@winner_index + 1) % 2 155 | 156 | @players.each_with_index do |player, i| 157 | if i == @winner_index 158 | if (player[:avatar] == 'rinzler.png' || player[:avatar] == 'tron_uprising.png') && 159 | !achieved?(@achievement_list[:tron]) 160 | @achievements.push(@achievement_list[:tron]) 161 | elsif player[:avatar] == 'clu2.png' && 162 | (@players[@loser_index][:avatar] == 'rinzler_converted.png' || 163 | @players[@loser_index][:avatar] == 'tron.png' || 164 | @players[@loser_index][:avatar] == 'tron_uprising.png') && 165 | !achieved?(@achievement_list[:betrayal]) 166 | @achievements.push(@achievement_list[:betrayal]) 167 | end 168 | 169 | # checking ISO avatars (for github members repos) 170 | if iso_avatar?(player[:avatar]) && !achieved?(@achievement_list[:iso]) 171 | @achievements.push(@achievement_list[:iso]) 172 | elsif (!iso_avatar?(player[:avatar]) && 173 | iso_avatar?(@players[@loser_index][:avatar])) && !achieved?(@achievement_list[:purge]) 174 | @achievements.push(@achievement_list[:purge]) 175 | end 176 | else # check loser of the current fight 177 | if player[:avatar] == 'mcp.gif' && !achieved?(@achievement_list[:mcp]) 178 | @achievements.push(@achievement_list[:mcp]) 179 | elsif player[:avatar] == 'jarvis.png' && !achieved?(@achievement_list[:faith]) 180 | @achievements.push(@achievement_list[:faith]) 181 | end 182 | end 183 | end 184 | 185 | # if new achievements have been unlocked save 186 | # the list inside the main cookie 187 | 188 | if @achievements.size != 0 189 | save(@achievements) 190 | end 191 | 192 | # yes, I warned you it was shit... 193 | 194 | erb :fight 195 | end 196 | 197 | get '/avatar/:user/:repository' do 198 | user, repository = params[:user], params[:repository] 199 | 200 | begin 201 | @github_client.set_repository(user, repository) 202 | avatar, disk = @github_client.generate_avatar 203 | 204 | send_file "public/img/characters/#{avatar}" 205 | rescue RepoNotFoundError 206 | send_file "public/img/characters-extra/castor.gif", :type => :gif 207 | end 208 | end 209 | 210 | get '/avatar/disk/:user/:repository' do 211 | user, repository = params[:user], params[:repository] 212 | 213 | begin 214 | @github_client.set_repository(user, repository) 215 | avatar, disk = @github_client.generate_avatar 216 | 217 | send_file "public/img/disk/#{disk}" 218 | rescue RepoNotFoundError 219 | send_file "public/img/characters-extra/castor.gif", :type => :gif 220 | end 221 | end 222 | 223 | helpers do 224 | def bake(key, content, expire = 290_304_000) 225 | response.set_cookie( 226 | key, 227 | value: content, 228 | expires: Time.now + expire, 229 | path: '/' 230 | ) 231 | end 232 | 233 | def save(new_list) 234 | # save the current unlocked achievements list 235 | # and update the list with new achievements 236 | 237 | current_list = fetch 238 | current_list += new_list 239 | 240 | # save the list inside a json array and update the cookie 241 | 242 | json_content = current_list.to_json 243 | bake(COOKIE_NAME, Base64.encode64(json_content)) 244 | end 245 | 246 | def achieved?(achievement) 247 | list = fetch 248 | 249 | list.include?(achievement) 250 | end 251 | 252 | def fetch 253 | achievements = Array.new 254 | 255 | cookie = request.cookies[COOKIE_NAME] 256 | json_array = Base64.decode64(cookie.to_s) 257 | 258 | achievements = JSON.parse(json_array) if json_array != '' 259 | 260 | achievements 261 | end 262 | 263 | def iso_avatar?(avatar) 264 | isos_avatar = %w( 265 | ophelia.png giles.png quorra.png ada.png calchas.png 266 | young_iso_male.png young_iso_female.png old_iso_male.png 267 | iso_female_1.png iso_male_1.png iso_male_2.png 268 | iso_male_3.png iso_female_3.png 269 | ) 270 | 271 | iso_avatar = false 272 | 273 | isos_avatar.each do |iso| 274 | next unless iso == avatar 275 | iso_avatar = true 276 | end 277 | 278 | iso_avatar 279 | end 280 | end 281 | 282 | # Public: Sanitize input from a github url specified via argument. 283 | # Kinldy provided by github.com/leereilly/github-high-scores. 284 | # 285 | # url - url to sanitize 286 | # 287 | # Returns the url sanitized 288 | def sanitize_input(url) 289 | url = url.downcase 290 | 291 | # Special rules for Github URLs starting with 'github.com' 292 | if url[0..9] == 'github.com' 293 | url = 'https://www.github.com' + url[9..url.size] 294 | 295 | # Special rules for Github URLs starting with 'www.github.com' 296 | elsif url[0..13] == 'www.github.com' 297 | url = 'https://www.github.com' + url[13..url.size] 298 | end 299 | 300 | # Special rules for Github URLs ending in 'git' 301 | if url[-4,4] == '.git' 302 | url = url[0..-5] 303 | end 304 | 305 | url = url.gsub('http://', 'https://') 306 | url = url.gsub('git@github.com:', 'https://www.github.com/') 307 | url = url.gsub('git://', 'https://www.') 308 | 309 | # If someone just passes in user/repo e.g. leereilly/leereilly.net 310 | tokens = url.split('/') 311 | if tokens.size == 2 312 | url = "https://www.github.com/#{tokens[0]}/#{tokens[1]}" 313 | end 314 | 315 | url 316 | end 317 | 318 | def get_github(sanitized_github_url) 319 | user = sanitized_github_url.split('/')[3] 320 | repo = sanitized_github_url.split('/')[4] 321 | 322 | return user, repo 323 | end 324 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'bundler' 3 | Bundler.require 4 | require './app' 5 | run Sinatra::Application 6 | -------------------------------------------------------------------------------- /fly.toml: -------------------------------------------------------------------------------- 1 | # fly.toml file generated for gitron on 2022-11-09T16:24:36Z 2 | 3 | app = "gitron" 4 | kill_signal = "SIGINT" 5 | kill_timeout = 5 6 | processes = [] 7 | 8 | [build] 9 | builder = "heroku/buildpacks:20" 10 | 11 | [env] 12 | PORT = "8080" 13 | 14 | [experimental] 15 | allowed_public_ports = [] 16 | auto_rollback = true 17 | 18 | [[services]] 19 | http_checks = [] 20 | internal_port = 8080 21 | processes = ["app"] 22 | protocol = "tcp" 23 | script_checks = [] 24 | [services.concurrency] 25 | hard_limit = 25 26 | soft_limit = 20 27 | type = "connections" 28 | 29 | [[services.ports]] 30 | force_https = true 31 | handlers = ["http"] 32 | port = 80 33 | 34 | [[services.ports]] 35 | handlers = ["tls", "http"] 36 | port = 443 37 | 38 | [[services.tcp_checks]] 39 | grace_period = "1s" 40 | interval = "15s" 41 | restart_limit = 0 42 | timeout = "2s" 43 | -------------------------------------------------------------------------------- /lib/Github.rb: -------------------------------------------------------------------------------- 1 | require 'octokit' 2 | 3 | class RepoNotFoundError < StandardError; end 4 | class RateLimitError < StandardError; end 5 | 6 | # Public: Contains various methods for fetching info from 7 | # Github repos. 8 | class Github 9 | # Public: json file containing avatars file name. 10 | AVATAR_LIST = 'public/avatar_list.json'.freeze 11 | 12 | # array positions for avatar types 13 | OLD_GRID_AVATARS = 0 14 | NEW_GRID_AVATARS = 1 15 | ISOS_AVATARS = 2 16 | 17 | # Public: Initialize github client specifying the API key 18 | # via argument. API key will be used in order to 19 | # have higher rate limit. 20 | # Visit: https://developer.github.com/v3/#rate-limiting 21 | # 22 | # api_key - string of api key provided by github 23 | # 24 | # Returns nothing. 25 | # Raises RateLimitError if github.com API requests reaches limit. 26 | def initialize(api_key) 27 | @client = Octokit::Client.new( 28 | access_token: api_key, 29 | auto_traversal: true, 30 | per_page: 100 31 | ) 32 | 33 | raise RateLimitError, 'rate limit exceeded!' if @client.rate_limit.remaining == 0 34 | end 35 | 36 | # Public: Set a repository to fetch public info from. 37 | # This is mandatory in order to use either score or generate_avatar 38 | # 39 | # owner - repo's owner 40 | # repo - repository name 41 | # 42 | # Returns nothing. 43 | # Raises RepoNotFoundError if repository does not exist on github.com 44 | def set_repository(owner, repo) 45 | @my_repository = "#{owner}/#{repo}" 46 | 47 | unless @client.repository? @my_repository 48 | raise RepoNotFoundError, 'repository does not exist!' 49 | end 50 | 51 | # build repository information 52 | @repo_info = { 53 | size: @client.repository(@my_repository).size, 54 | forks: @client.repository(@my_repository).forks_count, 55 | stars: @client.repository(@my_repository).stargazers_count, 56 | date: @client.repository(@my_repository).created_at, 57 | branches: calc_total(@my_repository, 'branches'), 58 | releases: calc_total(@my_repository, 'releases'), 59 | contribs: calc_total(@my_repository, 'contribs') 60 | } 61 | end 62 | 63 | # Thank you snowe wherever you are! 64 | # https://stackoverflow.com/a/43374518 65 | def calc_total(repo, repo_info) 66 | begin 67 | number_of_items_in_first_page = @client.send(repo_info, repo).size 68 | repo_sum = 0 69 | if number_of_items_in_first_page >= 100 70 | links = @client.last_response.rels 71 | 72 | unless links.empty? 73 | last_page_url = links[:last].href 74 | 75 | /.*page=(?\d+)/ =~ last_page_url 76 | repo_sum += (page_num.to_i - 1) * 100 # we add the last page manually 77 | repo_sum += links[:last].get.data.size 78 | end 79 | else 80 | repo_sum += number_of_items_in_first_page 81 | end 82 | rescue Octokit::Forbidden 83 | # used in rare cases like torvalds/linux 84 | 85 | repo_sum = '∞' 86 | end 87 | 88 | repo_sum 89 | end 90 | 91 | # Public: get branches and number of contributors for a repository 92 | # 93 | # Returns number of branches 94 | # Returns number of contributors 95 | def additional_disk_info 96 | raise "repository hasn't been set!" unless @my_repository 97 | 98 | return @repo_info[:branches], @repo_info[:contribs] 99 | end 100 | 101 | 102 | # Public: Calculate a score from public github repository 103 | # information. 104 | # 105 | # Returns the score calculated. 106 | def score 107 | raise "repository hasn't been set!" unless @my_repository 108 | 109 | issues ||= 0 110 | main_score ||= 0 111 | 112 | if @client.repository(@my_repository).has_issues? 113 | issues = @client.issues(@my_repository).size 114 | end 115 | 116 | # calculate score by adding repository size releases and 117 | # contributors. If contributors number is "infinity" then 118 | # use the forks number instead (thanks torvalds/linux) 119 | 120 | main_score = @repo_info[:size].to_i + 121 | @repo_info[:releases].to_i + 122 | (@repo_info[:contribs] == '∞' ? 123 | @repo_info[:forks].to_i : @repo_info[:contribs].to_i) 124 | 125 | if issues < main_score 126 | main_score -= issues 127 | end 128 | 129 | main_score 130 | end 131 | 132 | # Public: generate avatar based on public repository information. 133 | # Both disk and avatar name are values contained 134 | # in avatar_list.json file. 135 | # 136 | # Returns avatar file name. 137 | # Returns disk gif file name. 138 | def generate_avatar 139 | raise "repository hasn't been set!" unless @my_repository 140 | 141 | json_file_content = File.read(AVATAR_LIST) 142 | avatars = JSON.parse(json_file_content) 143 | 144 | # check if repo owner is github staff 145 | owner = @my_repository.split('/')[0] 146 | github_member = @client.user(owner).company == 'GitHub' 147 | 148 | grid ||= OLD_GRID_AVATARS 149 | 150 | # if github staff use ISOs avatar 151 | 152 | if github_member 153 | grid = ISOS_AVATARS 154 | elsif @repo_info[:date].to_s > '2010-12-29' # :D 155 | grid = NEW_GRID_AVATARS 156 | end 157 | 158 | avatar ||= '' 159 | disk_color ||= '' 160 | 161 | avatars.each do |score, item| 162 | if @repo_info[:stars] >= score.to_i 163 | if item.is_a?(Array) 164 | item[grid].each do |name, disk| 165 | avatar = name 166 | disk_color = disk 167 | end 168 | else 169 | item.each do |name, disk| 170 | avatar = name 171 | disk_color = disk 172 | end 173 | end 174 | 175 | break 176 | end 177 | end 178 | 179 | return avatar, disk_color 180 | end 181 | end 182 | -------------------------------------------------------------------------------- /public/avatar_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "300000": { 3 | "kevin_flynn.png": "black-blue.gif" 4 | }, 5 | 6 | "100000": { 7 | "mcp.gif": "red-white.gif" 8 | }, 9 | 10 | "50000": { 11 | "jet.png": "blue-purple.gif" 12 | }, 13 | 14 | "10000": [ 15 | { "tron.png": "blue-white.gif" }, 16 | { "tron_uprising.png": "blue-white-new.gif" }, 17 | { "ophelia.png": "blue-white-new.gif" } 18 | ], 19 | 20 | "5500": [ 21 | { "sark.png": "red-white.gif" }, 22 | { "clu2.png": "black-yellow.gif" }, 23 | { "giles.png": "black-blue.gif" } 24 | ], 25 | 26 | "5000": [ 27 | { "flynn.png": "blue-white.gif" }, 28 | { "rinzler_converted.png": "black-blue.gif" }, 29 | { "quorra.png": "black-blue.gif" } 30 | ], 31 | 32 | "2500": [ 33 | { "flynn_converted.png": "red-white.gif" }, 34 | { "rinzler.png": "black-red.gif" }, 35 | { "ada.png": "black-blue.gif" } 36 | ], 37 | 38 | "1500": [ 39 | { "clu.png": "yellow-white.gif" }, 40 | { "sam.png": "black-blue.gif" }, 41 | { "calchas.png": "black-blue.gif" } 42 | ], 43 | 44 | "1000": [ 45 | { "yori.png": "blue-white.gif" }, 46 | { "jarvis.png": "black-red.gif" }, 47 | { "young_iso_male.png": "black-blue.gif" } 48 | ], 49 | 50 | "500": [ 51 | { "ram.png": "blue-white.gif" }, 52 | { "dyson.png": "black-red.gif" }, 53 | { "young_iso_female.png": "black-blue.gif" } 54 | ], 55 | 56 | "250": [ 57 | { "sarks_lieutenant.png": "red-white.gif" }, 58 | { "paige.png": "black-red.gif" }, 59 | { "old_iso_male.png": "black-blue.gif" } 60 | ], 61 | 62 | 63 | "200": [ 64 | { "guard.png": "red-white.gif" }, 65 | { "black_guard.png": "black-red.gif" }, 66 | { "iso_female_1.png": "black-blue.gif" } 67 | ], 68 | 69 | "150": [ 70 | { "dumont.png": "blue-white.gif" }, 71 | { "perl.png": "black-blue.gif" }, 72 | { "iso_male_1.png": "black-blue.gif" } 73 | ], 74 | 75 | "100": [ 76 | { "data_pusher_old_1.png": "yellow-white.gif" }, 77 | { "damaged_program.png": "black-blue.gif" }, 78 | { "iso_male_2.png": "black-blue.gif" } 79 | ], 80 | 81 | "50": [ 82 | { "data_pusher_old_2.png": "red-white.gif" }, 83 | { "data_pusher_new_1.png": "black-blue.gif" }, 84 | { "iso_male_3.png": "black-blue.gif" } 85 | ], 86 | 87 | "0": [ 88 | { "data_pusher_old_3.png": "yellow-white.gif" }, 89 | { "data_pusher_new_2.png": "black-blue.gif" }, 90 | { "iso_female_3.png": "black-blue.gif" } 91 | ] 92 | } 93 | -------------------------------------------------------------------------------- /public/css/magic/magic.styl: -------------------------------------------------------------------------------- 1 | // vendor prefixes, thanks Stylus 2 | 3 | //schema of all prefixes 4 | vendor(prop,arguments) 5 | -webkit-{prop} arguments 6 | -moz-{prop} arguments 7 | -ms-{prop} arguments 8 | -o-{prop} arguments 9 | {prop} arguments 10 | 11 | // Propertys and values(arguments) 12 | animation-name() 13 | vendor('animation-name',arguments) 14 | animation-duration() 15 | vendor('animation-duration',arguments) 16 | animation-fill-mode() 17 | vendor('animation-fill-mode',arguments) 18 | transform-origin() 19 | vendor('transform-origin',arguments) 20 | transform() 21 | vendor('transform',arguments) 22 | animation-timing-function() 23 | vendor('animation-timing-function',arguments) 24 | //http://caniuse.com/#feat=css-filters 25 | filter() //This css property is only supported in -webkit- engine for now 26 | -webkit-filter : arguments 27 | backface-visibility() // only Opera not supported 28 | vendor('backface-visibility',arguments) 29 | 30 | // start animations 31 | body 32 | backface-visibility: hidden 33 | 34 | .magictime 35 | animation-duration: 1s 36 | animation-fill-mode: both 37 | 38 | 39 | @keyframes magic 40 | 0% 41 | opacity: 1 42 | transform-origin: 100% 200% 43 | transform: scale(1.0,1.0) rotate(0deg) 44 | 100% 45 | opacity: 0 46 | transform-origin: 200% 500% 47 | transform: scale(0.0,0.0) rotate(270deg) 48 | 49 | 50 | .magic 51 | animation-name: magic 52 | 53 | 54 | @keyframes openDownLeft 55 | 0% 56 | transform-origin: bottom left 57 | transform: rotate(0deg) 58 | animation-timing-function: ease-out 59 | 100% 60 | transform-origin: bottom left 61 | transform: rotate(-110deg) 62 | animation-timing-function: ease-in-out 63 | 64 | 65 | .openDownLeft 66 | animation-name: openDownLeft 67 | 68 | 69 | @keyframes openDownRight 70 | 0% 71 | transform-origin: bottom right 72 | transform: rotate(0deg) 73 | animation-timing-function: ease-out 74 | 100% 75 | transform-origin: bottom right 76 | transform: rotate(110deg) 77 | animation-timing-function: ease-in-out 78 | 79 | 80 | .openDownRight 81 | animation-name: openDownRight 82 | 83 | 84 | @keyframes openUpLeft 85 | 0% 86 | transform-origin: top left 87 | transform: rotate(0deg) 88 | animation-timing-function: ease-out 89 | 100% 90 | transform-origin: top left 91 | transform: rotate(110deg) 92 | animation-timing-function: ease-in-out 93 | 94 | 95 | .openUpLeft 96 | animation-name: openUpLeft 97 | 98 | 99 | @keyframes openUpRight 100 | 0% 101 | transform-origin: top right 102 | transform: rotate(0deg) 103 | animation-timing-function: ease-out 104 | 100% 105 | transform-origin: top right 106 | transform: rotate(-110deg) 107 | animation-timing-function: ease-in-out 108 | 109 | 110 | .openUpRight 111 | animation-name: openUpRight 112 | 113 | 114 | @keyframes openDownLeftReturn 115 | 0% 116 | transform-origin: bottom left 117 | transform: rotate(-110deg) 118 | animation-timing-function: ease-in-out 119 | 100% 120 | transform-origin: bottom left 121 | transform: rotate(0deg) 122 | animation-timing-function: ease-out 123 | 124 | 125 | .openDownLeftReturn 126 | animation-name: openDownLeftReturn 127 | 128 | 129 | @keyframes openDownRightReturn 130 | 0% 131 | transform-origin: bottom right 132 | transform: rotate(110deg) 133 | animation-timing-function: ease-in-out 134 | 100% 135 | transform-origin: bottom right 136 | transform: rotate(0deg) 137 | animation-timing-function: ease-out 138 | 139 | 140 | .openDownRightReturn 141 | animation-name: openDownRightReturn 142 | 143 | 144 | @keyframes openUpLeftReturn 145 | 0% 146 | transform-origin: top left 147 | transform: rotate(110deg) 148 | animation-timing-function: ease-in-out 149 | 100% 150 | transform-origin: top left 151 | transform: rotate(0deg) 152 | animation-timing-function: ease-out 153 | 154 | 155 | .openUpLeftReturn 156 | animation-name: openUpLeftReturn 157 | 158 | 159 | @keyframes openUpRightReturn 160 | 0% 161 | transform-origin: top right 162 | transform: rotate(-110deg) 163 | animation-timing-function: ease-in-out 164 | 100% 165 | transform-origin: top right 166 | transform: rotate(0deg) 167 | animation-timing-function: ease-out 168 | 169 | 170 | .openUpRightReturn 171 | animation-name: openUpRightReturn 172 | 173 | 174 | @keyframes openDownLeftOut 175 | 0% 176 | opacity: 1 177 | transform-origin: bottom left 178 | transform: rotate(0deg) 179 | animation-timing-function: ease-out 180 | 100% 181 | opacity: 0 182 | transform-origin: bottom left 183 | transform: rotate(-110deg) 184 | animation-timing-function: ease-in-o 185 | 186 | 187 | .openDownLeftOut 188 | animation-name: openDownLeftOut 189 | 190 | 191 | @keyframes openDownRightOut 192 | 0% 193 | opacity: 1 194 | transform-origin: bottom right 195 | transform: rotate(0deg) 196 | animation-timing-function: ease-out 197 | 100% 198 | opacity: 0 199 | transform-origin: bottom right 200 | transform: rotate(110deg) 201 | animation-timing-function: ease-in-o 202 | 203 | 204 | .openDownRightOut 205 | animation-name: openDownRightOut 206 | 207 | 208 | @keyframes openUpLeftOut 209 | 0% 210 | opacity: 1 211 | transform-origin: top left 212 | transform: rotate(0deg) 213 | animation-timing-function: ease-out 214 | 100% 215 | opacity: 0 216 | transform-origin: top left 217 | transform: rotate(110deg) 218 | animation-timing-function: ease-in-o 219 | 220 | 221 | .openUpLeftOut 222 | animation-name: openUpLeftOut 223 | 224 | 225 | @keyframes openUpRightOut 226 | 0% 227 | opacity: 1 228 | transform-origin: top right 229 | transform: rotate(0deg) 230 | animation-timing-function: ease-out 231 | 100% 232 | opacity: 0 233 | transform-origin: top right 234 | transform: rotate(-110deg) 235 | animation-timing-function: ease-in-o 236 | 237 | 238 | .openUpRightOut 239 | animation-name: openUpRightOut 240 | 241 | 242 | @keyframes perspectiveDown 243 | 0% 244 | transform-origin: 0 100% 245 | transform: perspective(800px) rotateX(0deg) 246 | 100% 247 | transform-origin: 0 100% 248 | transform: perspective(800px) rotateX(-180deg) 249 | 250 | 251 | .perspectiveDown 252 | backface-visibility: visible !important 253 | animation-name: perspectiveDown 254 | 255 | 256 | @keyframes perspectiveLeft 257 | 0% 258 | transform-origin: 0 0 259 | transform: perspective(800px) rotateY(0deg) 260 | 100% 261 | transform-origin: 0 0 262 | transform: perspective(800px) rotateY(-180deg) 263 | 264 | 265 | .perspectiveLeft 266 | backface-visibility: visible !important 267 | animation-name: perspectiveLeft 268 | 269 | 270 | @keyframes perspectiveRight 271 | 0% 272 | transform-origin: 100% 0 273 | transform: perspective(800px) rotateY(0deg) 274 | 100% 275 | transform-origin: 100% 0 276 | transform: perspective(800px) rotateY(180deg) 277 | 278 | 279 | .perspectiveRight 280 | backface-visibility: visible !important 281 | animation-name: perspectiveRight 282 | 283 | 284 | @keyframes perspectiveUp 285 | 0% 286 | transform-origin: 0 0 287 | transform: perspective(800px) rotateX(0deg) 288 | 100% 289 | transform-origin: 0 0 290 | transform: perspective(800px) rotateX(180deg) 291 | 292 | 293 | .perspectiveUp 294 | backface-visibility: visible !important 295 | animation-name: perspectiveUp 296 | 297 | 298 | @keyframes perspectiveDownReturn 299 | 0% 300 | transform-origin: 0 100% 301 | transform: perspective(800px) rotateX(-180deg) 302 | 100% 303 | transform-origin: 0 100% 304 | transform: perspective(800px) rotateX(0deg) 305 | 306 | 307 | .perspectiveDownReturn 308 | backface-visibility: visible !important 309 | animation-name: perspectiveDownReturn 310 | 311 | 312 | @keyframes perspectiveLeftReturn 313 | 0% 314 | transform-origin: 0 0 315 | transform: perspective(800px) rotateY(-180deg) 316 | 100% 317 | transform-origin: 0 0 318 | transform: perspective(800px) rotateY(0deg) 319 | 320 | 321 | .perspectiveLeftReturn 322 | backface-visibility: visible !important 323 | animation-name: perspectiveLeftReturn 324 | 325 | 326 | @keyframes perspectiveRightReturn 327 | 0% 328 | transform-origin: 100% 0 329 | transform: perspective(800px) rotateY(180deg) 330 | 100% 331 | transform-origin: 100% 0 332 | transform: perspective(800px) rotateY(0deg) 333 | 334 | 335 | .perspectiveRightReturn 336 | backface-visibility: visible !important 337 | animation-name: perspectiveRightReturn 338 | 339 | 340 | @keyframes perspectiveUpReturn 341 | 0% 342 | transform-origin: 0 0 343 | transform: perspective(800px) rotateX(180deg) 344 | 100% 345 | transform-origin: 0 0 346 | transform: perspective(800px) rotateX(0deg) 347 | 348 | 349 | .perspectiveUpReturn 350 | backface-visibility: visible !important 351 | animation-name: perspectiveUpReturn 352 | 353 | 354 | @keyframes puffIn 355 | 0% 356 | opacity: 0 357 | transform-origin: 50% 50% 358 | transform: scale(2.0,2.0) 359 | filter: blur(2px) 360 | 100% 361 | opacity: 1 362 | transform-origin: 50% 50% 363 | transform: scale(1.0,1.0) 364 | 365 | 366 | .puffIn 367 | animation-name: puffIn 368 | 369 | 370 | @keyframes puffOut 371 | 0% 372 | opacity: 1 373 | transform-origin: 50% 50% 374 | transform: scale(1.0,1.0) 375 | 100% 376 | opacity: 0 377 | transform-origin: 50% 50% 378 | transform: scale(2.0,2.0) 379 | filter: blur(2px) 380 | 381 | 382 | .puffOut 383 | animation-name: puffOut 384 | 385 | 386 | @keyframes rotateDown 387 | 0% 388 | transform-origin: 0 0 389 | transform: perspective(800px) rotateX(0deg) translateZ(0px) 390 | 100% 391 | opacity: 0 392 | transform-origin: 50% 100% 393 | transform: perspective(800px) rotateX(-180deg) translateZ(300px) 394 | 395 | 396 | .rotateDown 397 | backface-visibility: visible !important 398 | animation-name: rotateDown 399 | 400 | 401 | @keyframes rotateLeft 402 | 0% 403 | transform-origin: 0 0 404 | transform: perspective(800px) rotateY(0deg) translateZ(0px) 405 | 100% 406 | opacity: 0 407 | transform-origin: 50% 0 408 | transform: perspective(800px) rotateY(180deg) translateZ(300px) 409 | 410 | 411 | .rotateLeft 412 | backface-visibility: visible !important 413 | animation-name: rotateLeft 414 | 415 | 416 | @keyframes rotateRight 417 | 0% 418 | transform-origin: 0 0 419 | transform: perspective(800px) rotateY(0deg) translate3d(0px) 420 | 100% 421 | opacity: 0 422 | transform-origin: 50% 0 423 | transform: perspective(800px) rotateY(-180deg) translateZ(150px) 424 | 425 | 426 | .rotateRight 427 | backface-visibility: visible !important 428 | animation-name: rotateRight 429 | 430 | 431 | @keyframes rotateUp 432 | 0% 433 | transform-origin: 0 0 434 | transform: perspective(800px) rotateX(0deg) translateZ(0px) 435 | 100% 436 | opacity: 0 437 | transform-origin: 50% 0 438 | transform: perspective(800px) rotateX(180deg) translateZ(100px) 439 | 440 | 441 | .rotateUp 442 | backface-visibility: visible !important 443 | animation-name: rotateUp 444 | 445 | 446 | @keyframes slideDown 447 | 0% 448 | transform-origin: 0 0 449 | transform: translateY(0%) 450 | 100% 451 | transform-origin: 0 0 452 | transform: translateY(100%) 453 | 454 | 455 | .slideDown 456 | animation-name: slideDown 457 | 458 | 459 | @keyframes slideLeft 460 | 0% 461 | transform-origin: 0 0 462 | transform: translateX(0%) 463 | 100% 464 | transform-origin: 0 0 465 | transform: translateX(-100%) 466 | 467 | 468 | .slideLeft 469 | animation-name: slideLeft 470 | 471 | 472 | @keyframes slideRight 473 | 0% 474 | transform-origin: 0 0 475 | transform: translateX(0%) 476 | 100% 477 | transform-origin: 0 0 478 | transform: translateX(100%) 479 | 480 | 481 | .slideRight 482 | animation-name: slideRight 483 | 484 | 485 | @keyframes slideUp 486 | 0% 487 | transform-origin: 0 0 488 | transform: translateY(0%) 489 | 100% 490 | transform-origin: 0 0 491 | transform: translateY(-100%) 492 | 493 | 494 | .slideUp 495 | animation-name: slideUp 496 | 497 | 498 | @keyframes slideDownReturn 499 | 0% 500 | transform-origin: 0 0 501 | transform: translateY(100%) 502 | 100% 503 | transform-origin: 0 0 504 | transform: translateY(0%) 505 | 506 | 507 | .slideDownReturn 508 | animation-name: slideDownReturn 509 | 510 | 511 | @keyframes slideLeftReturn 512 | 0% 513 | transform-origin: 0 0 514 | transform: translateX(-100%) 515 | 100% 516 | transform-origin: 0 0 517 | transform: translateX(0%) 518 | 519 | 520 | .slideLeftReturn 521 | animation-name: slideLeftReturn 522 | 523 | 524 | @keyframes slideRightReturn 525 | 0% 526 | transform-origin: 0 0 527 | transform: translateX(100%) 528 | 100% 529 | transform-origin: 0 0 530 | transform: translateX(0%) 531 | 532 | 533 | .slideRightReturn 534 | animation-name: slideRightReturn 535 | 536 | 537 | @keyframes slideUpReturn 538 | 0% 539 | transform-origin: 0 0 540 | transform: translateY(-100%) 541 | 100% 542 | transform-origin: 0 0 543 | transform: translateY(0%) 544 | 545 | 546 | .slideUpReturn 547 | animation-name: slideUpReturn 548 | 549 | 550 | @keyframes swap 551 | 0% 552 | opacity: 0 553 | transform-origin: 0 100% 554 | transform: scale(0.0,0.0) translate(-700px,0px) 555 | 100% 556 | opacity: 1 557 | transform-origin: 100% 100% 558 | transform: scale(1.0,1.0) translate(0px,0px) 559 | 560 | 561 | .swap 562 | animation-name: swap 563 | 564 | 565 | @keyframes twisterInDown 566 | 0% 567 | opacity: 0 568 | transform-origin: 0 100% 569 | transform: scale(0.0,0.0) rotate(360deg) translateY(-100%) 570 | 30% 571 | transform-origin: 0 100% 572 | transform: scale(0.0,0.0) rotate(360deg) translateY(-100%) 573 | 100% 574 | opacity: 1 575 | transform-origin: 100% 100% 576 | transform: scale(1.0,1.0) rotate(0deg) translateY(0%) 577 | 578 | 579 | .twisterInDown 580 | animation-name: twisterInDown 581 | 582 | 583 | @keyframes twisterInUp 584 | 0% 585 | opacity: 0 586 | transform-origin: 100% 0 587 | transform: scale(0.0,0.0) rotate(360deg) translateY(100%) 588 | 30% 589 | transform-origin: 100% 0 590 | transform: scale(0.0,0.0) rotate(360deg) translateY(100%) 591 | 100% 592 | opacity: 1 593 | transform-origin: 0 0 594 | transform: scale(1.0,1.0) rotate(0deg) translateY(0) 595 | 596 | 597 | .twisterInUp 598 | animation-name: twisterInUp 599 | 600 | 601 | @keyframes vanishIn 602 | 0% 603 | opacity: 0 604 | transform-origin: 50% 50% 605 | transform: scale(2.0,2.0) 606 | filter: blur(90px) 607 | 100% 608 | opacity: 1 609 | transform-origin: 50% 50% 610 | transform: scale(1.0,1.0) 611 | 612 | 613 | .vanishIn 614 | animation-name: vanishIn 615 | 616 | 617 | @keyframes vanishOut 618 | 0% 619 | opacity: 1 620 | transform-origin: 50% 50% 621 | transform: scale(1.0,1.0) 622 | 100% 623 | opacity: 0 624 | transform-origin: 50% 50% 625 | transform: scale(2.0,2.0) 626 | filter: blur(20px) 627 | 628 | 629 | .vanishOut 630 | animation-name: vanishOut 631 | 632 | 633 | @keyframes swashOut 634 | 0% 635 | opacity: 1 636 | transform-origin: 50% 50% 637 | transform: scale(1.0,1.0) 638 | 80% 639 | opacity: 1 640 | transform-origin: 50% 50% 641 | transform: scale(0.9,0.9) 642 | 100% 643 | opacity: 0 644 | transform-origin: 50% 50% 645 | transform: scale(0.0,0.0) 646 | 647 | 648 | .swashOut 649 | animation-name: swashOut 650 | 651 | 652 | @keyframes swashIn 653 | 0% 654 | opacity: 0 655 | transform-origin: 50% 50% 656 | transform: scale(0.0,0.0) 657 | 90% 658 | opacity: 1 659 | transform-origin: 50% 50% 660 | transform: scale(0.9,0.9) 661 | 100% 662 | transform-origin: 50% 50% 663 | transform: scale(1.0,1.0) 664 | 665 | 666 | .swashIn 667 | animation-name: swashIn 668 | 669 | 670 | @keyframes foolishOut 671 | 0% 672 | opacity: 1 673 | transform-origin: 50% 50% 674 | transform: scale(1.0,1.0) rotate(360deg) 675 | 20% 676 | opacity: 1 677 | transform-origin: 0% 0% 678 | transform: scale(0.5,0.5) rotate(0deg) 679 | 40% 680 | opacity: 1 681 | transform-origin: 100% 0% 682 | transform: scale(0.5,0.5) rotate(0deg) 683 | 60% 684 | opacity: 1 685 | transform-origin: 100%% 100% 686 | transform: scale(0.5,0.5) rotate(0deg) 687 | 80% 688 | opacity: 1 689 | transform-origin: 0% 100% 690 | transform: scale(0.5,0.5) rotate(0deg) 691 | 100% 692 | opacity: 0 693 | transform-origin: 50% 50% 694 | transform: scale(0.0,0.0) rotate(0deg) 695 | 696 | 697 | .foolishOut 698 | animation-name: foolishOut 699 | 700 | 701 | @keyframes foolishIn 702 | 0% 703 | opacity: 0 704 | transform-origin: 50% 50% 705 | transform: scale(0.0,0.0) rotate(360deg) 706 | 20% 707 | opacity: 1 708 | transform-origin: 0% 100% 709 | transform: scale(0.5,0.5) rotate(0deg) 710 | 40% 711 | opacity: 1 712 | transform-origin: 100% 100% 713 | transform: scale(0.5,0.5) rotate(0deg) 714 | 60% 715 | opacity: 1 716 | transform-origin: 100%% 0% 717 | transform: scale(0.5,0.5) rotate(0deg) 718 | 80% 719 | opacity: 1 720 | transform-origin: 0% 0% 721 | transform: scale(0.5,0.5) rotate(0deg) 722 | 100% 723 | opacity: 1 724 | transform-origin: 50% 50% 725 | transform: scale(1.0,1.0) rotate(0deg) 726 | 727 | 728 | .foolishIn 729 | animation-name: foolishIn 730 | 731 | 732 | @keyframes holeOut 733 | 0% 734 | opacity: 1 735 | transform-origin: 50% 50% 736 | transform: scale(1.0,1.0) rotateY(0deg) 737 | 100% 738 | opacity: 0 739 | transform-origin: 50% 50% 740 | transform: scale(0.0,0.0) rotateY(180deg) 741 | 742 | 743 | .holeOut 744 | animation-name: holeOut 745 | 746 | 747 | @keyframes tinRightOut 748 | 0%, 20%, 40%, 50% 749 | opacity: 1 750 | transform: scale(1.0,1.0) translateX(0) 751 | 10%, 30% 752 | opacity: 1 753 | transform: scale(1.1,1.1) translateX(0) 754 | 100% 755 | opacity: 0 756 | transform: scale(1.0,1.0) translateX(900%) 757 | 758 | 759 | .tinRightOut 760 | animation-name: tinRightOut 761 | 762 | 763 | @keyframes tinLeftOut 764 | 0%, 20%, 40%, 50% 765 | opacity: 1 766 | transform: scale(1.0,1.0) translateX(0) 767 | 10%, 30% 768 | opacity: 1 769 | transform: scale(1.1,1.1) translateX(0) 770 | 100% 771 | opacity: 0 772 | transform: scale(1.0,1.0) translateX(-900%) 773 | 774 | 775 | .tinLeftOut 776 | animation-name: tinLeftOut 777 | 778 | 779 | @keyframes tinUpOut 780 | 0%, 20%, 40%, 50% 781 | opacity: 1 782 | transform: scale(1.0,1.0) translateY(0) 783 | 10%, 30% 784 | opacity: 1 785 | transform: scale(1.1,1.1) translateY(0) 786 | 100% 787 | opacity: 0 788 | transform: scale(1.0,1.0) translateY(-900%) 789 | 790 | 791 | .tinUpOut 792 | animation-name: tinUpOut 793 | 794 | 795 | @keyframes tinDownOut 796 | 0%, 20%, 40%, 50% 797 | opacity: 1 798 | transform: scale(1.0,1.0) translateY(0) 799 | 10%, 30% 800 | opacity: 1 801 | transform: scale(1.1,1.1) translateY(0) 802 | 100% 803 | opacity: 0 804 | transform: scale(1.0,1.0) translateY(900%) 805 | 806 | 807 | .tinDownOut 808 | animation-name: tinDownOut 809 | 810 | 811 | @keyframes tinRightIn 812 | 0% 813 | opacity: 0 814 | transform: scale(1.0,1.0) translateX(900%) 815 | 50%, 70%, 90% 816 | opacity: 1 817 | transform: scale(1.1,1.1) translateX(0) 818 | 60%, 80%, 100% 819 | opacity: 1 820 | transform: scale(1.0,1.0) translateX(0) 821 | 822 | 823 | .tinRightIn 824 | animation-name: tinRightIn 825 | 826 | 827 | @keyframes tinLeftIn 828 | 0% 829 | opacity: 0 830 | transform: scale(1.0,1.0) translateX(-900%) 831 | 50%, 70%, 90% 832 | opacity: 1 833 | transform: scale(1.1,1.1) translateX(0) 834 | 60%, 80%, 100% 835 | opacity: 1 836 | transform: scale(1.0,1.0) translateX(0) 837 | 838 | 839 | .tinLeftIn 840 | animation-name: tinLeftIn 841 | 842 | 843 | @keyframes tinUpIn 844 | 0% 845 | opacity: 0 846 | transform: scale(1.0,1.0) translateY(-900%) 847 | 50%, 70%, 90% 848 | opacity: 1 849 | transform: scale(1.1,1.1) translateY(0) 850 | 60%, 80%, 100% 851 | opacity: 1 852 | transform: scale(1.0,1.0) translateY(0) 853 | 854 | 855 | .tinUpIn 856 | animation-name: tinUpIn 857 | 858 | 859 | @keyframes tinDownIn 860 | 0% 861 | opacity: 0 862 | transform: scale(1.0,1.0) translateY(900%) 863 | 50%, 70%, 90% 864 | opacity: 1 865 | transform: scale(1.1,1.1) translateY(0) 866 | 60%, 80%, 100% 867 | opacity: 1 868 | transform: scale(1.0,1.0) translateY(0) 869 | 870 | 871 | .tinDownIn 872 | animation-name: tinDownIn 873 | 874 | 875 | @keyframes bombRightOut 876 | 0% 877 | opacity: 1 878 | transform-origin: 50% 50% 879 | transform: rotate(0deg) 880 | filter: blur(0px) 881 | 50% 882 | opacity: 1 883 | transform-origin: 200% 50% 884 | transform: rotate(160deg) 885 | filter: blur(0px) 886 | 100% 887 | opacity: 0 888 | transform-origin: 200% 50% 889 | transform: rotate(160deg) 890 | filter: blur(20px) 891 | 892 | 893 | .bombRightOut 894 | animation-name: bombRightOut 895 | 896 | 897 | @keyframes bombLeftOut 898 | 0% 899 | opacity: 1 900 | transform-origin: 50% 50% 901 | transform: rotate(0deg) 902 | filter: blur(0px) 903 | 50% 904 | opacity: 1 905 | transform-origin: -100% 50% 906 | transform: rotate(-160deg) 907 | filter: blur(0px) 908 | 100% 909 | opacity: 0 910 | transform-origin: -100% 50% 911 | transform: rotate(-160deg) 912 | filter: blur(20px) 913 | 914 | .bombLeftOut 915 | animation-name: bombLeftOut 916 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "ArcadeClassic"; 3 | src: url("/font/ArcadeClassic.otf") format("opentype"); 4 | } 5 | 6 | @font-face { 7 | font-family: "TRON"; 8 | src: url("/font/TRON.TTF") format("truetype"); 9 | } 10 | 11 | /* Standard Elements */ 12 | 13 | html, 14 | body { 15 | margin: 0; 16 | padding: 0; 17 | height: 100%; 18 | } 19 | 20 | /* Body content */ 21 | 22 | body { 23 | font-family: "ArcadeClassic"; 24 | font-size: 20px; 25 | letter-spacing: 2px; 26 | word-spacing: 0.5em; 27 | color: white; 28 | 29 | background-image: url("/img/background.gif"); 30 | } 31 | 32 | /* comments colors */ 33 | 34 | #comments { 35 | color: #00ff00; 36 | } 37 | 38 | /* logo */ 39 | 40 | #logo { 41 | font-family: "TRON"; 42 | font-size: 30px; 43 | color: white; 44 | padding-top: 5px; 45 | padding-bottom: 30px; 46 | } 47 | 48 | /* mascot (the real image displayed in homepage) */ 49 | 50 | #mascot { 51 | padding-bottom: 20px; 52 | } 53 | 54 | /* container */ 55 | 56 | #container { 57 | min-height: 100%; 58 | position: relative; 59 | } 60 | 61 | /* content */ 62 | 63 | #content { 64 | text-align: center; 65 | 66 | padding: 10px; 67 | 68 | /* 69 | change the following value if footer 70 | goes over page content, for example "fight" button 71 | */ 72 | 73 | padding-bottom: 170px; 74 | } 75 | 76 | /* message box */ 77 | 78 | #message_box { 79 | padding-left: 10px; 80 | padding-right: 10px; 81 | } 82 | 83 | /* button menu */ 84 | 85 | #button_menu { 86 | padding-bottom: 20px; 87 | } 88 | 89 | #button_menu a { 90 | text-decoration: none; 91 | } 92 | 93 | /* style of buttons */ 94 | 95 | .button_link { 96 | padding: 5px 10px; 97 | background: #1d3069; 98 | color: #FFF; 99 | 100 | border: solid 2px #ffd220; 101 | 102 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); 103 | 104 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); 105 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); 106 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); 107 | } 108 | 109 | .button_link a { 110 | color: white; 111 | text-decoration: none; 112 | } 113 | 114 | .button_link:hover { 115 | background: #395fcf; 116 | text-decoration: none; 117 | } 118 | 119 | .button_link:active { 120 | -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6); 121 | -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6); 122 | box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6); 123 | 124 | background: #15234d; 125 | } 126 | 127 | /* text input */ 128 | 129 | input { 130 | color: #ffd220; 131 | font-family: ArcadeClassic; 132 | /* font-weight: bold; */ 133 | font-size: 24px; 134 | 135 | border: 2px solid #54d8ef; 136 | 137 | background-color: #192a44; 138 | } 139 | 140 | /* place holder for the input box */ 141 | 142 | ::-webkit-input-placeholder { /* WebKit, Blink, Edge */ 143 | color: #51533b; 144 | } 145 | :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 146 | color: #51533b; 147 | opacity: 1; 148 | } 149 | ::-moz-placeholder { /* Mozilla Firefox 19+ */ 150 | color: #51533b; 151 | opacity: 1; 152 | } 153 | :-ms-input-placeholder { /* Internet Explorer 10-11 */ 154 | color: #51533b; 155 | } 156 | :placeholder-shown { /* Standard (https://drafts.csswg.org/selectors-4/#placeholder) */ 157 | color: #51533b; 158 | } 159 | 160 | /* info_box */ 161 | 162 | #info_box { 163 | background-color: #192a44; 164 | color: white; 165 | border: 5px solid #ffd220; 166 | 167 | padding: 5px; 168 | 169 | clear: both; 170 | } 171 | 172 | #info_box a { 173 | text-decoration: none; 174 | color: #54d8ef; 175 | } 176 | 177 | #info_box a:hover { 178 | text-decoration: underline; 179 | } 180 | 181 | /* achievement box */ 182 | 183 | #achieve_box { 184 | background-color: #192a44; 185 | color: white; 186 | border: 5px solid #ffd220; 187 | 188 | padding: 5px; 189 | 190 | text-align: center; 191 | clear: both; 192 | } 193 | 194 | /* footer */ 195 | 196 | #footer { 197 | width: 100%; 198 | position: absolute; 199 | bottom: 0; 200 | left: 0; 201 | 202 | background-color: #192a44; 203 | color: white; 204 | 205 | border-top: 5px solid #ffd220; 206 | 207 | text-align: center; 208 | } 209 | 210 | #footer a { 211 | color: #54d8ef; 212 | text-decoration: none; 213 | } 214 | 215 | #footer a:hover { 216 | text-decoration: underline; 217 | } 218 | 219 | /* style for buttons placed in footer */ 220 | 221 | #footer .button_link { 222 | color: white; 223 | } 224 | 225 | #footer .button_link:hover { 226 | text-decoration: none; 227 | } 228 | -------------------------------------------------------------------------------- /public/font/ArcadeClassic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/font/ArcadeClassic.otf -------------------------------------------------------------------------------- /public/font/TRON.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/font/TRON.TTF -------------------------------------------------------------------------------- /public/img/ASSETS.md: -------------------------------------------------------------------------------- 1 | # GITRON Pixel Art 2 | 3 | Here are a few pixel art I draw for Gitron web app.
4 | To find out more about the characters checkout the [Tron Wiki](https://tron.fandom.com/wiki/Tron_Wiki) 5 | 6 | # Avatar API 7 | 8 | If you'd like to see your own GitHub repository as a Tron character just query these endpoints: 9 | 10 | ``` 11 | https://gitron.fly.dev/avatar/:github_username/:github_repository_name 12 | 13 | https://gitron.fly.dev/avatar/disk/:github_username/:github_repository_name 14 | ``` 15 | 16 | Example: http://gitron.fly.dev/avatar/syxanash/gitron 17 | 18 | ## Fighting Characters 19 | 20 | Old grid programs | New grid programs | ISOs 21 | ------------------|-------------------|----- 22 | data pusher old | data pusher new | iso female 23 | ![](characters/data_pusher_old_3.png) | ![](characters/data_pusher_new_2.png) | ![](characters/iso_female_3.png) 24 | data pusher old | data pusher new | iso male 25 | ![](characters/data_pusher_old_2.png) | ![](characters/data_pusher_new_1.png) | ![](characters/iso_male_3.png) 26 | data pusher old | damaged program | iso male 27 | ![](characters/data_pusher_old_1.png) | ![](characters/damaged_program.png) | ![](characters/iso_male_2.png) 28 | Dumont | Perl | iso male 29 | ![](characters/dumont.png) | ![](characters/perl.png) | ![](characters/iso_male_1.png) 30 | Guard | Black Guard | iso female 31 | ![](characters/guard.png) | ![](characters/black_guard.png) | ![](characters/iso_female_1.png) 32 | Sark's Lieutenant | Paige | old iso male 33 | ![](characters/sarks_lieutenant.png) | ![](characters/paige.png) | ![](characters/old_iso_male.png) 34 | Ram | Dyson | young iso female 35 | ![](characters/ram.png) | ![](characters/dyson.png) | ![](characters/young_iso_female.png) 36 | Yori | Jarvis | young iso male 37 | ![](characters/yori.png) | ![](characters/jarvis.png) | ![](characters/young_iso_male.png) 38 | Clu 1.0 | Sam Flynn | Calchas 39 | ![](characters/clu.png) | ![](characters/sam.png) | ![](characters/calchas.png) 40 | Kevin Flynn (red) | Rinzler (red) | Ada 41 | ![](characters/flynn_converted.png) | ![](characters/rinzler.png) | ![](characters/ada.png) 42 | Kevin Flynn (blue) | Rinzler (blue) | Quorra 43 | ![](characters/flynn.png) | ![](characters/rinzler_converted.png) | ![](characters/quorra.png) 44 | Sark | Clu 2.0 | Giles 45 | ![](characters/sark.png) | ![](characters/clu2.png) | ![](characters/giles.png) 46 | Tron | Tron (Uprising) | Ophelia (Radia) 47 | ![](characters/tron.png) | ![](characters/tron_uprising.png) | ![](characters/ophelia.png) 48 | 49 | ## Special Fighting Characters 50 | 51 | Tron 2.0 | Tron (1982) | Tron: Legacy 52 | ---------|-------------|------------- 53 | Jet Bradley | Master Control Program | Kevin Flynn 54 | ![](characters/jet.png) | ![](characters/mcp.gif) | ![](characters/kevin_flynn.png) 55 | 56 | ## Identity disc 57 | 58 | New grid | Old grid | Special 59 | ---------|----------|-------- 60 | ![](disk/black-blue.gif) | ![](disk/blue-white.gif) | ![](disk/blue-white-new.gif) 61 | ![](disk/black-red.gif) | ![](disk/red-white.gif) | ![](disk/blue-purple.gif) 62 | ![](disk/black-yellow.gif) | ![](disk/yellow-white.gif)| 63 | 64 | ## BIT 65 | 66 | Steady | False | true 67 | -------|-------|----- 68 | ![](bit/bit.gif) | ![](bit/false.gif) | ![](bit/true.gif) 69 | 70 | ## Other Characters 71 | 72 | Castor| Flynn | Infection 73 | ------|-------|---------- 74 | ![](characters-extra/castor.gif) | ![](characters-extra/flynn-young.png) | ![](characters-extra/infected-program.png) ![](characters-extra/infection.png) 75 | 76 | ## Logo 77 | 78 | Recognizer | Logo 1 | Logo 2 | Loading 79 | -----------|--------|--------|-------- 80 | ![](characters-extra/recognizer.png) | ![](characters-extra/logo.png) | ![](characters-extra/special-logo.gif) | ![](disk/loading.gif) 81 | 82 | ## License 83 | 84 | All rights reserved for images and assets inside `./img/` directory. 85 | 86 | _don't you dare making an NFT out of these! :)_ 87 | -------------------------------------------------------------------------------- /public/img/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/background.gif -------------------------------------------------------------------------------- /public/img/bit/bit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/bit/bit.gif -------------------------------------------------------------------------------- /public/img/bit/false.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/bit/false.gif -------------------------------------------------------------------------------- /public/img/bit/true.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/bit/true.gif -------------------------------------------------------------------------------- /public/img/busted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/busted.gif -------------------------------------------------------------------------------- /public/img/characters-extra/castor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/castor.gif -------------------------------------------------------------------------------- /public/img/characters-extra/derezzed-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/derezzed-blue.png -------------------------------------------------------------------------------- /public/img/characters-extra/derezzed-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/derezzed-red.png -------------------------------------------------------------------------------- /public/img/characters-extra/flynn-young.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/flynn-young.png -------------------------------------------------------------------------------- /public/img/characters-extra/infected-program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/infected-program.png -------------------------------------------------------------------------------- /public/img/characters-extra/infection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/infection.png -------------------------------------------------------------------------------- /public/img/characters-extra/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/logo.png -------------------------------------------------------------------------------- /public/img/characters-extra/recognizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/recognizer.png -------------------------------------------------------------------------------- /public/img/characters-extra/special-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters-extra/special-logo.gif -------------------------------------------------------------------------------- /public/img/characters/ada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/ada.png -------------------------------------------------------------------------------- /public/img/characters/black_guard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/black_guard.png -------------------------------------------------------------------------------- /public/img/characters/calchas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/calchas.png -------------------------------------------------------------------------------- /public/img/characters/clu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/clu.png -------------------------------------------------------------------------------- /public/img/characters/clu2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/clu2.png -------------------------------------------------------------------------------- /public/img/characters/damaged_program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/damaged_program.png -------------------------------------------------------------------------------- /public/img/characters/data_pusher_new_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/data_pusher_new_1.png -------------------------------------------------------------------------------- /public/img/characters/data_pusher_new_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/data_pusher_new_2.png -------------------------------------------------------------------------------- /public/img/characters/data_pusher_old_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/data_pusher_old_1.png -------------------------------------------------------------------------------- /public/img/characters/data_pusher_old_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/data_pusher_old_2.png -------------------------------------------------------------------------------- /public/img/characters/data_pusher_old_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/data_pusher_old_3.png -------------------------------------------------------------------------------- /public/img/characters/dumont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/dumont.png -------------------------------------------------------------------------------- /public/img/characters/dyson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/dyson.png -------------------------------------------------------------------------------- /public/img/characters/flynn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/flynn.png -------------------------------------------------------------------------------- /public/img/characters/flynn_converted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/flynn_converted.png -------------------------------------------------------------------------------- /public/img/characters/giles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/giles.png -------------------------------------------------------------------------------- /public/img/characters/guard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/guard.png -------------------------------------------------------------------------------- /public/img/characters/iso_female_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/iso_female_1.png -------------------------------------------------------------------------------- /public/img/characters/iso_female_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/iso_female_3.png -------------------------------------------------------------------------------- /public/img/characters/iso_male_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/iso_male_1.png -------------------------------------------------------------------------------- /public/img/characters/iso_male_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/iso_male_2.png -------------------------------------------------------------------------------- /public/img/characters/iso_male_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/iso_male_3.png -------------------------------------------------------------------------------- /public/img/characters/jarvis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/jarvis.png -------------------------------------------------------------------------------- /public/img/characters/jet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/jet.png -------------------------------------------------------------------------------- /public/img/characters/kevin_flynn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/kevin_flynn.png -------------------------------------------------------------------------------- /public/img/characters/mcp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/mcp.gif -------------------------------------------------------------------------------- /public/img/characters/old_iso_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/old_iso_male.png -------------------------------------------------------------------------------- /public/img/characters/ophelia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/ophelia.png -------------------------------------------------------------------------------- /public/img/characters/paige.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/paige.png -------------------------------------------------------------------------------- /public/img/characters/perl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/perl.png -------------------------------------------------------------------------------- /public/img/characters/quorra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/quorra.png -------------------------------------------------------------------------------- /public/img/characters/ram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/ram.png -------------------------------------------------------------------------------- /public/img/characters/rinzler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/rinzler.png -------------------------------------------------------------------------------- /public/img/characters/rinzler_converted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/rinzler_converted.png -------------------------------------------------------------------------------- /public/img/characters/sam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/sam.png -------------------------------------------------------------------------------- /public/img/characters/sark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/sark.png -------------------------------------------------------------------------------- /public/img/characters/sarks_lieutenant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/sarks_lieutenant.png -------------------------------------------------------------------------------- /public/img/characters/tron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/tron.png -------------------------------------------------------------------------------- /public/img/characters/tron_uprising.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/tron_uprising.png -------------------------------------------------------------------------------- /public/img/characters/yori.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/yori.png -------------------------------------------------------------------------------- /public/img/characters/young_iso_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/young_iso_female.png -------------------------------------------------------------------------------- /public/img/characters/young_iso_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/characters/young_iso_male.png -------------------------------------------------------------------------------- /public/img/disk/black-blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/black-blue.gif -------------------------------------------------------------------------------- /public/img/disk/black-red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/black-red.gif -------------------------------------------------------------------------------- /public/img/disk/black-yellow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/black-yellow.gif -------------------------------------------------------------------------------- /public/img/disk/blue-purple.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/blue-purple.gif -------------------------------------------------------------------------------- /public/img/disk/blue-white-new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/blue-white-new.gif -------------------------------------------------------------------------------- /public/img/disk/blue-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/blue-white.gif -------------------------------------------------------------------------------- /public/img/disk/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/loading.gif -------------------------------------------------------------------------------- /public/img/disk/red-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/red-white.gif -------------------------------------------------------------------------------- /public/img/disk/yellow-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/disk/yellow-white.gif -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syxanash/gitron/3b806066a8a4b0855dbc5d91c12b5979317042ad/public/img/favicon.ico -------------------------------------------------------------------------------- /public/js/noty/jquery.noty.js: -------------------------------------------------------------------------------- 1 | /** 2 | * noty - jQuery Notification Plugin v2.2.2 3 | * Contributors: https://github.com/needim/noty/graphs/contributors 4 | * 5 | * Examples and Documentation - http://needim.github.com/noty/ 6 | * 7 | * Licensed under the MIT licenses: 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | **/ 11 | 12 | if (typeof Object.create !== 'function') { 13 | Object.create = function (o) { 14 | function F() { 15 | } 16 | 17 | F.prototype = o; 18 | return new F(); 19 | }; 20 | } 21 | 22 | (function ($) { 23 | 24 | var NotyObject = { 25 | 26 | init:function (options) { 27 | 28 | // Mix in the passed in options with the default options 29 | this.options = $.extend({}, $.noty.defaults, options); 30 | 31 | this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout]; 32 | 33 | if ($.noty.themes[this.options.theme]) 34 | this.options.theme = $.noty.themes[this.options.theme]; 35 | else 36 | options.themeClassName = this.options.theme; 37 | 38 | delete options.layout; 39 | delete options.theme; 40 | 41 | this.options = $.extend({}, this.options, this.options.layout.options); 42 | this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random() * 1000000)); 43 | 44 | this.options = $.extend({}, this.options, options); 45 | 46 | // Build the noty dom initial structure 47 | this._build(); 48 | 49 | // return this so we can chain/use the bridge with less code. 50 | return this; 51 | }, // end init 52 | 53 | _build:function () { 54 | 55 | // Generating noty bar 56 | var $bar = $('
').attr('id', this.options.id); 57 | $bar.append(this.options.template).find('.noty_text').html(this.options.text); 58 | 59 | this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar; 60 | 61 | if (this.options.themeClassName) 62 | this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type); 63 | 64 | // Set buttons if available 65 | if (this.options.buttons) { 66 | 67 | // If we have button disable closeWith & timeout options 68 | this.options.closeWith = []; 69 | this.options.timeout = false; 70 | 71 | var $buttons = $('
').addClass('noty_buttons'); 72 | 73 | (this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons); 74 | 75 | var self = this; 76 | 77 | $.each(this.options.buttons, function (i, button) { 78 | var $button = $('