Skip to content

Instantly share code, notes, and snippets.

Petre Damoc pdamoc

Block or report user

Report or block pdamoc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pdamoc
pdamoc / Basic.elm
Created Jun 20, 2017
Styles isolation
View Basic.elm
module Main exposing (..)
import Element exposing (..)
import Element.Attributes exposing (..)
import BasicStyles exposing (..)
{-| A synonym for creating tuples. This will be included in the standard library soon.
1 => 2 == (1, 2)
@pdamoc
pdamoc / Counter.elm
Last active Oct 10, 2016
Multi component elm
View Counter.elm
port module Counter exposing (..)
import Html exposing (..)
import Html.App exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Json.Decode as Json exposing (Value)
type alias Model =
@pdamoc
pdamoc / CounterList.elm
Created Aug 30, 2016
CounterList Example without nesting.
View CounterList.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main =
App.beginnerProgram
View Print2.elm
module Print2 exposing (..)
import Html exposing (div, button, text, body, iframe)
import Html.Attributes as A
import Html.App as App
import Html.Events exposing (onClick)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import VirtualDom exposing (..)
import String
@pdamoc
pdamoc / App.elm
Last active Jul 4, 2019
Demo on how to split code across multiple pages.
View App.elm
module Main exposing (..)
import Html exposing (Html, div, hr, text)
import Html.App as App
import Navigation
-- APP IMPORTS
import FirstPage
@pdamoc
pdamoc / Sam.elm
Created Jun 21, 2016
update to valid data
View Sam.elm
import Html exposing (..)
import Html.App as App
import Html.Events exposing (on, onClick)
import Html.Attributes exposing (style)
import Mouse exposing (Position)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Sam.elm
Created Jun 21, 2016
Another SAM approach
View Sam.elm
import Html exposing (..)
import Html.App as App
import Html.Events exposing (on, onClick)
import Html.Attributes exposing (style)
import Mouse exposing (Position)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Main2.elm
Created Jun 17, 2016
SAM with AnimationFrame
View Main2.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import AnimationFrame
import Time exposing (Time, second)
-- MODEL
@pdamoc
pdamoc / Child.elm
Created Jun 3, 2016
Child 2 Child Communication.
View Child.elm
module Child exposing (..)
import Html exposing (..)
import Html.Attributes exposing (value)
import Html.Events exposing (on, onClick, targetValue)
import Json.Decode as Json
-- MODEL
@pdamoc
pdamoc / Main.elm
Created May 31, 2016
Req msg with cache
View Main.elm
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import Req exposing (..)
import Dict exposing (Dict)
main : Program Never
You can’t perform that action at this time.