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 MainLayout from "./Main"; | |
function App() { | |
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<h1>My App Name</h1> | |
</header> | |
<MainLayout> | |
<div class="content"> |
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
(function() { | |
var app = angular.module('gemStore', ['store-directives']); | |
app.controller('GalleryController', function() { | |
this.imageIndex = 0; | |
this.currentImageChange = function(imageNumber) { | |
console.log(imageNumber); | |
this.imageIndex = imageNumber || 0; | |
}; | |
}); |
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
/* File: gulpfile.js */ | |
// grab our gulp packages | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
jshint = require('gulp-jshint'), | |
sass = require('gulp-sass'), | |
notify = require("gulp-notify"), | |
php = require('gulp-connect-php'), | |
concat = require('gulp-concat'), |
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
/** | |
* My-theme (Header) Logo | |
*/ | |
.top-logo{ | |
margin-top: 14px; | |
} | |
/* | |
* Navigation | |
*/ |
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
let mix = require('laravel-mix'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass | |
| file for your application, as well as bundling up your JS files. |
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 | |
namespace Your\Namespace; | |
use SilverStripe\Core\Config\Configurable; | |
use SilverStripe\ORM\DB; | |
/** | |
* Class ConnectionManager | |
* @package Your\Namespace |
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
//Here's what worked for me using Laravel Mix | |
import 'jquery'; | |
import Popper from 'popper.js/dist/umd/popper.js'; | |
window.Popper = Popper; | |
import 'bootstrap'; | |
//and in my webpack.mix.js filek, I extract them into the global variable space like so | |
// .autoload( |
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 | |
/** | |
* Code submitted by Lamin Barrow (@laminbarrow) | |
*/ | |
class MarketPlaceProduct extends BaseProduct | |
{ | |
private static $db = array( | |
'AdditionalDetails' => 'MultiValueField', | |
); |
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 | |
// ... | |
function augmentSQL(SQLQuery &$query) { | |
// Get the content at a specific date | |
if($date = Versioned::current_archived_date()) { | |
foreach($query->from as $table => $dummy) { | |
if(!isset($baseTable)) { | |
$baseTable = $table; |