Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
eed291c8
Commit
eed291c8
authored
Jan 22, 2018
by
Abinaya Sudhir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavish bootstrap adapted
parent
ac7921b3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5698 additions
and
0 deletions
+5698
-0
lavish-bootstrap.css
dist/css/lavish-bootstrap.css
+5638
-0
index.html
dist/index.html
+2
-0
index.html
index.html
+1
-0
randomText.purs
src/randomText.purs
+57
-0
No files found.
dist/css/lavish-bootstrap.css
0 → 100644
View file @
eed291c8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/index.html
View file @
eed291c8
...
...
@@ -3,7 +3,9 @@
<head>
<meta
charset=
"utf-8"
/>
<title>
CNRS GarganText
</title>
<link
href=
"./dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"./dist/css/lavish-bootstrap.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./dist/css/menu.css"
/>
</head>
<body>
...
...
index.html
View file @
eed291c8
...
...
@@ -6,6 +6,7 @@
<link
href=
"https://fonts.googleapis.com/icon?family=Material+Icons"
rel=
"stylesheet"
>
<link
href=
"./dist/css/login.min.css"
rel=
"stylesheet"
>
<link
href=
"./dist/css/bootstrap.css"
rel=
"stylesheet"
>
<link
href=
"./dist/css/lavish-bootstrap.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./dist/css/menu.css"
/>
<link
href=
"./dist/css/Login.css"
rel=
"stylesheet"
>
...
...
src/randomText.purs
0 → 100644
View file @
eed291c8
module RandomText where
import Prelude
import Control.Monad.Eff (Eff(..))
import Control.Monad.Eff.Random (RANDOM(..), randomInt)
import Data.Array (length, (!!), head, tail, take, takeEnd, drop, dropEnd)
import Data.Maybe (Maybe(Nothing, Just), fromJust)
import Data.String (toCharArray, fromCharArray)
import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\))
import Partial (crash)
import Partial.Unsafe (unsafePartial)
import Unsafe.Coerce (unsafeCoerce)
--rando Ran x [] = Ran x []
--rando Ran x xs = Ran (x <> [x']) (rando xs')
-- where
-- Ran x' xs' = randomIt xs
--
remove :: forall t5. Int -> Array t5 -> Array t5
remove n [] = []
remove n xs = unsafePartial $ case n of
0 -> fromJust $ tail xs
_ -> (take n xs) <> (drop (n+1) xs)
data Ran = Ran { l :: Char, r :: Array Char}
randomIt :: forall t46. String -> Eff ( random :: RANDOM | t46 ) Ran
randomIt ar = unsafePartial $ do
let ar' = toCharArray ar
n <- randomInt 0 (length ar' - 1)
let maybeChar = (ar' !! n )
let rest = remove n ar'
case maybeChar of
Nothing ->
crash "it should not happen"
Just char ->
pure $ Ran {l : char, r : rest}
randomText :: String -> String
randomText txt = fromCharArray ( start <> middle <> end)
where
txt' = toCharArray txt
start = take 2 txt'
middle = dropEnd 2 $ drop 2 txt'
end = takeEnd 2 txt'
testText :: String -> String
testText txt = case (length (toCharArray txt)) >= 5 of
true -> randomText txt
_ -> txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment