Responsive grid template editor concept

Size
4,205 Kb
Views
22,264

How do I make an responsive grid template editor concept?

A responsive grid template editor concept using AngularJs directives. This is a work in progress, dynamic rows adding (only 1 row for now), rows reordering. What is a responsive grid template editor concept? How do you make a responsive grid template editor concept? This script and codes were developed by Sébastien Lombard on 16 September 2022, Friday.

Responsive grid template editor concept Previews

Responsive grid template editor concept - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive grid template editor concept</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <header id="title"> <h1><i class="ion-grid"></i> Responsive grid template editor concept</h1> <p> A responsive grid template editor concept using AngularJs directives.<br /> <b>This is a work in progress, dynamic rows adding (only 1 row for now), rows reordering<br /> and "generate" button to output a Bootstrap compatible html file incoming.</b><br /><br /> Each block have 3 screen size grid settings <br />(try resizing your browser to see the grid changing) </p>
</header>
<div id="page" ng-app="templateApp" ng-controller="templateCtrl"> <input type="checkbox" id="toggleEditMode" ng-model="editmode"/> <label for="toggleEditMode" id="toggleEditModeLabel"> <i ng-class="{'ion-eye-disabled': !editmode, 'ion-eye': editmode}"></i> Hide Edit Mode </label> <row editmode="editmode"></row> <script type="text/ng-template" id="row.html"> <div class="row"> <label ng-hide="editmode">Number of blocks in this row </label> <select ng-model="nbCol.length" ng-change="addCol()" ng-hide="editmode"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> <br><br> <column ng-repeat="column in columns" editmode="editmode"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae ex ipsum quidem ipsa impedit, hic distinctio fuga qui praesentium velit pariatur, totam ut consectetur suscipit quasi illum magni fugiat a. </collumn> </div> </script> <script type="text/ng-template" id="column.html"> <div class="col-xs-{{xs}} col-sm-{{sm}} col-md-{{md}} col" ng-class="{'coledit': !editmode}"> <div ng-transclude></div> <nav class="settings" ng-hide="editmode"> <li><i class="ion-monitor"></i> <select ng-model="md"> <option value="1">1/12</option> <option value="2">2/12</option> <option value="3">3/12</option> <option value="4">4/12</option> <option value="5">5/12</option> <option value="6">6/12</option> <option value="7">7/12</option> <option value="8">8/12</option> <option value="9">9/12</option> <option value="10">10/12</option> <option value="11">11/12</option> <option value="12">1:1</option> </select> </li> <li><i class="ion-ipad"></i> <select ng-model="sm"> <option value="1">1/12</option> <option value="2">2/12</option> <option value="3">3/12</option> <option value="4">4/12</option> <option value="5">5/12</option> <option value="6">6/12</option> <option value="7">7/12</option> <option value="8">8/12</option> <option value="9">9/12</option> <option value="10">10/12</option> <option value="11">11/12</option> <option value="12">1:1</option> </select> </li> <li> <i class="ion-iphone"></i> <select ng-model="xs"> <option value="1">1/12</option> <option value="2">2/12</option> <option value="3">3/12</option> <option value="4">4/12</option> <option value="5">5/12</option> <option value="6">6/12</option> <option value="7">7/12</option> <option value="8">8/12</option> <option value="9">9/12</option> <option value="10">10/12</option> <option value="11">11/12</option> <option value="12">1:1</option> </select> </li> </nav> </div> </script>
</div>
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" /> <script src='http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Responsive grid template editor concept - Script Codes CSS Codes

body { padding: 5rem; padding-top: 2rem; font-family: sans-serif; font-weight: 100; text-align: center;
}
#toggleEditMode { display: none;
}
#toggleEditModeLabel { font-weight: 100; background-color: #3498db; color: white; padding: 0.5rem 1rem; border-radius: 0.3rem; line-height: 2rem; vertical-align: middle; margin: 4rem 0; -moz-user-select: -moz-none; -webkit-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;
}
#toggleEditModeLabel:hover { background-color: #8bc4ea;
}
#toggleEditModeLabel i { font-size: 2rem; line-height: 2rem; vertical-align: middle;
}
.coledit { position: relative; min-height: 5rem; border: 1px dashed #acacac; border-right: none; padding-bottom: 4rem;
}
.coledit:last-child { border: 1px dashed #acacac;
}
.coledit .settings { position: absolute; bottom: 0; left: 0; background-color: black; color: white; width: 100%; text-align: left; font-size: 1.5rem;
}
.coledit .settings li { display: inline-block; padding: 0.5rem; float: left; margin-right: 1rem;
}
.coledit .settings a { color: white; text-decoration: none;
}
.coledit .settings select { color: black;
}
.col { margin-bottom: 2rem;
}

Responsive grid template editor concept - Script Codes JS Codes

var templateApp = angular.module('templateApp', []);
function templateCtrl($rootScope, $scope){ $rootScope.editmode = $scope.editmode;
};
templateApp.directive('row', function() { return { restrict: 'E', replace: true, transclude: true, scope: { editmode: '=' }, link: function(scope, element, attrs) { scope.nbCol =[null]; scope.columns = [{"column": true}]; scope.addCol = function(){ scope.columns = []; angular.forEach(scope.nbCol, function(){ scope.columns.push({"column": true}); }); } }, templateUrl: 'row.html' };
});
templateApp.directive('column', function() { return { restrict: 'E', replace: true, transclude: true, scope: { editmode: '=' }, link: function(scope, element, attrs) { scope.md = '4'; scope.sm = '4'; scope.xs = '12'; }, templateUrl: 'column.html' };
});
Responsive grid template editor concept - Script Codes
Responsive grid template editor concept - Script Codes
Home Page Home
Developer Sébastien Lombard
Username SebL
Uploaded September 16, 2022
Rating 3
Size 4,205 Kb
Views 22,264
Do you need developer help for Responsive grid template editor concept?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Sébastien Lombard (SebL) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!