π¨βπ»
This file contains hidden or 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 { json } from 'remix' | |
| import { gql } from 'graphql-request' | |
| import { gqlClient } from 'graphql.server' | |
| export const loader = async ({ request }) => { | |
| const { entries } = await gqlClient(request).request(gql` | |
| { | |
| YOUR GRAPHQL QUERY HERE | |
| } | |
| `) |
This file contains hidden or 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 { | |
| useActionData, | |
| Form, | |
| redirect, | |
| json | |
| } from 'remix' | |
| export async function action({ request }) { | |
| const formData = await request.formData() | |
| const errors = {} |
This file contains hidden or 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
| { | |
| "buttons": [ | |
| "html", | |
| "formatting", | |
| "bold", | |
| "italic", | |
| "unorderedlist", | |
| "orderedlist", | |
| "link", | |
| "image", |
This file contains hidden or 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
| module.exports = { | |
| init: function() { | |
| this.setVars(); | |
| this.addAttributes(); | |
| }, | |
| setVars: function() { | |
| this.links = document.querySelectorAll('a[href^="http"]:not([href^="' + window.location.origin + '"])'); | |
| }, |
This file contains hidden or 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 | |
| public function getEmbedCode($url) | |
| { | |
| if (strpos($url, 'youtube') !== FALSE) { | |
| $url_parts = parse_url($url); | |
| parse_str($url_parts['query'], $segments); | |
| return '//www.youtube.com/embed/' . $segments['v']; | |
| } else if (strpos($url, 'vimeo') !== FALSE) { |
This file contains hidden or 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
| var $body = $('body'); | |
| if (!$body.hasClass('whatever')) { | |
| var header_wrap = $('#header-wrap'); | |
| var sticky_navigation_offset_top = header_wrap.offset().top; | |
| var sticky_navigation = function() { | |
| var scroll_top = $(window).scrollTop(); | |
| if (scroll_top > sticky_navigation_offset_top) { |
This file contains hidden or 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 | |
| public function in_array() | |
| { | |
| $haystack = $this->EE->TMPL->fetch_param('haystack', NULL); | |
| $needle = $this->EE->TMPL->fetch_param('needle', NULL); | |
| if ($haystack === NULL || $needle === NULL) { | |
| return; | |
| } |
This file contains hidden or 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 jQuery Tabs | |
| * @author Trevor Davis | |
| * @copyright (cc) Trevor Davis (http://www.viget.com) | |
| * | |
| * Licensed under the CC-GNU GPL (http://creativecommons.org/licenses/GPL/2.0/) | |
| */ | |
| ;(function($, window, document, undefined) { | |
| var Tabs = function(elem, options) { |
This file contains hidden or 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
| /** | |
| * Add http:// to links if there isn't one | |
| */ | |
| public function auto_link() { | |
| $url = $this->EE->TMPL->fetch_param('url', NULL); | |
| if ($url) { | |
| $http = stripos($url, 'http://'); | |
| $https = stripos($url, 'https://'); |
This file contains hidden or 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
| /** | |
| * Add http:// to links if there isn't one | |
| */ | |
| public function auto_link() { | |
| $url = $this->EE->TMPL->fetch_param('url', NULL); | |
| if ($url) { | |
| $http = stripos($url, 'http://'); | |
| $https = stripos($url, 'https://'); |
NewerOlder