In this tutorial i’m going to desribe how to create an HTML slides presentation In Revealjs. Plz follow some easy step mentioned below. Complete slides found here repository from https://github.com//reveal.js, and you can implement this slides structure in your own slides.
Each “slide” in your “deck” is denoted by a tag in the section, as shown above. You can then use normal HTML syntax and CSS styling to fancy up your elements, but basically, you just write out your sections, and voila you have a presentation. To use your own CSS you should probably add a custom.css file and reference it in the section after the generic reveal CSS and the one for the theme you’re using, so you override any default behavior.
For example, to add a pointing-finger emoji to an element in a list as you step into it, you’d use the following CSS:
and in your html you’d mark it up as follows:
To highlight fragments in a sentence in bold as you step into them, firstly you need to override the default behavior where they are hidden until stepped into:
you’d use this in your html like this:
Best of all, with some additional javascript libraries you can have even more fun! Here’s how to add rainbow sparkles to elements on your slide. It’s still a bit of a work in progress but anyhow here we go:
Firstly, I think you need to add jquery and the javascript code for the sparkles as dependencies in your HTML, so in the <script> section, underneath the line that initializes the main RevealJS code you need to add the following:
Then you need some CSS to define your fragment behavior, like above:
Then you need to set the desired behavior of your sparkles in the HTML by adding a RevealJS EventListener that acts when the fragment is shown(https://github.com/hakimel/reveal.js/#fragment-events). This gets added into the <script> tag where RevealJS is initialized:
Next step create model and migration copy below code and simply paste
php artisan make:model contact -m
Go to migration folder create_contacts_table and paste this code 👇
create_contacts_table
<?php
use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration;
class CreateContactsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('contacts', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('email'); $table->string('phone'); $table->string('url'); $table->string('message'); $table->timestamps(); }); }
/** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('contacts'); } }
Next run this command
php artisan: migrate
Next go to contact model Contact.php and paste this code 👇
Contact.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Contact extends Model { protected $fillable = [ 'name', 'email', 'phone', 'url', 'message'
]; }
Next create controller
Php artisan make:controller ContactController -r
Go to ContactController and paste below code in ContactController.php
ContactController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request; use App\Contact;
class ContactController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('contact'); }
public function thanks() { return view('thanks'); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) {
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }
Next go to web.php and simply paste
web.php
<?php
/* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */
Route::get('/', function () { return view('welcome'); });