Trying to find the simplest way to make an SVG graph. No features really, just drawing a graph when given some data for x & y axes, with minimal manipulation and code.
A Pen by Ville V. Vanninen on CodePen.
| Model = require('./model.js') | |
| SomeModule = require('./somemodule.js') | |
| const model = new Model() | |
| const moduleOne = new SomeModule(document.querySelector('#stuff'), model) | |
| const moduleDuo = new SomeModule(document.querySelector('#other-stuff'), model) | |
| //Kick off the app by setting some initial data | |
| model.set(initialData) |
Trying to find the simplest way to make an SVG graph. No features really, just drawing a graph when given some data for x & y axes, with minimal manipulation and code.
A Pen by Ville V. Vanninen on CodePen.
| <?php | |
| //Define the tag into a variable, so we can use it in multiple tags at the bottom of this file | |
| $tagName = array( | |
| 'attr' => array( | |
| 'align', | |
| 'link', | |
| 'target', | |
| 'class' | |
| ), |
| <?php | |
| kirbytext::$tags['icon'] = array( | |
| 'attr' => array( | |
| 'rel', | |
| 'link', | |
| 'target', | |
| 'width', | |
| 'height', | |
| 'class', |
| .blob { | |
| display: block; | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| width: 0px; | |
| height: 0px; | |
| margin-top: -30px; | |
| margin-left: -30px; | |
| background: green; |
| var updateFooter = function ($footer) { | |
| var window_height = jQuery(window).height(); | |
| var body_offset_top = jQuery('body').offset().top; | |
| var body_outer_height = jQuery('body').outerHeight(); | |
| var body_height = jQuery('body').height(); | |
| body_bottom = (body_offset_top + body_outer_height) - ((body_outer_height - body_height)/2); | |
| var footer_height = $footer.outerHeight(true); | |
| if (!$footer.hasClass('sticky') && window_height > body_bottom) { | |
| $footer.addClass('sticky'); |
| /* Transparent Tabs */ | |
| .tabs { | |
| list-style: none; | |
| padding: 0; | |
| overflow: hidden; | |
| } | |
| .tab { | |
| display: block; | |
| float: left; |
| /* Pixel Perfect CSS Rotation */ | |
| body { | |
| text-align: center; | |
| } | |
| .clock { | |
| display: inline-block; | |
| background: black; | |
| border-radius: 100%; | |
| width: 101px; | |
| height: 101px; |