This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#form').on('submit', function(e) { | |
// stopp formet i å bli submitted | |
e.preventDefault(); | |
// en referanse til form-taggen | |
var $form = $(this); | |
// lag et options-objekt som gir info til $.ajax etterpå | |
var opts = { | |
url: 'kontakt.php', // send ajax-request til denne filen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$to = "[email protected]"; // this is your Email address | |
$from = $_POST['mailInput']; // this is the sender's Email address | |
$name = $_POST['nameInput']; | |
$subject = "forespørsel til Livs Lekestue"; | |
$message = $name . " " . " wrote the following:" . "\n\n" . $_POST['messageInput']; | |
$headers = "From:" . $from; | |
$responseCode = 200; // regner med at alt går bra | |
if(!mail($to,$subject,$message,$headers)) { // mail-metoden returnerer true eller false avhengig av om mailen ble sendt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[include] | |
path = ~/.gitconfig-user | |
# Include user specific information | |
[core] | |
editor = vim | |
excludesfile = /opt/boxen/config/git/gitignore | |
autocrlf = input | |
# Convert line endings to platform input (LF on *nix, CRLF on windows). | |
# In other words, don't use this on windows. Use 'true' instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vh($heightPercentage) { | |
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
* | |
* Original gist at from here: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@name HTML 5 dataset Support | |
@version 0.0.2 | |
@home http://code.eligrey.com/html5/dataset/ | |
@author Elijah Grey - eligrey.com | |
@license http://www.gnu.org/licenses/lgpl.html | |
Rewritten to ES2015 by Kristofer Selbekk | |
*/ | |
Element.prototype.setDataAttribute = function(name, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function parse(input) { | |
if (!input || typeof input !== 'string') { | |
return input; | |
} | |
const qs = input.startsWith('?') ? input.substring(1) : input; | |
return qs.split('&') | |
.filter(item => item) | |
.reduce((prev, item) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default withDependencies(TargetComponent, dependencies) { | |
return function DependencyInjector(props) { | |
return <TargetComponent {...props} {...dependencies} />; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Her er en enkel spinner - en div med no css på | |
const Spinner = () => ( | |
<div className="spinner" /> | |
); | |
// Her er en liste med todos - den rendrer ut listen med todos. | |
const TodoList = props => ( | |
<ul classList="todos"> | |
{props.todos.map(todo => <li className="todo" key={todo.id}>{todo.text}</li>)} | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Table = props => ( | |
<table> | |
<thead> | |
<tr> | |
{props.headers.map(header => <th>{header}</th>)} | |
</tr> | |
</thead> | |
<tbody> | |
{props.data.map(row => ( | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import { connect } from 'react-redux'; | |
import classNames from 'classnames'; | |
import EventImage from '~/components/EventImage'; | |
import Logo from '~/components/Logo'; | |
import Spinner from '~/components/Spinner'; | |
import * as dispatchers from '~/dispatchers'; |
OlderNewer