PicoPrism Demo

le 16/07/2018 dans Pico CMS #dev#javascript#php#Pico CMS#plugin

A simple demo page for PicoPrism plugin, with some of the languages I use on this website.

HTML

<!doctype html>
<html class="no-js" lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>Demo</title>
        <meta name="description" content="Demo">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="apple-touch-icon" href="apple-touch-icon.png">
        <!-- Place favicon.ico in the root directory -->

        <link rel="stylesheet" href="/normalize.css">
        <link rel="stylesheet" href="/main.css">
    </head>
    <body>
        <h2 class="class">Titre de test</h2>

CSS

/* comment */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
mark {
  background: #ff0;
  color: #000;
}
small {
  font-size: 80% !important;
}

Javascript

/*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */
(function( w ){
  var loadJS = function( src, cb ){
    "use strict";
    var ref = w.document.getElementsByTagName( "script" )[ 0 ];
    var script = w.document.createElement( "script" );
    script.src = src;
    script.async = true;
    ref.parentNode.insertBefore( script, ref );
    if (cb && typeof(cb) === "function") {
      script.onload = cb;
    }
    return script;
  };
  // commonjs
  if( typeof module !== "undefined" ){
    module.exports = loadJS;
  }
  else {
    w.loadJS = loadJS;
  }
}( typeof global !== "undefined" ? global : this ));

PHP

<?php namespace App\Services;

    use App\User;
    use Validator;
    use Illuminate\Contracts\Auth\Registrar as RegistrarContract;

    class Registrar implements RegistrarContract {

      /**
       * Get a validator for an incoming registration request.
       *
       * @param  array  $data
       * @return \Illuminate\Contracts\Validation\Validator
       */
    public function validator(array $data)

LaTeX

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{avm}
\usepackage{tipa}

\begin{document}

\begin{avm}\textipa{[kK@]} :
\[ \[ Seg : & \&lt;\textipa{k}\&gt; \cr
 Pos : & 1 \cr
 Pc : & i \]
& \[ Seg : & \&lt;\textipa{K}\&gt; \cr
 Pos : & 1 \cr
 Pc : & p \]
& \[ Seg : & \&lt;\textipa{@}\&gt; \cr
 Pos : & 2 \cr
 Pc : & s \] \]
\end{avm}

\vspace{2cm}

\begin{avm}
\[
\[ SEG : & \[ SLAR : & \[ MODE : & @ \@1 \cr
 PLACE : & h ; \textglotstop \cr
 VELUM : & \textsl{Velum} \cr
 LATERAL: & \textsl{Lateral} \cr
 \] \cr
 LAR : & \textsl{Lar} \cr
 TETE : & \@1 \] \cr
 Pos : & 1 \cr
 Pc : & i
 \] \cr
\[ SEG : & \[ SLAR : & \[ MODE : & @ \@1 ; R \cr
 PLACE : & \textsl{Place} \cr
 VELUM : & \textsl{Velum} \cr
 LATERAL: & \textsl{Lateral} \cr
 \] \cr
 LAR : & \textsl{Lar} \cr
 TETE : & \@1 \] \cr
 Pos : & 1 \cr
 Pc : & p \] \]
\end{avm}

\end{document}

Bash

ls | grep "tes"