Wikipedia Viewer
How do I make an wikipedia viewer?
Wikipedia Viewer for FreeCodeCamp.. What is a wikipedia viewer? How do you make a wikipedia viewer? This script and codes were developed by Thomas Vaeth on 24 September 2022, Saturday.
Wikipedia Viewer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia Viewer</title> <link rel='stylesheet prefetch' href='https://cdn.jsdelivr.net/foundation/6.1.2/foundation.min.css'>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Raleway:100,300'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="wikipedia" class="small-10 small-offset-1 medium-8 medium-offset-2 large-6 large-offset-3 columns vertical" ng-app="WikipediaApplication" ng-controller="WikipediaController"> <h1 class="text-center margin">Wikipedia Viewer</h1> <div class="row"> <div class="small-8 small-offset-2 medium-6 medium-offset-3 large-4 large-offset-4 columns"> <form> <input type="text" placeholder="Search Wikipedia" ng-model="searchTerm" ng-change="searchWikipedia()"> </form> </div> </div> <p class="text-center"><a href="http://en.wikipedia.org/wiki/Special:Random" target="_blank">Or click here for a random article</a></p> <a href="https://en.wikipedia.org/?curid={{ result.pageid }}" target="_blank" ng-repeat="result in results"> <div class="callout large"> <h2>{{ result.title }}</h2> <p>{{ result.extract }}</p> </div> </a>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Wikipedia Viewer - Script Codes CSS Codes
body,
h1,
h2 { font-family: 'Raleway', sans-serif;
}
.vertical { position: absolute; top: 50%; transform: translateY(-50%);
}
.callout:hover { background-color: #EBEBEB;
}
h1 { font-size: 4rem; font-weight: 300;
}
h2 { text-transform: uppercase;
}
Wikipedia Viewer - Script Codes JS Codes
var app = angular.module('WikipediaApplication', []);
app.controller('WikipediaController', ['$scope', '$http', function($scope, $http) { $scope.results = []; $scope.searchWikipedia = function() { var api = 'http://en.wikipedia.org/w/api.php?action=query&generator=search&prop=extracts&exintro&exsentences=1&exlimit=max&explaintext&gsrsearch='; var callback = '&format=json&callback=JSON_CALLBACK'; $http.jsonp(api + $scope.searchTerm + callback ).success(function(data) { document.getElementById('wikipedia').classList.remove('vertical'); $scope.results = data.query.pages; }).error(function(data) { console.log(data); }); if ($scope.searchTerm === '') $scope.results = []; }
}]);
Developer | Thomas Vaeth |
Username | thomasvaeth |
Uploaded | September 24, 2022 |
Rating | 3 |
Size | 2,549 Kb |
Views | 20,240 |
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!
Name | Size |
Random Quote Machine | 5,186 Kb |
Button Border Slide Mixin | 2,998 Kb |
Full Viewport Z-Index Scroll | 3,020 Kb |
Button Offset Mixin | 2,746 Kb |
Local Weather | 3,137 Kb |
Calculator | 2,959 Kb |
Recipe Book | 5,375 Kb |
Pomodoro Clock | 3,136 Kb |
Button Split Mixin | 2,543 Kb |
Flexbox Grid Animation | 4,299 Kb |
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!
Name | Username | Size |
Css color for svg | Ademilter | 2,392 Kb |
Sign Up Form | Sicontis | 5,272 Kb |
Box-sizing | Elad2412 | 1,572 Kb |
Ocean | Gordonnl | 2,817 Kb |
Starfield using KineticJS | Asp | 3,512 Kb |
CSS3 iPad | Vikvarg | 1,766 Kb |
Flower expansion | Sreucherand | 3,425 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Tumblr API | Juanv911 | 2,436 Kb |
P5.js data visualization | Enginarslan | 2,233 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!