Initial pass
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
_site/
|
_site
|
||||||
.sass-cache/
|
.sass-cache
|
||||||
.jekyll-metadata
|
.jekyll-metadata
|
||||||
|
.bundle
|
||||||
|
node_modules
|
||||||
|
|||||||
24
404.html
Normal file
24
404.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
.container {
|
||||||
|
margin: 10px auto;
|
||||||
|
max-width: 600px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin: 30px 0;
|
||||||
|
font-size: 4em;
|
||||||
|
line-height: 1;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>404</h1>
|
||||||
|
|
||||||
|
<p><strong>Page not found :(</strong></p>
|
||||||
|
<p>The requested page could not be found.</p>
|
||||||
|
</div>
|
||||||
2
Gemfile
Normal file
2
Gemfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
gem 'github-pages', group: :jekyll_plugins
|
||||||
203
Gemfile.lock
Normal file
203
Gemfile.lock
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
activesupport (4.2.8)
|
||||||
|
i18n (~> 0.7)
|
||||||
|
minitest (~> 5.1)
|
||||||
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
|
tzinfo (~> 1.1)
|
||||||
|
addressable (2.5.1)
|
||||||
|
public_suffix (~> 2.0, >= 2.0.2)
|
||||||
|
coffee-script (2.4.1)
|
||||||
|
coffee-script-source
|
||||||
|
execjs
|
||||||
|
coffee-script-source (1.12.2)
|
||||||
|
colorator (1.1.0)
|
||||||
|
ethon (0.10.1)
|
||||||
|
ffi (>= 1.3.0)
|
||||||
|
execjs (2.7.0)
|
||||||
|
faraday (0.12.2)
|
||||||
|
multipart-post (>= 1.2, < 3)
|
||||||
|
ffi (1.9.18)
|
||||||
|
forwardable-extended (2.6.0)
|
||||||
|
gemoji (3.0.0)
|
||||||
|
github-pages (148)
|
||||||
|
activesupport (= 4.2.8)
|
||||||
|
github-pages-health-check (= 1.3.5)
|
||||||
|
jekyll (= 3.5.1)
|
||||||
|
jekyll-avatar (= 0.4.2)
|
||||||
|
jekyll-coffeescript (= 1.0.1)
|
||||||
|
jekyll-default-layout (= 0.1.4)
|
||||||
|
jekyll-feed (= 0.9.2)
|
||||||
|
jekyll-gist (= 1.4.1)
|
||||||
|
jekyll-github-metadata (= 2.6.0)
|
||||||
|
jekyll-mentions (= 1.2.0)
|
||||||
|
jekyll-optional-front-matter (= 0.2.0)
|
||||||
|
jekyll-paginate (= 1.1.0)
|
||||||
|
jekyll-readme-index (= 0.1.0)
|
||||||
|
jekyll-redirect-from (= 0.12.1)
|
||||||
|
jekyll-relative-links (= 0.4.1)
|
||||||
|
jekyll-sass-converter (= 1.5.0)
|
||||||
|
jekyll-seo-tag (= 2.2.3)
|
||||||
|
jekyll-sitemap (= 1.0.0)
|
||||||
|
jekyll-swiss (= 0.4.0)
|
||||||
|
jekyll-theme-architect (= 0.0.4)
|
||||||
|
jekyll-theme-cayman (= 0.0.4)
|
||||||
|
jekyll-theme-dinky (= 0.0.4)
|
||||||
|
jekyll-theme-hacker (= 0.0.4)
|
||||||
|
jekyll-theme-leap-day (= 0.0.4)
|
||||||
|
jekyll-theme-merlot (= 0.0.4)
|
||||||
|
jekyll-theme-midnight (= 0.0.4)
|
||||||
|
jekyll-theme-minimal (= 0.0.4)
|
||||||
|
jekyll-theme-modernist (= 0.0.4)
|
||||||
|
jekyll-theme-primer (= 0.3.1)
|
||||||
|
jekyll-theme-slate (= 0.0.4)
|
||||||
|
jekyll-theme-tactile (= 0.0.4)
|
||||||
|
jekyll-theme-time-machine (= 0.0.4)
|
||||||
|
jekyll-titles-from-headings (= 0.3.0)
|
||||||
|
jemoji (= 0.8.0)
|
||||||
|
kramdown (= 1.13.2)
|
||||||
|
liquid (= 4.0.0)
|
||||||
|
listen (= 3.0.6)
|
||||||
|
mercenary (~> 0.3)
|
||||||
|
minima (= 2.1.1)
|
||||||
|
rouge (= 1.11.1)
|
||||||
|
terminal-table (~> 1.4)
|
||||||
|
github-pages-health-check (1.3.5)
|
||||||
|
addressable (~> 2.3)
|
||||||
|
net-dns (~> 0.8)
|
||||||
|
octokit (~> 4.0)
|
||||||
|
public_suffix (~> 2.0)
|
||||||
|
typhoeus (~> 0.7)
|
||||||
|
html-pipeline (2.6.0)
|
||||||
|
activesupport (>= 2)
|
||||||
|
nokogiri (>= 1.4)
|
||||||
|
i18n (0.8.6)
|
||||||
|
jekyll (3.5.1)
|
||||||
|
addressable (~> 2.4)
|
||||||
|
colorator (~> 1.0)
|
||||||
|
jekyll-sass-converter (~> 1.0)
|
||||||
|
jekyll-watch (~> 1.1)
|
||||||
|
kramdown (~> 1.3)
|
||||||
|
liquid (~> 4.0)
|
||||||
|
mercenary (~> 0.3.3)
|
||||||
|
pathutil (~> 0.9)
|
||||||
|
rouge (~> 1.7)
|
||||||
|
safe_yaml (~> 1.0)
|
||||||
|
jekyll-avatar (0.4.2)
|
||||||
|
jekyll (~> 3.0)
|
||||||
|
jekyll-coffeescript (1.0.1)
|
||||||
|
coffee-script (~> 2.2)
|
||||||
|
jekyll-default-layout (0.1.4)
|
||||||
|
jekyll (~> 3.0)
|
||||||
|
jekyll-feed (0.9.2)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-gist (1.4.1)
|
||||||
|
octokit (~> 4.2)
|
||||||
|
jekyll-github-metadata (2.6.0)
|
||||||
|
jekyll (~> 3.1)
|
||||||
|
octokit (~> 4.0, != 4.4.0)
|
||||||
|
jekyll-mentions (1.2.0)
|
||||||
|
activesupport (~> 4.0)
|
||||||
|
html-pipeline (~> 2.3)
|
||||||
|
jekyll (~> 3.0)
|
||||||
|
jekyll-optional-front-matter (0.2.0)
|
||||||
|
jekyll (~> 3.0)
|
||||||
|
jekyll-paginate (1.1.0)
|
||||||
|
jekyll-readme-index (0.1.0)
|
||||||
|
jekyll (~> 3.0)
|
||||||
|
jekyll-redirect-from (0.12.1)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-relative-links (0.4.1)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-sass-converter (1.5.0)
|
||||||
|
sass (~> 3.4)
|
||||||
|
jekyll-seo-tag (2.2.3)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-sitemap (1.0.0)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-swiss (0.4.0)
|
||||||
|
jekyll-theme-architect (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-cayman (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-dinky (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-hacker (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-leap-day (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-merlot (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-midnight (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-minimal (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-modernist (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-primer (0.3.1)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-slate (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-tactile (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-theme-time-machine (0.0.4)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-titles-from-headings (0.3.0)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
jekyll-watch (1.5.0)
|
||||||
|
listen (~> 3.0, < 3.1)
|
||||||
|
jemoji (0.8.0)
|
||||||
|
activesupport (~> 4.0)
|
||||||
|
gemoji (~> 3.0)
|
||||||
|
html-pipeline (~> 2.2)
|
||||||
|
jekyll (>= 3.0)
|
||||||
|
kramdown (1.13.2)
|
||||||
|
liquid (4.0.0)
|
||||||
|
listen (3.0.6)
|
||||||
|
rb-fsevent (>= 0.9.3)
|
||||||
|
rb-inotify (>= 0.9.7)
|
||||||
|
mercenary (0.3.6)
|
||||||
|
mini_portile2 (2.2.0)
|
||||||
|
minima (2.1.1)
|
||||||
|
jekyll (~> 3.3)
|
||||||
|
minitest (5.10.3)
|
||||||
|
multipart-post (2.0.0)
|
||||||
|
net-dns (0.8.0)
|
||||||
|
nokogiri (1.8.0)
|
||||||
|
mini_portile2 (~> 2.2.0)
|
||||||
|
octokit (4.7.0)
|
||||||
|
sawyer (~> 0.8.0, >= 0.5.3)
|
||||||
|
pathutil (0.14.0)
|
||||||
|
forwardable-extended (~> 2.6)
|
||||||
|
public_suffix (2.0.5)
|
||||||
|
rb-fsevent (0.10.2)
|
||||||
|
rb-inotify (0.9.10)
|
||||||
|
ffi (>= 0.5.0, < 2)
|
||||||
|
rouge (1.11.1)
|
||||||
|
safe_yaml (1.0.4)
|
||||||
|
sass (3.5.1)
|
||||||
|
sass-listen (~> 4.0.0)
|
||||||
|
sass-listen (4.0.0)
|
||||||
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
sawyer (0.8.1)
|
||||||
|
addressable (>= 2.3.5, < 2.6)
|
||||||
|
faraday (~> 0.8, < 1.0)
|
||||||
|
terminal-table (1.8.0)
|
||||||
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||||
|
thread_safe (0.3.6)
|
||||||
|
typhoeus (0.8.0)
|
||||||
|
ethon (>= 0.8.0)
|
||||||
|
tzinfo (1.2.3)
|
||||||
|
thread_safe (~> 0.1)
|
||||||
|
unicode-display_width (1.3.0)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
github-pages
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.15.3
|
||||||
22
_config.yml
Normal file
22
_config.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
title: Madison Scott-Clary
|
||||||
|
email: makyo@drab-makyo.com
|
||||||
|
description: >
|
||||||
|
Writing projects by Madison Scott-Clary
|
||||||
|
baseurl: ""
|
||||||
|
url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
|
twitter_username: jekyllrb
|
||||||
|
github_username: jekyll
|
||||||
|
|
||||||
|
# Build settings
|
||||||
|
markdown: kramdown
|
||||||
|
theme: minima
|
||||||
|
plugins:
|
||||||
|
- jekyll-feed
|
||||||
|
|
||||||
|
# Exclude from processing.
|
||||||
|
# The following items will not be processed, by default. Create a custom list
|
||||||
|
# to override the default setting.
|
||||||
|
exclude:
|
||||||
|
- Gemfile
|
||||||
|
- Gemfile.lock
|
||||||
|
- .bundle
|
||||||
25
_posts/2017-08-09-welcome-to-jekyll.markdown
Normal file
25
_posts/2017-08-09-welcome-to-jekyll.markdown
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Welcome to Jekyll!"
|
||||||
|
date: 2017-08-09 21:04:35 -0600
|
||||||
|
categories: jekyll update
|
||||||
|
---
|
||||||
|
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
|
||||||
|
|
||||||
|
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
|
||||||
|
|
||||||
|
Jekyll also offers powerful support for code snippets:
|
||||||
|
|
||||||
|
{% highlight ruby %}
|
||||||
|
def print_hi(name)
|
||||||
|
puts "Hi, #{name}"
|
||||||
|
end
|
||||||
|
print_hi('Tom')
|
||||||
|
#=> prints 'Hi, Tom' to STDOUT.
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
|
||||||
|
|
||||||
|
[jekyll-docs]: https://jekyllrb.com/docs/home
|
||||||
|
[jekyll-gh]: https://github.com/jekyll/jekyll
|
||||||
|
[jekyll-talk]: https://talk.jekyllrb.com/
|
||||||
18
about.md
Normal file
18
about.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: About
|
||||||
|
permalink: /about/
|
||||||
|
---
|
||||||
|
|
||||||
|
This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)
|
||||||
|
|
||||||
|
You can find the source code for Minima at GitHub:
|
||||||
|
[jekyll][jekyll-organization] /
|
||||||
|
[minima](https://github.com/jekyll/minima)
|
||||||
|
|
||||||
|
You can find the source code for Jekyll at GitHub:
|
||||||
|
[jekyll][jekyll-organization] /
|
||||||
|
[jekyll](https://github.com/jekyll/jekyll)
|
||||||
|
|
||||||
|
|
||||||
|
[jekyll-organization]: https://github.com/jekyll
|
||||||
27
index.md
Normal file
27
index.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
# You don't need to edit this file, it's empty on purpose.
|
||||||
|
# Edit theme's home layout instead if you wanna make some changes
|
||||||
|
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
|
||||||
|
layout: home
|
||||||
|
---
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.links line {
|
||||||
|
stroke: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nodes circle {
|
||||||
|
pointer-events: all;
|
||||||
|
stroke: none;
|
||||||
|
stroke-width: 40px;
|
||||||
|
fill: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nodes text {
|
||||||
|
dominant-baseline: middle;
|
||||||
|
text-anchor: middle;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<svg class="projects" width="600" height="600"></svg>
|
||||||
|
<script src="https://d3js.org/d3.v4.min.js"></script>
|
||||||
|
<script src="/projects.js"></script>
|
||||||
84
projects.js
Normal file
84
projects.js
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
const projects = [
|
||||||
|
{id: 'Madison Scott-Clary', url: '/'},
|
||||||
|
|
||||||
|
{id: 'Sawtooth', group: 'projects', url: '/sawtooth'},
|
||||||
|
{id: 'The Fool', group: 'sawtooth', url: '/sawtooth/the-fool'},
|
||||||
|
{id: 'Disappearance', group: 'sawtooth', url: '/sawtooth/disappearance'},
|
||||||
|
{id: 'Party', group: 'sawtooth', url: '/sawtooth/party'},
|
||||||
|
{id: 'Run Ragged', group: 'sawtooth', url: '/sawtooth/run-ragged'},
|
||||||
|
{id: 'What Remains of Yourself', group: 'sawtooth', url: '/sawtooth/what-remains-of-yourself'},
|
||||||
|
|
||||||
|
{id: '[adjective][species]', group: 'projects', url: '/adjspecies'},
|
||||||
|
{id: 'Gender: Furry', group: 'adjspecies', url: '/adjspecies/gender-furry'},
|
||||||
|
|
||||||
|
{id: 'Rum and Coke', group: 'projects', url: '/rum-and-coke'},
|
||||||
|
{id: 'What I Expected', group: 'rum-and-coke', url: '/rum-and-coke/what-i-expected'},
|
||||||
|
{id: 'How Many', group: 'rum-and-coke', url: '/rum-and-coke/how-many'},
|
||||||
|
{id: 'Again', group: 'rum-and-coke', url: '/rum-and-coke/again'},
|
||||||
|
]
|
||||||
|
|
||||||
|
const links = [
|
||||||
|
{source: 'Madison Scott-Clary', target: 'Sawtooth'},
|
||||||
|
{source: 'Sawtooth', target: 'The Fool'},
|
||||||
|
{source: 'Sawtooth', target: 'Disappearance'},
|
||||||
|
{source: 'Sawtooth', target: 'Party'},
|
||||||
|
{source: 'Sawtooth', target: 'Run Ragged'},
|
||||||
|
{source: 'Sawtooth', target: 'What Remains of Yourself'},
|
||||||
|
|
||||||
|
{source: 'Madison Scott-Clary', target: '[adjective][species]'},
|
||||||
|
{source: '[adjective][species]', target: 'Gender: Furry'},
|
||||||
|
|
||||||
|
{source: 'Madison Scott-Clary', target: 'Rum and Coke'},
|
||||||
|
{source: 'Rum and Coke', target: 'What I Expected'},
|
||||||
|
{source: 'Rum and Coke', target: 'How Many'},
|
||||||
|
{source: 'Rum and Coke', target: 'Again'},
|
||||||
|
]
|
||||||
|
|
||||||
|
let svg = d3.select("svg.projects")
|
||||||
|
let width = +svg.attr("width")
|
||||||
|
let height = +svg.attr("height")
|
||||||
|
|
||||||
|
let simulation = d3.forceSimulation()
|
||||||
|
.force("link", d3.forceLink().id(d => d.id))
|
||||||
|
.force("charge", d3.forceManyBody().strength(-500))
|
||||||
|
.force("center", d3.forceCenter(width / 2, height / 2))
|
||||||
|
|
||||||
|
let link = svg.append("g")
|
||||||
|
.attr("class", "links")
|
||||||
|
.selectAll("line")
|
||||||
|
.data(links)
|
||||||
|
.enter().append("line")
|
||||||
|
|
||||||
|
let node = svg.append("g")
|
||||||
|
.attr("class", "nodes")
|
||||||
|
.selectAll(".node")
|
||||||
|
.data(projects)
|
||||||
|
.enter().append("g")
|
||||||
|
|
||||||
|
node.append('circle')
|
||||||
|
.attr('r', 10)
|
||||||
|
.append("title")
|
||||||
|
.text(d => d.id)
|
||||||
|
|
||||||
|
node.append('a')
|
||||||
|
.attr('href', d => d.url)
|
||||||
|
.append('text')
|
||||||
|
.text(d => d.id)
|
||||||
|
|
||||||
|
simulation
|
||||||
|
.nodes(projects)
|
||||||
|
.on("tick", ticked)
|
||||||
|
|
||||||
|
simulation.force("link")
|
||||||
|
.links(links);
|
||||||
|
|
||||||
|
function ticked() {
|
||||||
|
link
|
||||||
|
.attr("x1", d => d.source.x)
|
||||||
|
.attr("y1", d => d.source.y)
|
||||||
|
.attr("x2", d => d.target.x)
|
||||||
|
.attr("y2", d => d.target.y)
|
||||||
|
|
||||||
|
node
|
||||||
|
.attr("transform", d => `translate(${d.x}, ${d.y})`)
|
||||||
|
}
|
||||||
2
projects.min.js
vendored
Normal file
2
projects.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
'use strict';var projects=[{id:'Madison Scott-Clary',url:'/'},{id:'Sawtooth',group:'projects',url:'/sawtooth'},{id:'The Fool',group:'sawtooth',url:'/sawtooth/the-fool'},{id:'Disappearance',group:'sawtooth',url:'/sawtooth/disappearance'},{id:'Party',group:'sawtooth',url:'/sawtooth/party'},{id:'Run Ragged',group:'sawtooth',url:'/sawtooth/run-ragged'},{id:'What Remains of Yourself',group:'sawtooth',url:'/sawtooth/what-remains-of-yourself'},{id:'[adjective][species]',group:'projects',url:'/adjspecies'},{id:'Gender: Furry',group:'adjspecies',url:'/adjspecies/gender-furry'},{id:'Rum and Coke',group:'projects',url:'/rum-and-coke'},{id:'What I Expected',group:'rum-and-coke',url:'/rum-and-coke/what-i-expected'},{id:'How Many',group:'rum-and-coke',url:'/rum-and-coke/how-many'},{id:'Again',group:'rum-and-coke',url:'/rum-and-coke/again'}];var links=[{source:'Madison Scott-Clary',target:'Sawtooth'},{source:'Sawtooth',target:'The Fool'},{source:'Sawtooth',target:'Disappearance'},{source:'Sawtooth',target:'Party'},{source:'Sawtooth',target:'Run Ragged'},{source:'Sawtooth',target:'What Remains of Yourself'},{source:'Madison Scott-Clary',target:'[adjective][species]'},{source:'[adjective][species]',target:'Gender: Furry'},{source:'Madison Scott-Clary',target:'Rum and Coke'},{source:'Rum and Coke',target:'What I Expected'},{source:'Rum and Coke',target:'How Many'},{source:'Rum and Coke',target:'Again'}];var svg=d3.select('svg.projects');var width=+svg.attr('width');var height=+svg.attr('height');var simulation=d3.forceSimulation().force('link',d3.forceLink().id(function(d){return d.id})).force('charge',d3.forceManyBody().strength(-500)).force('center',d3.forceCenter(width/2,height/2));var link=svg.append('g').attr('class','links').selectAll('line').data(links).enter().append('line');var node=svg.append('g').attr('class','nodes').selectAll('.node').data(projects).enter().append('g');node.append('circle').attr('r',10).append('title').text(function(d){return d.id});node.append('a').attr('href',function(d){return d.url}).append('text').text(function(d){return d.id});simulation.nodes(projects).on('tick',ticked);simulation.force('link').links(links);function ticked(){link.attr('x1',function(d){return d.source.x}).attr('y1',function(d){return d.source.y}).attr('x2',function(d){return d.target.x}).attr('y2',function(d){return d.target.y});node.attr('transform',function(d){return'translate('+d.x+', '+d.y+')'})}
|
||||||
|
|
||||||
Reference in New Issue
Block a user