class="wp-block-image "
.wp-block-image img{
max-width: 100%;
height: auto;
}
or
.myclass img{
max-width: 100%;
height: auto;
}
class="wp-block-image "
.wp-block-image img{
max-width: 100%;
height: auto;
}
or
.myclass img{
max-width: 100%;
height: auto;
}
add in functions.php
add_theme_support( 'post-thumbnails' );
add_image_size('small-thumbnail', 350, 230, true);
add_image_size('post-image', 600, 400, true);
single.php
<?php the_post_thumbnail('post-image'); ?>
Display some contents in certain pages of wordpress only.
Hide contents from some pages.
<?php if(is_page(14)) {?>
display this.....
<?php } ?>
Create file
single.php
Referance: https://wordpress.org/support/topic/create-new-basic-single-php-template/
<?php while ( have_posts() ) : the_post(); ?>
POST TITLE
<h1 class="intro-title mb-4"><h1 class="page-title"><a href="
<?php the_permalink(); ?>"><?php the_title();?>
</a></h1>
POST CONTENT
<p>
<?php the_content(); ?>
</p>
<?php endwhile; ?>
Activating navigation menu and using it with code.
function.php
<?php echo get_home_url(); ?>
index.php
<?php
$defaults = array(
'container' => 'ul',
'theme_location' => 'primary-menu',
'menu_class' => 'nav navbar-nav '
);
wp_nav_menu( $defaults);
?>
or
Home Button in Navigation menu of wordpress
create new file
landing.php
Goto wp-content/themes
create basic php and css files
Functions.php
floatingActionButton: Theme(
data: ThemeData(accentColor: Colors.green),
child: FloatingActionButton(
child: Icon(Icons.add),
),
),
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primaryColor: Color(0xFF0A0E21),
scaffoldBackgroundColor: Color(0xFF0AE21),
accentColor: Colors.purple,
textTheme: TextTheme(
body1: TextStyle(color: Color(0xFFFFFFFF)),
)),
home: InputPage(),
);
Container, Row
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.teal,
body: SafeArea(
child: Column(
children: [
CircleAvatar(
radius: 50.0,
backgroundImage: AssetImage('images/sreeraj.jpg'),
),
Text(
'Sreeraj Melath',
style: TextStyle(
fontFamily: 'Pacifico',
fontSize: 40.0,
color: Colors.white,
fontWeight: FontWeight.bold),
),
Text(
'FLUTTER DEVELOPER',
style: TextStyle(
fontFamily: 'SourceSansPro',
fontSize: 20.0,
letterSpacing: 3,
color: Colors.teal[100],
fontWeight: FontWeight.bold),
),
Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 25.0),
padding: EdgeInsets.all(10.0),
child: Row(
children: [
Icon(Icons.phone, color: Colors.teal[900]),
SizedBox(
width: 20.0,
),
Text(
"+91 9846 098 460",
style: TextStyle(
color: Colors.teal[900],
fontFamily: 'SourceSansPro',
fontSize: 20.0,
fontWeight: FontWeight.bold),
),
],
),
),
Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 25.0),
padding: EdgeInsets.all(10.0),
child: Row(
children: [
Icon(
Icons.email,
color: Colors.teal[900],
),
SizedBox(
width: 20.0,
),
Text(
"sreeraj@infoexpo.in",
style: TextStyle(
fontFamily: 'SourceSansPro',
fontSize: 20.0,
color: Colors.teal[900],
fontWeight: FontWeight.bold,
),
)
],
),
)
],
),
),
),
);
}
}
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.teal,
body: SafeArea(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: 100,
color: Colors.red,
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 100,
height: 100,
color: Colors.yellow,
),
Container(
width: 100,
height: 100,
color: Colors.green,
)
],
),
Container(
width: 100,
color: Colors.blue,
),
],
),
),
),
);
}
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.blueGrey,
appBar: AppBar(
title: Text("National Park"),
backgroundColor: Colors.blueGrey[900],
),
body: Center(
child: Image(image: AssetImage('images/bird.png')),
),
),
),
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.blueGrey,
appBar: AppBar(
title: Text("My Image App"),
backgroundColor: Colors.blueGrey[900],
),
body: Center(
child: Image(
image: NetworkImage(
'https://images.squarespace-cdn.com/content/v1/5a5906400abd0406785519dd/1552662149940-G6MMFW3JC2J61UBPROJ5/ke17ZwdGBToddI8pDm48kLkXF2pIyv_F2eUT9F60jBl7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0iyqMbMesKd95J-X4EagrgU9L3Sa3U8cogeb0tjXbfawd0urKshkc5MgdBeJmALQKw/baelen.jpg'),
),
),
),
),
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Center(
child: Text('Hello World'),
),
),
);
}
mkdir vanilla-js-todo
cd vanilla-js-todo
Intalling touch (unix)
npm install touch-cli -gtouch index.html style.css app.js
VS CODE : ! to generate HTML snippet
link - for style linking code
install live server extension
font awesome cdn - cdnjs.com
open index.html by right click - > open with live server
CSS - click correction
npm install jsonwebtoken
npm install js-cookie
const removerFromCart = (productId) => (dispatch, getState) => {dispatch({ type: CART_REMOVE_ITEM, payload:productId });const { cart: {cartItems } } = getState();Cookie.set("cartItems", JSON.stringify(cartItems));}
npm install dotenv
export default {MONGODB_URL: process.env.MONGODB_URL || 'mongodb://localhost/amazona'}
npm install mongoose
npm install express (root folder)
node backend/server.js
npm start
npm install redux react-redux
npm install redux-thunk
const [qty, setQty] = useState(1);
npx create-react-app app-namecd app-namenpm start
replace onclick="closeMenu()" to onClick={closeMenu}
<ul className="products">{data.products.map(product =><li><div className="product"><img className="product-image" src={product.image} alt="product" /><div className="product-name"><a href="product.html">{product.name}</a></div><div className="product-brand">{product.brand}</div><div className="price"> ${product.price}</div><div className="product-rating"> {product.rating} Stars ({product.reviewCount} reviews)</div></div></li>)}</ul>
npm install react-router-dom