Skip to content

Latest commit

 

History

History
109 lines (94 loc) · 2.71 KB

index.md

File metadata and controls

109 lines (94 loc) · 2.71 KB
layout
default

Recent



# TIL ---

Theory

  • Graphics
  • MultiMedia
  • Network

## Course Work - [MT](javascript:void(0))

Test

  • Opic

Algorithm

  • Key
  • Library
  • Advance
  • PS

Programming

  • HTML5
  • CSS
  • jQuery
  • Node.js
  • Three.js
  • Java
  • Android
  • Python
  • Django
  • Jekyll
  • Markdown

Tool

  • Git
  • Wings3D
  • Blender
  • Illustrator
  • PhotoShop

OS

  • Ubuntu
<script> $('.div_tag').css('float','left'); $('.div_tag:nth-of-type(1)').css('width',$('section').width()*0.4); $('.div_tag:nth-of-type(2)').css('width',$('section').width()*0.6);
showTag("{{ posts.first.tag }}");

    var tags = {}
    {% assign before = "" %}
    {% for post in posts %}
    if(tags["{{post.tag}}"])
            tags["{{post.tag}}"]++;
    else
            tags["{{post.tag}}"]=1;
    {% endfor %}

    var tag_a = document.getElementsByTagName('a');
    var name;
    for(var i=0;i<tag_a.length;i++){
            if((name = tag_a.item(i).innerHTML).indexOf('<') == -1){
            		if(tags[name]){
					tag_a.item(i).innerHTML = name+" ("+tags[name]+")";
				tag_a.item(i).setAttribute('href','javascript:showTag("'+name+'")');
			}
            }
    }

function showTag(name){
	var string_tag = name;
    	var string_html = "<h2>&gt&nbsp;"+string_tag+"</h2><ul>";
   	 	{% for post in posts %}
    	if(string_tag == "{{post.tag}}"){
            	string_html+='<li><a href="{{ post.url }}">{{ post.title }}';
            	string_html+='</a></li>';
    	}
    	{% endfor %}
	string_html+="</ul>";
    
    	$('.div_tag:nth-of-type(2)').html(string_html);
}
</script>