Browse Source

Adds project toggling by tags

Abhinav Sarkar 4 months ago
parent
commit
957085a6d9
3 changed files with 72 additions and 45 deletions
  1. 2
    1
      css/projects.scss
  2. 24
    0
      js/projects.js
  3. 46
    44
      projects.md

+ 2
- 1
css/projects.scss View File

@@ -1,10 +1,11 @@
1 1
 @import "default";
2 2
 
3
-dd em {
3
+dt em {
4 4
   font-style: normal;
5 5
   background: #e6e6fa;
6 6
   padding: 0.1em 0.3em;
7 7
   border-radius: 0.3em;
8 8
   font-size: 0.75em;
9 9
   font-family: "Noto Serif",georgia,serif;
10
+  cursor: pointer;
10 11
 }

+ 24
- 0
js/projects.js View File

@@ -0,0 +1,24 @@
1
+(function() {
2
+  function addHandler() {
3
+    if (typeof jQuery !== 'undefined') {
4
+      var hidden = false;
5
+      jQuery("dt em").on("click", function() {
6
+        if (hidden) {
7
+          jQuery("dt, dd").fadeIn();
8
+          hidden = false;
9
+        } else {
10
+          var tag = jQuery(this).text();
11
+          var dts = jQuery("dt em:not(:contains('" + tag + "'))").parent()
12
+                    .not(jQuery("dt em:contains('" + tag + "')").parent());
13
+          dts.fadeOut();
14
+          dts.next("dd").fadeOut();
15
+          hidden = true;
16
+        }
17
+      });
18
+    } else {
19
+      window.setTimeout(addHandler, 1000);
20
+    }
21
+  }
22
+
23
+  addHandler();
24
+}());

+ 46
- 44
projects.md View File

@@ -4,71 +4,73 @@ page_type: projects
4 4
 ---
5 5
 # Projects
6 6
 
7
-[abhin4v.github.io]
8
-: The source for this website [abhinavsarkar.net] _haskell_
7
+[abhin4v.github.io] _haskell_
8
+: The source for this website [abhinavsarkar.net]
9 9
 
10
-[precis]
11
-: A minimal note taking app build over Github Pages _bash_
10
+[precis] _bash_
11
+: A minimal note taking app build over Github Pages
12 12
 
13
-[hastatic]
14
-: A tiny static content web server for Docker _haskell_ _docker_
13
+[hastatic] _haskell_ _docker_
14
+: A tiny static content web server for Docker
15 15
 
16
-[ringo]
17
-: A tool to transform OLTP database schemas to OLAP database schemas _haskell_
16
+[ringo]  _haskell_
17
+: A tool to transform OLTP database schemas to OLAP database schemas
18 18
 
19
-[purescript-amqp]
20
-: An AMQP client _purescript_
19
+[purescript-amqp]  _purescript_
20
+: An AMQP client
21 21
 
22
-[purescript-metrics]
23
-: A metrics library _purescript_
22
+[purescript-metrics]  _purescript_
23
+: A metrics library
24 24
 
25
-[hircarra]
26
-: An easy to use and extensible library to write IRC bots _haskell_
25
+[hircarra]  _haskell_
26
+: An easy to use and extensible library to write IRC bots
27 27
 
28
-[hasdoku]
29
-: A fast sudoku solver _haskell_
28
+[hasdoku]  _haskell_
29
+: A fast sudoku solver
30 30
 
31
-[link]
32
-: A simple multi-threaded chat server _haskell_
31
+[link]  _haskell_
32
+: A simple multi-threaded chat server
33 33
 
34
-[space]
35
-: The setup files for my VPS _docker_
34
+[space]  _docker_
35
+: The setup files for my VPS
36 36
 
37
-[frpong]
38
-: Gravity Pong: A Pong game in browser with a twist _clojurescript_
37
+[frpong]  _clojurescript_
38
+: Gravity Pong: A Pong game in browser with a twist
39 39
 
40
-[hs-json-parser]
41
-: A simple JSON parser written from scratch _haskell_
40
+[hs-json-parser]  _haskell_
41
+: A simple JSON parser written from scratch
42 42
 
43
-[rubyquiz]
44
-: Programming problems from [rubyquiz.com] _haskell_
43
+[rubyquiz]  _haskell_
44
+: Programming problems from [rubyquiz.com]
45 45
 
46
-[aoc18]
47
-: Solutions for [adventofcode.com/2018] _haskell_
46
+[aoc18]  _haskell_
47
+: Solutions for [adventofcode.com/2018]
48 48
 
49
-[algorist]
50
-: Solutions for the exercises in the book "The Algorithm Design Manual" _java_
49
+[algorist]  _java_
50
+: Solutions for the exercises in the book "The Algorithm Design Manual"
51 51
 
52
-[russell-norvig-ai-problems]
53
-: Solutions of problems from the "AI - A modern approach" book _haskell_
52
+[russell-norvig-ai-problems]  _haskell_
53
+: Solutions of problems from the "AI - A modern approach" book
54 54
 
55
-[digg-sidebar]
56
-: A Firefox extension to shows the Digg stories in real time in sidebar _firefox_
55
+[digg-sidebar]  _firefox_
56
+: A Firefox extension to shows the Digg stories in real time in sidebar
57 57
 
58
-[clj_twitter_feelings]
59
-: Shows how people on twitter are feeling, in real-time _clojure_
58
+[clj_twitter_feelings] _clojure_
59
+: Shows how people on twitter are feeling, in real-time
60 60
 
61
-[irc-search-bot]
62
-: An IRC search bot _clojure_
61
+[irc-search-bot] _clojure_
62
+: An IRC search bot
63 63
 
64
-[irc-search]
65
-: A search engine for IRC logs based on Lucene _scala_
64
+[irc-search] _scala_
65
+: A search engine for IRC logs based on Lucene
66 66
 
67
-[marvin]
68
-: An IRC Zeitgeist bot in _clojure_
67
+[marvin] _clojure_
68
+: An IRC Zeitgeist bot
69 69
 
70
-[python-lastfm]
71
-: An interface to the last.fm web services API _python_
70
+[python-lastfm] _python_
71
+: An interface to the last.fm web services API
72
+
73
+<script src="/js/projects.js"></script>
72 74
 
73 75
 [abhin4v.github.io]: https://github.com/abhin4v/abhin4v.github.io
74 76
 [hastatic]: https://github.com/abhin4v/hastatic

Loading…
Cancel
Save