Wikipedia Viewer

2,549 Kb

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 Previews

Wikipedia Viewer - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia Viewer</title> <link rel='stylesheet prefetch' href=''>
<link rel='stylesheet prefetch' href=',300'> <link rel="stylesheet" href="css/style.css">
<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="" target="_blank">Or click here for a random article</a></p> <a href="{{ 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=''></script> <script src="js/index.js"></script>

Wikipedia Viewer - Script Codes CSS Codes

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 = '';	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 = [];	}
Wikipedia Viewer - Script Codes
Wikipedia Viewer - Script Codes
Home Page Home
Developer Thomas Vaeth
Username thomasvaeth
Uploaded September 24, 2022
Rating 3
Size 2,549 Kb
Views 20,240
Do you need developer help for Wikipedia Viewer?

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!

Thomas Vaeth (thomasvaeth) Script Codes
Create amazing captions 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!