|
7 | 7 | <title>US CMS S&C Team - US CMS Software and Computing</title> |
8 | 8 | <link rel="stylesheet" href="/assets/css/bootstrap.css" crossorigin="anonymous"> |
9 | 9 | <link rel="stylesheet" href="/assets/css/style.css"> |
| 10 | +<link rel="stylesheet" href="/assets/css/org-chart.css"> |
10 | 11 | <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js" integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ" crossorigin="anonymous"></script> |
11 | 12 | <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> |
12 | 13 | <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> |
13 | 14 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> |
| 15 | +<script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js" ></script> |
14 | 16 | </head> |
15 | 17 |
|
16 | 18 | <body> |
|
80 | 82 | </div> |
81 | 83 | </div> |
82 | 84 |
|
83 | | - <html lang="en"> |
84 | | -<head> |
85 | | - <meta charset="UTF-8" /> |
86 | | - <title>USCMS S&C Org Chart (Auto-Generated)</title> |
87 | | - <style> |
88 | | - body { background:#fff; font-family:sans-serif; } |
89 | | - .chart-container { position:relative; width:1200px; height:800px; margin:auto;} |
90 | | - |
91 | | - .node { position:absolute; text-align:center; } |
92 | | - .node.root { width:300px; } |
93 | | - .node.leaf { width:200px; } |
94 | | - |
95 | | - .node-box { |
96 | | - border:2px solid #000; padding:10px; background:#fff; |
97 | | - font-size:14px; font-weight:normal; line-height:1.4; text-align:left; |
98 | | - box-shadow:2px 2px 5px rgba(0,0,0,0.1); |
99 | | - } |
100 | | - .node-box strong { display:block; text-align:center; font-size:15px; margin-bottom:6px; } |
101 | | - .person-line { font-size:12px; } |
102 | | - .title-line { font-size:11px; font-style:italic; color:#555; margin-left:2px; } |
103 | | - |
104 | | - .photo-left,.photo-right,.photo-below{ |
105 | | - position:absolute; width:75px; height:75px; object-fit:cover; |
106 | | - } |
107 | | - .photo-left{ left:-85px; top:50%; transform:translateY(-50%); } |
108 | | - .photo-right{ right:-85px; top:50%; transform:translateY(-50%); } |
109 | | - .photo-below{ top:100%; margin-top:8px; } |
110 | | - canvas { position:absolute; top:0; left:0; z-index:0; } |
111 | | - </style> |
112 | | -</head> |
113 | | -<body> |
114 | | -<div id="chart" class="chart-container"> |
| 85 | + <div id="chart" class="chart-container"> |
115 | 86 | <canvas id="connectorCanvas" width="1200" height="800"></canvas> |
116 | 87 | </div> |
117 | 88 |
|
118 | | - |
119 | | - |
120 | | - |
121 | | - |
122 | | - |
123 | | - |
124 | 89 | <script> |
125 | 90 | /* Parse Liquid-generated JSON */ |
126 | 91 | const layoutMap = JSON.parse("{ \"management\": [ { \"name\": \"Tulika Bose\", \"shortname\": \"tulika176\", \"title\": \"S&C Operations Program Manager\", \"institution\": \"University of Wisconsin-Madison\", \"photo\": \"/assets/images/team/Tulika_Bose.jpg\" }, { \"name\": \"Dirk Hufnagel\", \"shortname\": \"d_hufnagel\", \"title\": \"Deputy S&C Operations Program Manager\\n\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/Dirk-Hufnagel.jpg\" }, { \"name\": \"Robert Tuck\", \"shortname\": \"rct225\", \"title\": \"Associate Project Manager\", \"institution\": \"Princeton University\", \"photo\": \"/assets/images/team/Robert-Tuck.jpg\" } ] , \"facilities\": [ { \"name\": \"Andrew Melo\", \"shortname\": \"PerilousApricot\", \"title\": \"Facilities Co-Leader\", \"institution\": \"Vanderbilt University\", \"photo\": \"/assets/images/team/Andrew_Melo.jpg\" }, { \"name\": \"David Mason\", \"shortname\": \"d_mason\", \"title\": \"Facilities Co-Leader\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/David_Mason.jpg\" } ] , \"software\": [ { \"name\": \"Saba Sehrish\", \"shortname\": \"ssehrish\", \"title\": \"Software Co-leader\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/Saba_Sehrish.jpg\" }, { \"name\": \"Kevin Lannon\", \"shortname\": \"klannon\", \"title\": \"Software Co-leader\", \"institution\": \"University of Notre Dame\", \"photo\": \"/assets/images/team/Kevin_Lannon.jpeg\" } ] , \"operations\": [ { \"name\": \"Duong Nguyen\", \"shortname\": \"nhduongvn\", \"title\": \"Operations Co-Leader\", \"institution\": \"University at Buffalo\", \"photo\": \"/assets/images/team/Duong_Nguyen.jpg\" }, { \"name\": \"Scarlet Norberg\", \"shortname\": \"s_norberg\", \"title\": \"Operations Co-Leader\\n\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/Scarlet-Norberg.png\" } ] , \"hllhc\": [ { \"name\": \"Lindsey Gray\", \"shortname\": \"l_gray\", \"title\": \"HL-LHC R&D Co-Leader\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/Lindsey-Gray.png\" } , { \"name\": \"David Sperka\", \"shortname\": \"dsperka\", \"title\": \"HL-LHC R&D Co-Leader\", \"institution\": \"Boston University\", \"photo\": \"/assets/images/team/David_Sperka.jpg\" } ], \"analysis\": [ { \"name\": \"Matteo Cremonesi\", \"shortname\": \"mcremone\", \"title\": \"HL-LHC R&D Analysis Systems Coordinator\", \"institution\": \"Carnegie Mellon University\", \"photo\": \"/assets/images/team/Matteo_Cremonesi.jpg\" } , { \"name\": \"Oksana Shadura\", \"shortname\": \"oshadura\", \"title\": \"HL-LHC R&D Analysis Systems Coordinator\", \"institution\": \"University of Nebraska - Lincoln\", \"photo\": \"/assets/images/team/Oksana-Shadura_.jpg\" } ], \"infra\": [ { \"name\": \"Nick Smith\", \"shortname\": \"nsmith-\", \"title\": \"U.S. CMS Fermilab Facility Architect\", \"institution\": \"Fermilab\", \"photo\": \"/assets/images/team/Nick_Smith.jpg\" } , { \"name\": \"James Letts\", \"shortname\": \"j_letts\", \"title\": \"U.S. CMS University Facility Architect\", \"institution\": \"UC San Diego\", \"photo\": \"/assets/images/team/James_Letts.jpg\" } ], \"algo\": [ { \"name\": \"Philip Chang\", \"shortname\": \"pchang\", \"title\": \"HL-LHC R&D Algorithms Coordinator\", \"institution\": \"University of Florida\", \"photo\": \"/assets/images/team/Philip_Chang.png\" } ], \"blueprint\": [ { \"name\": \"David Lange\", \"shortname\": \"dlange\", \"title\": \"Computational Physicist\", \"institution\": \"Princeton University\", \"photo\": \"/assets/images/team/David-Lange.png\" } ]}"); |
|
157 | 122 | const chart = document.getElementById('chart'); |
158 | 123 |
|
159 | 124 | /* Photo helpers */ |
| 125 | +// function addPhotos(key, div, names){ |
| 126 | +// if (["facilities","software"].includes(key)) { |
| 127 | +// names.forEach((p,i)=>{ |
| 128 | +// const img = document.createElement('img'); |
| 129 | +// img.className = 'photo-left'; |
| 130 | +// if (i === 1) img.style.left = '-170px'; |
| 131 | +// if (p.photo) img.src = p.photo; |
| 132 | +// img.alt = p.name; |
| 133 | +// div.appendChild(img); |
| 134 | +// }); |
| 135 | +// } else if (["operations","hllhc"].includes(key)) { |
| 136 | +// names.forEach((p,i)=>{ |
| 137 | +// const img = document.createElement('img'); |
| 138 | +// img.className = 'photo-right'; |
| 139 | +// if (i === 1) img.style.right = '-170px'; |
| 140 | +// if (p.photo) img.src = p.photo; |
| 141 | +// img.alt = p.name; |
| 142 | +// div.appendChild(img); |
| 143 | +// }); |
| 144 | +// } else if (key === "management") { |
| 145 | +// names.forEach((p,i)=>{ |
| 146 | +// const img = document.createElement('img'); |
| 147 | +// img.className = i === 0 ? 'photo-left' : 'photo-right'; |
| 148 | +// if (i === 1) img.style.right = '-85px'; |
| 149 | +// if (i === 2) img.style.right = '-170px'; |
| 150 | +// if (p.photo) img.src = p.photo; |
| 151 | +// img.alt = p.name; |
| 152 | +// div.appendChild(img); |
| 153 | +// }); |
| 154 | +// } else if (["infra","algo","analysis"].includes(key)) { |
| 155 | +// const imgSize = 75; |
| 156 | +// const gap = 8; |
| 157 | +// const count = names.length; |
| 158 | +// const groupWidth = count * imgSize + Math.max(0, count - 1) * gap; |
| 159 | +// const nodeW = div.offsetWidth; |
| 160 | +// const startX = Math.max(0, Math.round((nodeW - groupWidth) / 2)); |
| 161 | +// names.forEach((p,i)=>{ |
| 162 | +// const img = document.createElement('img'); |
| 163 | +// img.className = 'photo-below'; |
| 164 | +// img.style.left = `${startX + i * (imgSize + gap)}px`; |
| 165 | +// if (p.photo) img.src = p.photo; |
| 166 | +// img.alt = p.name; |
| 167 | +// div.appendChild(img); |
| 168 | +// }); |
| 169 | +// } |
| 170 | +// } |
| 171 | + |
160 | 172 | function addPhotos(key, div, names){ |
161 | 173 | if (["facilities","software"].includes(key)) { |
162 | 174 | names.forEach((p,i)=>{ |
163 | | - const img = document.createElement('img'); |
164 | | - img.className = 'photo-left'; |
165 | | - if (i === 1) img.style.left = '-170px'; |
166 | | - if (p.photo) img.src = p.photo; |
167 | | - img.alt = p.name; |
168 | | - div.appendChild(img); |
| 175 | + const ph = document.createElement('div'); |
| 176 | + ph.className = 'photoBox photo-left'; |
| 177 | + if (i === 1) ph.style.left = '-170px'; |
| 178 | + if (p.photo) ph.style.backgroundImage = `url("${p.photo}")`; |
| 179 | + div.appendChild(ph); |
169 | 180 | }); |
170 | 181 | } else if (["operations","hllhc"].includes(key)) { |
171 | 182 | names.forEach((p,i)=>{ |
172 | | - const img = document.createElement('img'); |
173 | | - img.className = 'photo-right'; |
174 | | - if (i === 1) img.style.right = '-170px'; |
175 | | - if (p.photo) img.src = p.photo; |
176 | | - img.alt = p.name; |
177 | | - div.appendChild(img); |
| 183 | + const ph = document.createElement('div'); |
| 184 | + ph.className = 'photoBox photo-right'; |
| 185 | + if (i === 1) ph.style.right = '-170px'; |
| 186 | + if (p.photo) ph.style.backgroundImage = `url("${p.photo}")`; |
| 187 | + div.appendChild(ph); |
178 | 188 | }); |
179 | 189 | } else if (key === "management") { |
180 | 190 | names.forEach((p,i)=>{ |
181 | | - const img = document.createElement('img'); |
182 | | - img.className = i === 0 ? 'photo-left' : 'photo-right'; |
183 | | - if (i === 1) img.style.right = '-85px'; |
184 | | - if (i === 2) img.style.right = '-170px'; |
185 | | - if (p.photo) img.src = p.photo; |
186 | | - img.alt = p.name; |
187 | | - div.appendChild(img); |
| 191 | + const ph = document.createElement('div'); |
| 192 | + ph.className = 'photoBox ' + (i===0 ? 'photo-left' : 'photo-right'); |
| 193 | + if (i === 1) ph.style.right = '-85px'; |
| 194 | + if (i === 2) ph.style.right = '-170px'; |
| 195 | + if (p.photo) ph.style.backgroundImage = `url("${p.photo}")`; |
| 196 | + div.appendChild(ph); |
188 | 197 | }); |
189 | 198 | } else if (["infra","algo","analysis"].includes(key)) { |
190 | | - const imgSize = 75; |
191 | | - const gap = 8; |
192 | | - const count = names.length; |
| 199 | + const imgSize = 75, gap = 8, count = names.length; |
193 | 200 | const groupWidth = count * imgSize + Math.max(0, count - 1) * gap; |
194 | 201 | const nodeW = div.offsetWidth; |
195 | 202 | const startX = Math.max(0, Math.round((nodeW - groupWidth) / 2)); |
196 | 203 | names.forEach((p,i)=>{ |
197 | | - const img = document.createElement('img'); |
198 | | - img.className = 'photo-below'; |
199 | | - img.style.left = `${startX + i * (imgSize + gap)}px`; |
200 | | - if (p.photo) img.src = p.photo; |
201 | | - img.alt = p.name; |
202 | | - div.appendChild(img); |
| 204 | + const ph = document.createElement('div'); |
| 205 | + ph.className = 'photoBox photo-below'; |
| 206 | + ph.style.left = `${startX + i * (imgSize + gap)}px`; |
| 207 | + if (p.photo) ph.style.backgroundImage = `url("${p.photo}")`; |
| 208 | + div.appendChild(ph); |
203 | 209 | }); |
204 | 210 | } |
205 | 211 | } |
206 | 212 |
|
| 213 | + |
207 | 214 | /* Render a node */ |
208 | 215 | function mkNode(key){ |
209 | 216 | const {left, top, title, type} = positions[key]; |
|
292 | 299 | }); |
293 | 300 | }; |
294 | 301 | </script> |
295 | | -</body> |
296 | | -</html> |
297 | 302 |
|
298 | 303 | <h1>Full Team</h1> |
299 | 304 | <p><br /></p> |
@@ -693,7 +698,6 @@ <h1>Former Members</h1> |
693 | 698 | </div> |
694 | 699 | </div> |
695 | 700 |
|
696 | | - |
697 | 701 | </main> |
698 | 702 | </div> |
699 | 703 | <footer> |
|
0 commit comments