Wikipedia Viewer

Developer
Size
2,991 Kb
Views
32,384

How do I make an wikipedia viewer?

What is a wikipedia viewer? How do you make a wikipedia viewer? This script and codes were developed by Arbauman on 16 September 2022, Friday.

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='https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.0/css/bulma.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app"> <section class="hero is-primary is-bold is-fullheight"> <div class="hero-body"> <div class="container"> <div class="columns"> <div class="column is-12"> <div class="field is-grouped"> <div class="control is-expanded"> <input class="input" type="text" v-model="query"/> </div> <div class="control"> <a class="button is-fullwidth" target="_blank" href="https://en.wikipedia.org/wiki/Special:Random">Random</a> </div> </div> <div class="columns is-multiline is-mobile"> <div v-for="result in results" class="column is-12"> <a target="_blank" :href="url(result.pageid)"> <div class="notification is-primary"> <span class="title">{{ result.title }}</span> <span class="content is-small"><p>{{ result.extract }}</p></span> </div> </a> </div> </div> </div> </div> </div> </div> </section>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.4/vue.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Wikipedia Viewer - Script Codes CSS Codes

.container { padding: 50px; width: 600px;
}
.button { color: #282A2E !important;
}
.hero.is-fullheight .hero-body>.container { flex-grow: 0;
}

Wikipedia Viewer - Script Codes JS Codes

'use strict';
new Vue({ el: '#app', data: { query: '', results: [] }, watch: { query: function query() { this.search(); } }, methods: { url: function url(id) { return 'https://en.wikipedia.org/?curid=' + id; }, search: _.debounce(function () { var vm = this; $.ajax({ url: 'https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=' + vm.query, dataType: 'jsonp', success: function success(x) { vm.results = []; Object.keys(x.query.pages).forEach(function (key) { vm.results.push(x.query.pages[key]); }); } }); }, 500), getArticles: function getArticles(query) {} }
});
//https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=
Wikipedia Viewer - Script Codes
Wikipedia Viewer - Script Codes
Home Page Home
Developer Arbauman
Username arbauman
Uploaded September 16, 2022
Rating 3
Size 2,991 Kb
Views 32,384
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!

Arbauman (arbauman) Script Codes
Create amazing blog posts 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!