Skip to content

Commit

Permalink
Upgrade compiling assets and small improvements (Say hello to the Lar…
Browse files Browse the repository at this point in the history
…avel Mix v4.0)
  • Loading branch information
algoriq committed Jul 7, 2019
1 parent c970fb1 commit ae6509e
Show file tree
Hide file tree
Showing 45 changed files with 205 additions and 157 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea/
.vscode/

# Dependency directories
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Prismify
Copyright (c) 2019 Prismify

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
###### Introduction
### Introduction

Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.

###### Links to documentation to help you get started!
### Quick start installation

To install from the [Marketplace](https://octobercms.com/theme/prismify-bootstrap-starter-kit), click on the "Add to Project" button and then select the project you wish to add it to before updating the project to pull in the plugin.

To install from the backend, go to Settings -> Front-end Themes -> Find more themes and then search for Prismify.Bootstrap.

To install from [the repository](https://github.com/prismify/oc-bootstrap-theme), `git clone https://github.com/prismify/oc-bootstrap-theme.git themes/bootstrap` and then run `npm install` from your theme root in order to pull in the dependencies.


### Links to documentation to help you get started!

* https://getbootstrap.com/docs/4.1/getting-started/introduction
* https://getbootstrap.com/docs/4.1/getting-started/webpack
* https://octobercms.com/docs/themes/development
* https://octobercms.com/docs/cms/themes
* https://laravel.com/docs/5.6/mix
* https://webpack.js.org

###### Pull Requests
Your contributions to the project are very welcome. If you would like to fix a bug or propose a new feature, you can submit a Pull Request.
Thank you for your contributions!


###### Like this theme?
If you like this theme, give this theme a good review.
### Open to your ideas!

### Good luck!
Let us know if you have any questions, ideas or suggestions! Just drop a line at [[email protected]](mailto:[email protected]).
6 changes: 0 additions & 6 deletions assets/css/app.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/app.js

This file was deleted.

6 changes: 6 additions & 0 deletions assets/public/css/app.css

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes
1 change: 1 addition & 0 deletions assets/public/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/public/js/manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/public/js/vendor.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/public/webfonts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Binary file added assets/src/images/favicon.ico
Binary file not shown.
Binary file added assets/src/images/theme-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions assets/src/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Bootstrap - Starter Kit
*
* @author Prismify
* @version 1.0.3
*/

window.$ = window.jQuery = require('jquery');
require('popper.js');
require('bootstrap');

// require('more-packages-installed-with-npm-install');

$(function() {
"use strict";
// Helpers
require('./helpers/bootstrap');
// require('.helpers/more-helpers');

// Components
// require('./components/more-components');
});
18 changes: 18 additions & 0 deletions assets/src/js/components/_componentPrototype.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$(function() {
"use strict";

var componentName = function() {

function init() {
bindEventHandlers();
}

function bindEventHandlers() {
//...
}

init();
};

new componentName();
});
18 changes: 18 additions & 0 deletions assets/src/js/helpers/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$(function() {
"use strict";

var bootstrapHelpers = function() {

function init() {
bindEventHandlers();
}

function bindEventHandlers() {
$('[data-toggle="tooltip"]').tooltip();
}

init();
};

new bootstrapHelpers();
});
20 changes: 13 additions & 7 deletions sources/sass/app.scss → assets/src/scss/app.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
/**
* Bootstrap - Starter Kit
*
* @author Prismify
* @version 1.0.3
*/

// -------------------------------------------------------------------------------- //
// Options
//
// Quickly modify global styling by enabling or disabling optional features.
// -------------------------------------------------------------------------------- //

// Helpers: Variables, Functions, Mixins
// Helpers
// -------------------------------------------------------------------------------- //
@import "helpers/+import.helpers";

// Vendors: Bootstrap
// Vendors
// -------------------------------------------------------------------------------- //
@import "vendors/+import.vendors";

// Components:
// Components
// -------------------------------------------------------------------------------- //
@import "components/+import.components";

// Layouts:
// Layouts
// -------------------------------------------------------------------------------- //
@import "layouts/+import.layouts";

// -------------------------------------------------------------------------------- //
// Pages: Home
// Pages
// -------------------------------------------------------------------------------- //
@import "pages/+import.pages";

// Utilities:
// Utilities
// -------------------------------------------------------------------------------- //
@import "utilities/+import.utilities";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ======================================================================== //
// Import
// ======================================================================== //
// ======================================================================== //

@import "default";
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions assets/src/webfonts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
14 changes: 14 additions & 0 deletions config/f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Theme customization.
########################################################################################################################

fields:
app_name:
label: App Name
type: text
span: left
default: Bootstrap Starter Kit
app_href:
label: App Href
type: text
default: "https://example.org"
span: right
5 changes: 5 additions & 0 deletions config/r.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Theme dependencies.
#
# Example:
# - Acme.User
########################################################################################################################
9 changes: 9 additions & 0 deletions config/t.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Theme translate.
#
# Require: - RainLab:Translate
# Example:
# en:
# site.name: 'Bootstrap'
# Use:
# {{ 'site.name'|_ }}
########################################################################################################################
79 changes: 0 additions & 79 deletions configs/fields.yaml

This file was deleted.

44 changes: 28 additions & 16 deletions layouts/default.htm
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{% if this.page.description %}{{ this.page.description }}{% else %}{{ this.theme.meta_description }}{% endif %}">
<meta name="keywords" content="{% if this.page.keywords %}{{ this.page.keywords }}{% else %}{{ this.theme.meta_keywords }}{% endif %}">
<meta name="title" content="{% if this.page.title %}{{ this.page.title }}{% else %}{{ this.theme.meta_title }}{% endif %}">
<meta name="author" content="{{ this.theme.website_author }}">
<link rel="icon" href="{{ 'assets/images/favicon.ico'|theme }}">
<link href="{{ 'assets/css/app.css'|theme }}" rel="stylesheet">
<meta name="description" content="{{ this.page.meta_description }}">
<meta name="title" content="{{ this.page.meta_title }}">

<!-- App styles -->
<link rel="icon" href="{{ 'assets/public/images/favicon.ico'|theme }}">
<link rel="stylesheet" href="{{ 'assets/public/css/app.css'|theme }}">
{% styles %}
<title>{% if this.page.title %}{{ this.page.title }}{% else %}{{ this.theme.meta_title }}{% endif %} - {{ this.theme.website_name }}</title>

<title>{{ this.page.title }} - {{ this.theme.app_name }}</title>
</head>
<body class="layout-{{ this.layout.id }} page-{{ this.page.id }}">
<div id="site-header" class="site-header">
{% partial 'site/header' %}
</div>
<div id="site-content" class="site-content">
{% partial 'site/content' %}
</div>
<div id="site-footer" class="site-footer">
{% partial 'site/footer' %}

<div class="app-container">

<header id="app-header" class="app-header">
{% partial 'app/header' %}
</header>

<main id="app-content" class="app-content" role="main">
{% partial 'app/content' %}
</main>

<footer id="app-footer" class="app-footer">
{% partial 'app/footer' %}
</footer>

</div>

<script src="{{ 'assets/js/app.js'|theme }}"></script>
<!-- App scripts -->
<script type="text/javascript" src="{{ 'assets/public/js/manifest.js'|theme }}"></script>
<script type="text/javascript" src="{{ 'assets/public/js/vendor.js'|theme }}"></script>
<script type="text/javascript" src="{{ 'assets/public/js/app.js'|theme }}"></script>
{% framework extras %}
{% scripts %}
</body>
Expand Down
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "oc-bootstrap-theme",
"version": "1.0.2",
"version": "1.0.3",
"description": "Build responsive, mobile-first themes on the web with the world's most popular front-end component library.",
"main": "sources/js/app.js",
"main": "src/js/app.js",
"scripts": {
"dev": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"build": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"repository": {
"type": "git",
Expand All @@ -27,11 +29,15 @@
"license": "MIT",
"homepage": "https://github.com/prismify/oc-bootstrap-theme",
"devDependencies": {
"laravel-mix": "^3.0.0"
"cross-env": "^5.2.0",
"laravel-mix": "^4.0.*",
"sass": "^1.17.2",
"sass-loader": "7.*",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"bootstrap": "^4.1.3",
"bootstrap": "^4.3.*",
"jquery": "^3.3.1",
"popper.js": "^1.14.6"
"popper.js": "^1.15.*"
}
}
Loading

0 comments on commit ae6509e

Please sign in to comment.