A Pen by Anton Kalinin

Developer
Size
5,156 Kb
Views
12,144

How do I make an a pen by anton kalinin?

What is a a pen by anton kalinin? How do you make a a pen by anton kalinin? This script and codes were developed by Anton Kalinin on 28 November 2022, Monday.

A Pen by Anton Kalinin Previews

A Pen by Anton Kalinin - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Anton Kalinin</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import url(https://fonts.googleapis.com/css?family=Indie+Flower);
html, body { width: 100%; height: 100%; overflow: hidden; background-color: #BEEB9F;
}
.question-wrapper { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
.question { width: 500px; height: 300px; display: flex; align-items: center; justify-content: center; flex-flow: column wrap; font-size: 42px; font-family: "Indie Flower", cursive; color: #79BD8F;
}
.question .progress { background-color: #FFFF9D; width: 80px; height: 80px; border-radius: 60%; text-align: center; line-height: 80px; color: #79BD8F; position: relative;
}
.question .progress.active { background-color: #91FF9D;
}
.question .progress .progress-bar { margin-top: -80px;
}
.question .title { height: 80px; line-height: 80px; font-size: 62px;
}
.question .variants { display: flex; flex-flow: row wrap; height: 80px;
}
.question .variants .left, .question .variants .right { line-height: 80px; width: 200px; text-align: center; background-color: #FFFF9D; color: #79BD8F; cursor: pointer;
}
.question .variants .left.active, .question .variants .right.active { background-color: #91FF9D;
}
.question .variants .right { margin-left: 5px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="question-wrapper" ng-app="questionApp"> <div class="question" ng-controller="QuestionsController"> <div class="progress"> {{progress}}<round-progress bgcolor="#BEEB9F" class="progress-bar" color="#FF6138" current="timer" max="time" radius="40" stroke="3"></round-progress> </div> <div class="title"> {{title()}} </div> <div class="variants"> <div ng-click="checkAnswer(left)"> <div class="left" ng-bind="left"></div> </div> <div ng-click="checkAnswer(right)"> <div class="right" ng-bind="right"></div> </div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://code.angularjs.org/1.5.5/angular.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/angular-svg-round-progressbar/0.4.8/roundProgress.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script> <script src="js/index.js"></script>
</body>
</html>

A Pen by Anton Kalinin - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Indie+Flower);
html, body { width: 100%; height: 100%; overflow: hidden; background-color: #BEEB9F;
}
.question-wrapper { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
.question { width: 500px; height: 300px; display: flex; align-items: center; justify-content: center; flex-flow: column wrap; font-size: 42px; font-family: "Indie Flower", cursive; color: #79BD8F;
}
.question .progress { background-color: #FFFF9D; width: 80px; height: 80px; border-radius: 60%; text-align: center; line-height: 80px; color: #79BD8F; position: relative;
}
.question .progress.active { background-color: #91FF9D;
}
.question .progress .progress-bar { margin-top: -80px;
}
.question .title { height: 80px; line-height: 80px; font-size: 62px;
}
.question .variants { display: flex; flex-flow: row wrap; height: 80px;
}
.question .variants .left, .question .variants .right { line-height: 80px; width: 200px; text-align: center; background-color: #FFFF9D; color: #79BD8F; cursor: pointer;
}
.question .variants .left.active, .question .variants .right.active { background-color: #91FF9D;
}
.question .variants .right { margin-left: 5px;
}

A Pen by Anton Kalinin - Script Codes JS Codes

(function() { angular.module('questionApp', ['angular-svg-round-progressbar']).controller('QuestionsController', function($scope, $interval, $timeout) { var correctAnswer, countDown, generateQuestion, incorrectAnswer, init, maxRandom, operations, random, randomExpression, randomOperation, resetCountDown, shuffleAnswers; $scope.progress = 1; $scope.timer = 1; operations = ['-', '+', '*']; maxRandom = 10; $scope.time = 5; init = function() { return generateQuestion(); }; countDown = function() { $scope.interval = $interval(function() { return $scope.timer += 1; }, 1000); return $scope.timeout = $timeout(function() { generateQuestion(); if ($scope.timer >= 1) { return $scope.progress = 1; } }, $scope.time * 1000); }; $scope.checkAnswer = function(value) { if ($scope.correctAnswer === value) { $scope.progress += 1; return generateQuestion(); } else { $scope.progress = 1; return generateQuestion(); } }; $scope.title = function() { return $scope.randomExpression.left + " " + $scope.randomExpression.operation + " " + $scope.randomExpression.right; }; $scope.isCorrect = function(value) { return $scope.correctAnswer === value; }; generateQuestion = function() { resetCountDown(); $scope.randomExpression = randomExpression(); $scope.correctAnswer = correctAnswer(); $scope.incorrectAnswer = incorrectAnswer(); return shuffleAnswers(); }; resetCountDown = function() { $interval.cancel($scope.interval); $timeout.cancel($scope.timeout); $scope.timer = 1; return countDown(); }; correctAnswer = function() { return eval([$scope.randomExpression.left, $scope.randomExpression.operation, $scope.randomExpression.right].join('')); }; incorrectAnswer = function() { return eval([correctAnswer(), $scope.randomExpression.operation, random(1, 5)].join('')); }; shuffleAnswers = function() { var ref; return ref = _.shuffle([$scope.correctAnswer, $scope.incorrectAnswer]), $scope.left = ref[0], $scope.right = ref[1], ref; }; randomExpression = function() { return { left: random(), operation: randomOperation(), right: random() }; }; randomOperation = function() { return operations[random(0, operations.length - 1)]; }; random = function(min, max) { if (min == null) { min = 1; } if (max == null) { max = maxRandom; } return Math.floor(Math.random() * (max - min + 1)) + min; }; return init(); });
}).call(this);
A Pen by Anton Kalinin - Script Codes
A Pen by Anton Kalinin - Script Codes
Home Page Home
Developer Anton Kalinin
Username ssh
Uploaded November 28, 2022
Rating 3
Size 5,156 Kb
Views 12,144
Do you need developer help for A Pen by Anton Kalinin?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Anton Kalinin (ssh) Script Codes
Name
Schulte Table
Magic 8-ball
Thermostat
Memo
Aurora
Battlefield 4
Octagon load animation
Thing
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!