Sunday, 16 May 2021

useReducer in React

const [state, dispatch] = useReducer(reducer, initialArg, init);

An alternative to useState. Accepts a reducer of type (state, action) => newState, and returns the current state paired with a dispatch method. (If you’re familiar with Redux, you already know how this works.)

useReducer is usually preferable to useState when you have complex state logic that involves multiple sub-values or when the next state depends on the previous one. useReducer also lets you optimize performance for components that trigger deep updates because you can pass dispatch down instead of callbacks.

Here’s the counter example from the useState section, rewritten to use a reducer: 



const initialState = { count: 0 };

function reducer(state, action) {
switch (action.type) {
case "increment":
return { count: state.count + 1 };
case "decrement":
return { count: state.count - 1 };
default:
throw new Error();
}
}

function Counter() {
const [state, dispatch] = useReducer(reducer, initialState);
return (
<>
Count: {state.count}
<button onClick={() => dispatch({ type: "decrement" })}>-</button>
<button onClick={() => dispatch({ type: "increment" })}>+</button>
</>
);
}



Specifying the initial state

There are two different ways to initialize useReducer state. You may choose either one depending on the use case. The simplest way is to pass the initial state as a second argument:


  const [state, dispatch] = useReducer(
    reducer,
    {count: initialCount}  );

Lazy initialization

You can also create the initial state lazily. To do this, you can pass an init function as the third argument. The initial state will be set to init(initialArg).

It lets you extract the logic for calculating the initial state outside the reducer. This is also handy for resetting the state later in response to an action:

function init(initialCount) {  return {count: initialCount};}
function reducer(state, action) {
  switch (action.type) {
    case 'increment':
      return {count: state.count + 1};
    case 'decrement':
      return {count: state.count - 1};
    case 'reset':      return init(action.payload);    default:
      throw new Error();
  }
}

function Counter({initialCount}) {
  const [state, dispatch] = useReducer(reducer, initialCount, init);  return (
    <>
      Count: {state.count}
      <button
        onClick={() => dispatch({type: 'reset', payload: initialCount})}>        Reset
      </button>
      <button onClick={() => dispatch({type: 'decrement'})}>-</button>
      <button onClick={() => dispatch({type: 'increment'})}>+</button>
    </>
  );
}

  • Using useMemo( ) -
    It is a React hook that is used for caching CPU-Expensive functions.
    Sometimes in a React app, a CPU-Expensive function gets called repeatedly due to re-renders of a component, which can lead to slow rendering.
    useMemo( ) hook can be used to cache such functions. By using useMemo( ), the CPU-Expensive function gets called only when it is needed.

  • Using React.PureComponent -
    It is a base component class that checks state and props of a component to know whether the component should be updated.
    Instead of using the simple React.Component, we can use React.PureComponent to reduce the re-renders of a component unnecessarily.

  • Maintaining State Colocation -
    This is a process of moving the state as close to where you need it as possible.
    Sometimes in React app, we have a lot of unnecessary states inside the parent component which makes the code less readable and harder to maintain. Not to forget, having many states inside a single component leads to unnecessary re-renders for the component.
    It is better to shift states which are less valuable to the parent component, to a separate component.

  • Lazy Loading -
    It is a technique used to reduce the load time of a React app. Lazy loading helps reduce the risk of web app performances to minimal.

Sunday, 9 May 2021

Multi-level groupBy Using underscorejs or lodash

                # nest.js



                A multi-level [groupBy](http://underscorejs.org/#groupBy) 
                for arrays inspired by D3's [nest](https://github.com/mbostock/d3/wiki/Arrays#-nest) operator.



                Nesting allows elements in an array to be grouped into a hierarchical tree

                structurethink of it like the `GROUP BY` operator in SQLexcept you can have

                multiple levels of groupingand the resulting output is a tree rather than a

                flat tableThe levels in the tree are specified by key functions.



                See [this fiddle](http://jsfiddle.net/V7an5/3/) for live demo.





                ## Implementation



                Depends on lodash's [groupBy](http://lodash.com/docs#groupBy) and
                 [mapValues](http://lodash.com/docs#mapValues):



                ```js

                _ = require('lodash');



                var nest = function (seq, keys) {

                    if (!keys.length)

                        return seq;

                    var first = keys[0];

                    var rest = keys.slice(1);

                    return _.mapValues(_.groupBy(seq, first), function (value) { 

                        return nest(value, rest)

                    });

                };



                module.exports = nest;

                ```





                ## Usage



                Input data to be nested:



                ```js

                var data = [

                { type: "apple", color: "green", quantity: 1000 }, 

                { type: "apple", color: "red", quantity: 2000 }, 

                { type: "grape", color: "green", quantity: 1000 }, 

                { type: "grape", color: "red", quantity: 4000 }

                ];

                ```



                Key functions used for grouping criteria:



                ```js

                var byType = function(d) {

                return d.type;

                };



                var byColor = function(d) {

                return d.color;

                };



                var byQuantity = function(d) {

                return d.quantity;

                };

                ```





                ## First Example



                Expected output when grouping by `color` and `quantity`:



                ```js

                var expected = {

                green: {

                    "1000": [

                    { type: 'apple', color: 'green', quantity: 1000 }, 

                    { type: 'grape', color: 'green', quantity: 1000 }

                    ]

                },

                red: {

                    "2000": [

                    { type: 'apple', color: 'red', quantity: 2000 }

                    ],

                    "4000": [

                    { type: 'grape', color: 'red', quantity: 4000 }

                    ]

                }

                };

                ```



                Nest by key name:



                ```js

                deepEqual(nest(data, ['color', 'quantity']), expected);

                ```



                Nest by key functions:



                ```js

                deepEqual(nest(data, [byColor, byQuantity]), expected);

                ```





                ## Second Example



                Expected output when grouping by `type` and `color`:



                ```js

                expected = {

                apple: {

                    green: [ { "type": "apple", "color": "green", "quantity": 1000 } ],

                    red: [ { "type": "apple", "color": "red", "quantity": 2000 } ]

                },

                grape: {

                    green: [ { "type": "grape", "color": "green", "quantity": 1000 } ],

                    red: [ { "type": "grape", "color": "red", "quantity": 4000 } ]

                }

                };

                ```



                Nest by key names:



                ```js

                deepEqual(nest(data, ['type', 'color']), expected);

                ```



                Nest by key functions:



                ```js

                deepEqual(nest(data, [byType, byColor]), expected);

                ```


Tuesday, 13 April 2021

अशांति का मूल कारण क्या है ?


गंधार शांत था कंधार अशांत है

कुंभा शांत था काबुल अशांत है

पर्शिया शांत था ईरान अशांत है

कैकेय शांत था पेशावर अशांत है

बाल्हीक शांत था बल्ख अशांत है

कंबोज शांत था बदख्शां अशांत है

सुवास्तु शांत था स्वात घाटी अशांत है

तक्षशिला शांत था रावलपिंडी अशांत है 

 अकर्मण्यता , कायरता , कुतर्क और निष्क्रियता का बढ़ ना और उस की वजह से जेहादी मजहबो का बढ़ ना यह 

 अशांति का मूल कारण है 

 https://www.thereligionofpeace.com/







   Basic Legal Non-Aggressive Law

   घुसपैठ नियंत्रण कानून , धर्मांतरण नियंत्रण कानून , जनसंख्या नियंत्रण कानून , समान नागरिक संहिता कानून

    यह कानून केवल बुद्धिजीवी को द्वारा कानून  स्वीकृति हे ,की हा यह करना चाहिए , लेकिन इसका १०० % पालन करने पर ही यह समाधान बन सकता हे।  केवल कानून बना देने  से कुछ भी नहीं होने वाला और केवल यही ४ कानून से सारि समस्या का समाधान हो जायेगा ऐसा भी नहीं हे 


US का क्षेत्रफल हमसे 3 गुना है और जनसंख्या मात्र 33 करोड़ इसलिए 2 गज की दूरी संभव है


चीन का क्षेत्रफल हमसे 3 गुना है और जनसंख्या 144 करोड़ इसलिए 2 गज की दूरी संभव है


भारत में 2 गज की दूरी असंभव है। जमीन दुनिया की मात्र 2% है और जनसंख्या 20% [125 करोड़ आधार +25 करोड़ बिना आधार]


चीन का क्षेत्रफल हमसे तीन गुना है फिर भी उसने 1950 में 'हम दो हमारे दो' कानून बनाया और 60 करोड़ बच्चों को पैदा होने से रोक दिया


यदि सरकार ने 1950 में जनसंख्या नियंत्रण कानून बनाया होता तो हम आज 150 करोड़ नहीं बल्कि 100 करोड़ से कम होते



राक्षस को खाते हुए राक्षस 

बड़े राक्षस के ऊपर छोटे राक्षस का कब्जा



   जिस कौम में डॉक्टर कम, आतंकवादी ज़्यादा हैं वो भी हॉस्पिटल पर ज्ञान बांट रहे है



Friday, 9 April 2021

हमारे दुश्मन अकर्मण्यता , कायरता , कुतर्क और निष्क्रियता

 

हमारे लोग हमेशा कोई ना कोई बहाना ढूंढ लेते हैं और हमारे पास जो रिसोर्स हे उस का कहा और कैसे उपयोग करे और उश्मे कैसे बढ़ोतरी करे ये ना सोच कर कोई ना कोई बहाना ढूंढ लेते हैं .


हमारे  ज्यादातर लोग केवल दुखो का रोना रोते रहते हे .कई बार तो इनको प्रॉब्लम का भी सही से ज्ञान नहीं होता हे 

इनको सहिमे प्रोब्ले काया हे वो पतानहीं होता हे।  वे हमेशा प्रॉब्लम क्या हे वो बदलते रहते हे .

असल में ये बात इनको पता हो और न हो ऐसा भी हो सकता हे . और हमेशा यही प्रॉब्लम के बारे में उनको संशय होता है

और प्रॉब्लम क्या है वो पता लग भी गया तो भी मनुष्य का सबसे बड़े दुश्मन  अकर्मण्यता , कायरता , कुतर्क और निष्क्रियता

समस्या का समाधान मिल भी जाये तो भी अकर्मण्यता का शिकारी अपनी अकर्मण्यता छुपाने के लिए कोई ना कोई बहाना 

ढूंढ लेते हैं . अकर्मण्यता का कारण कायरता भी हो सकता है .और कायरता छुपाने के लिए कोई ना कोई कुतर्क का सहारा लिया जाता है .  

ऐसे लोग इतिहास और वर्तमान की सिस्टम का दोष दे कर वर्त्तमान में निष्क्रियता में रह कर 

भविष्य उज्जवल बनानेकी बाते करते हे .

निष्क्रियता  छुपाने के लिए कोई ना कोई कुतर्क का सहारा लिया जाता है .  Example ( अहिंसा )

जो  मनुष्य केवल खुद को यूनिवर्स के सेण्टर में रख कर जी रहा हो और खुद का फायदा ही सबसे महत्व पूर्ण रख ता हो उस  नेरो माइंडसेट (संकीर्ण मानसिकता ) का मनुष्य अकर्मण्यता , कायरता , कुतर्क और निष्क्रियता का सहारा लेता हे 

ऐसा मनुष्य मानवता और खुद का भी दुश्मन होता है . हमारे आज कल के जिहादियों की फ्री में वकालत करने वालो का कुछ असा ही हाल हे

जिज्ञासा और संदेह (संशय) कोई भी रिसर्च के लिए बहुत ही अच्छा है . लेकिन पूरी लाइफ संशय में बिता देना अच्छी बात नहीं 

संशय भी ऐसा होना चाहिए की उसे मानवता और विज्ञान में बढ़ोतरी हो . 

सरकार के अधीन भारत के हिंदू मंदिर नहीं रहने चाहिए ये बात बिलकुल सही हे  क्युकी हमारा राष्ट्र अभी भी हिन्दू , जैन और बौद्ध धर्म दर्शनशास्र  १००% फॉलो नहीं करता इतिहास और वर्त्तमान की अकर्मण्यता , कायरता , कुतर्क और निष्क्रियता की वजहसे जिहादी मजहब भी संविधान की आड़ में सामान और सुरक्षित हे इसलिए . लेकिन अभी भी सरकार के  अधीन नहीं रहने चाहिए ये पता  हे लेकिन किशके अधीन रहना छाए ये बहोत कॉम्प्लिकेटेड समस्या हे . और जब तक हम एक अखंड महाभारत हिंदू राष्ट्र नहीं बनाते, तब तक  100% और स्थायी समाधान नहीं है। लेकिन तबतक हमें वर्त्तमान के हालत के अनुसार कैसे भी करके मंदिरो को ये सेकुलर और सर्व धर्म समभाव  ( मानव और राक्षस दोनों एक ही हे वाले सविधान ) के चगुल में से छुड़वा लेने हे 

केलिन सरकार के अधीन से निकलने के बाद भी ये मंदिर केवल हिन्दू औ के लिए अच्छे कार्य करसकते हे लेकिन राष्ट्र के लिए काम नहीं आ सकते क्युकी राष्ट्र के लिए कुछभी करना उस में जेहादिओं का भी हिस्सा होगा अभी के सविधान के हिसाबसे .

मंदिरो की सम्पति केवल हिन्दू ओ के लिए यूज़ होनी चाहिए।  और उष्का जेहादी और को प्रत्यक्ष और अप्रत्यक्ष 

रूप से कोई भी फायदा नहीं होना चाहिए

हमारे कई लोग आज बोल रहे हे मंदिरो का धन सरकार के पास जरहाहे इसलिए सनातन कमजोर पड़ रहाहे , बात तो सही हे लेकिन कोई ये नहीं बता रहा ही जो मंदिर सरकार के अंतर्गत नहीं हे और उन्हें करोडो का सालाना दान मिलता हे उस मेसे कितना धन आजतक यति नरसिम्हा नन्द सरस्वती जैसे योद्धा ओ को काम में आया ?. 

मेरे शेरो बढ़ो आगे , करो दिशाओं को रोशन अपनी चिता ओ से -- यति नरसिम्हा नन्द सरस्वती

समझ समझ के समझ को समझो समझ समझना भी एक समझ है समझ समझ को जो ना समझे मेरी समझ में वह नासमझ है  -- सूर्यसागरजी गुरुदेव 

#Nationalist #philosophie #दार्शनिक



Saturday, 27 March 2021

node-redis with ZADD , ZRANGE , ZREMRANGEBYSCORE , ZREVRANGEBYSCORE

 


Node-Redis with ZADD , ZRANGE , ZREMRANGEBYSCORE , ZREVRANGEBYSCORE with
Limit and offset usecase in Chat Application.

Commands with Optional and Keyword arguments
This applies to anything that uses an optional [WITHSCORES] or
[LIMIT offset count] in the redis.io/commands documentation.

Example:

var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];
client.zadd(args, function (err, response) {
if (err) throw err;
console.log('added '+response+' items.');

var args1 = [ 'myzset', '+inf', '-inf' ];
client.zrevrangebyscore(args1, function (err, response) {
if (err) throw err;
console.log('example1', response);
// write your code here
});

var max = 3, min = 1, offset = 1, count = 2;
var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];
client.zrevrangebyscore(args2, function (err, response) {
if (err) throw err;
console.log('example2', response);
// write your code here
});
});

// set using node-redis client

let from_user = data.from_user;
let to_user = data.to_user;
let chat_uuid = new Date().getTime();
let chat_key = "chat:from:"+from_user+":to:"+to_user;
redisUtil.redisCli.zadd(chat_key,chat_uuid,JSON.stringify(data),
function(chat_save_error,chat_save_data){
console.log(chat_save_error);
});

// get using node-redis client
let chat_key = "chat:from:"+inputs.from_user+":to:"+inputs.to_user;
redisUtil.redisCli.zrange(chat_key,0,-1,'withscores',function(err,result){

});

// Delete Chat From Radis In Beetween Ids
ZREMRANGEBYSCORE chat:from:ADMIN2:to:ADMIN (1616750982327 1616750995307

// Get All Chat From Redis WITHSCORES
ZRANGE chat:from:ADMIN:to:ADMIN2 0 -1 WITHSCORES

// Get Last 5 Chat From Redis
ZREVRANGEBYSCORE chat:from:ADMIN:to:ADMIN2 +inf -inf LIMIT 0 5


jihad mindmap


Hezbollah’s organizational structure

 

Hezbollah’s organizational structure



Click To View Large Image and Right Click ---> Open Image in New Tab

Friday, 19 February 2021

vue and vuetify with carousel

 



example code

https://github.com/pranaysonisoft/vue_with_vuetify/tree/master


package.json

{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vuetify": "^2.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.1.0",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}






---------------------------------------------------------
components/HelloWorld.vue
---------------------------------------------------------


<template> <v-container> <v-col xs="12" cols="12"> <v-carousel :show-arrows="false" height="550px"> <v-carousel-item :key="i" v-for="i in height"> <v-layout row> <v-flex xs{{colsize}} :key="j" v-for="j in 5"> <v-card class="mx-auto my-12 rounded-card" max-width="280"> <v-card-text class="pa-0"> <div class="priceTable"> <div class="priceTableContainer"> <div class="module"> <div class="upperpart"> <div class="paylable">You Pay</div> <div> <span class="price"> AED 125 </span> <span class="color-pink">/month</span></div> <div class="tax"> For 12 months + 5% VAT <span>/month</span> </div> <v-divider light class="custom-card-divider"></v-divider> <div class="payget">You Get</div> <div class="planname">Power Plan 125</div> <v-divider light class="custom-card-divider"></v-divider> <div class="plandetail"> <div class="planrow"> <p class=" cross">13</p> <b class="font28">26 GB</b>National Data </div> <div class="planrow"><b>100</b>Flexi minutes</div> </div> <v-divider light class="custom-card-divider"></v-divider> <div class="planterms"> <div class="term"> <v-icon light> mdi-check </v-icon> No activation fee.Save AED 125 </div> <div class="term"> <v-icon light> mdi-check </v-icon> 4 GB free data on WiFi UAE </div> </div> </div> <div class="footerpart"> <div class="limitedOfferSection"> <div class="x-small limitedTimeOffer"> Limited time offer </div> <div class="limitedTimeOfferText"> <b>The Entertainer</b> on us for 12 months </div> </div> </div> <v-card-actions class="footer ma-0"> <div class="whatyouget">What you get</div> <div class="selectButton"> <v-btn class="btnSelect">Select</v-btn> </div> </v-card-actions> </div> </div> </div> </v-card-text> </v-card> </v-flex> </v-layout> </v-carousel-item> </v-carousel> </v-col> </v-container> </template> <script> export default { name: 'HelloWorld', computed: { height() { let name = this.$vuetify.breakpoint.name console.log("name :" + name); if (name == "xs") { return 5; } else { return 2; } }, colsize() { let name = this.$vuetify.breakpoint.name console.log("name :" + name); if (name == "xs") { return 12; } else { return 3; } }, heights() { return 5; } } } </script> <style> .v-carousel { overflow: visible !important; } .v-carousel__controls { bottom: -45px !important; background: none !important; } .v-carousel__controls__item { color: #cc1eac !important } </style> <style scoped> .v-chip.ongoing { background: #ffaa2c; } .custom-card-divider { margin-bottom: 10px; margin-top: 10px; } .rounded-card { border-radius: 15px !important; overflow: hidden; } .color-pink { color: #cc1eac; } @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap"); .priceTable { background: #f7f7f7; border-radius: 10px; } .module { display: flex; flex-direction: column; justify-content: space-between; padding: 5px 15px 15px 15px; border-radius: 10px; background: #fff; color: white; border-width: 6px; border-style: solid; height: 500px; border-image: linear-gradient(to bottom, #cc1eac, #576abc, #28a9cc) 0 0 1 100%; } .paylable { color: #cc1eac; font-size: 12px; } .payget { color: #28a8cb; } .priceTableContainer { border-radius: 10px; overflow: hidden; height: 500px; } .price { color: #cc1eac; font-weight: bold; font-size: 1.2rem; margin-bottom: 5px; } .tax { color: #000; font-size: 0.8rem; } .planname { color: #28a8cb; font-weight: bold; font-size: 1.2rem; } .plandetail { color: #000; display: flex; flex-direction: column; } .plandetail .planrow { margin-bottom: 5px; font-size: 0.8rem; } .plandetail .planrow b { font-size: 1.2rem; margin-right: 15px; margin-bottom: 5px; } .planterms { color: #000; min-height: 100px; } .planterms .term { color: #000; margin-bottom: 8px; font-size: 0.8rem; } .footer { border-top: 1px solid #ccc; display: flex; justify-content: space-between; align-items: center; padding: 10px 0px; margin-bottom: 10px; } .footer .whatyouget { color: #000; text-decoration: underline; font-size: 0.8rem; } .selectButton .btnSelect { background: #fff !important; padding: 10px 40px !important; border: none; color: #d134b4; box-shadow: 0px 0px 3px 0px #ccc; font-size: 13px; font-weight: bold; text-transform: capitalize; } .limitedOfferSection { color: #000; } .limitedTimeOffer { width: 100px; text-align: center; color: #000; font-size: 0.6rem; color: #fff; font-weight: bold; border-radius: 50px; background: #FF0099; /* fallback for old browsers */ background: -webkit-linear-gradient(to right, #493240, #FF0099); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to right, #5831a0, #cc0ead); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .limitedOfferSection .limitedTimeOfferText { color: #000; font-size: 0.8rem; } .cross { position: relative; display: inline-block; color: gray; font-size: 25px; } .cross::before, .cross::after { content: ''; width: 100%; position: absolute; right: 0; top: 50%; } .cross::before { border-bottom: 2px solid #9e9494; transform: skewY(23deg); -webkit-transform: skewY(23deg); } .font28 { font-size: 1.9rem !important } .most-popular { background:#00205b; color:white; position:absolute; top: -20px; z-index: 1000; font-weight: bold; font-size: 14px; padding-left: 15px; padding-right: 15px; margin-left: 5px; border-top-left-radius: 10px; border-top-right-radius: 10px; } </style>
---------------------------------------------------------
plugins/vuetify.js
---------------------------------------------------------
import Vue from 'vue';
import Vuetify from 'vuetify/lib/framework';

Vue.use(Vuetify);

export default new Vuetify({
});

---------------------------------------------------------
main.js
---------------------------------------------------------
import Vue from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify';

Vue.config.productionTip = false


new Vue({
vuetify,
render: h => h(App)
}).$mount('#app')

 
---------------------------------------------------------
app.vue
---------------------------------------------------------


<template> <v-app> <v-main> <HelloWorld /> <v-card class="mx-auto my-12 rounded-card" max-width="300"> <v-card-text class="pa-0"> <div class="priceTable"> <div class="most-popular">Most popular</div> <div class="priceTableContainer"> <div class="module"> <div class="upperpart"> <div class="paylable">You Pay</div> <div> <span class="price"> AED 125 </span> <span class="color-pink">/month</span></div> <div class="tax"> For 12 months + 5% VAT <span>/month</span> </div> <v-divider class="custom-card-divider"></v-divider> <div class="payget">You Get</div> <div class="planname">Power Plan 125</div> <v-divider class="custom-card-divider"></v-divider> <div class="plandetail"> <div class="planrow"> <p class=" cross">13</p> <b class="font28">26 GB</b>National Data </div> <div class="planrow"><b>100</b>Flexi minutes</div> </div> <v-divider class="custom-card-divider"></v-divider> <div class="planterms"> <div class="term"> <v-icon> mdi-check </v-icon> No activation fee.Save AED 125 </div> <div class="term"> <v-icon> mdi-check </v-icon> 4 GB free data on WiFi UAE </div> </div> </div> <div class="footerpart"> <div class="limitedOfferSection"> <div class="x-small limitedTimeOffer"> Limited time offer </div> <div class="limitedTimeOfferText"> <b>The Entertainer</b> on us for 12 months </div> </div> </div> <v-card-actions class="footer ma-0"> <div class="whatyouget">What you get</div> <div class="selectButton"> <v-btn class="btnSelect">Select</v-btn> </div> </v-card-actions> </div> </div> </div> </v-card-text> </v-card> </v-main> </v-app> </template> <script> import HelloWorld from './components/HelloWorld'; export default { name: 'App', components: { HelloWorld, }, computed: { createBackgroundString() { return `linear-gradient(to bottom, #cc1eac, #576abc, #28a9cc) 0 0 1 100%`; } }, data() { return { items: [{ src: 'https://cdn.vuetifyjs.com/images/carousel/squirrel.jpg', }, { src: 'https://cdn.vuetifyjs.com/images/carousel/sky.jpg', }, { src: 'https://cdn.vuetifyjs.com/images/carousel/bird.jpg', }, { src: 'https://cdn.vuetifyjs.com/images/carousel/planet.jpg', }, ], } }, }; </script> <style scoped> .v-chip.ongoing { background: #ffaa2c; } .custom-card-divider { margin-bottom: 10px; margin-top: 10px; } .rounded-card { border-radius: 15px !important; } .color-pink { color: #cc1eac; } @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap"); .priceTable { background: #f7f7f7; border-radius: 10px; } .module { display: flex; flex-direction: column; justify-content: space-between; padding: 5px 15px 15px 15px; border-radius: 10px; background: #fff; color: white; border-width: 6px; border-style: solid; height: 500px; border-image: linear-gradient(to bottom, #cc1eac, #576abc, #28a9cc) 0 0 1 100%; } .paylable { color: #cc1eac; font-size: 12px; } .payget { color: #28a8cb; } .priceTableContainer { border-radius: 10px; overflow: hidden; height: 500px; } .price { color: #cc1eac; font-weight: bold; font-size: 1.2rem; margin-bottom: 5px; } .tax { color: #000; font-size: 0.8rem; } .planname { color: #28a8cb; font-weight: bold; font-size: 1.2rem; } .plandetail { color: #000; display: flex; flex-direction: column; } .plandetail .planrow { margin-bottom: 5px; font-size: 0.8rem; } .plandetail .planrow b { font-size: 1.2rem; margin-right: 15px; margin-bottom: 5px; } .planterms { color: #000; min-height: 100px; } .planterms .term { color: #000; margin-bottom: 8px; font-size: 0.8rem; } .footer { border-top: 1px solid #ccc; display: flex; justify-content: space-between; align-items: center; padding: 10px 0px; margin-bottom: 10px; } .footer .whatyouget { color: #000; text-decoration: underline; font-size: 0.8rem; } .selectButton .btnSelect { background: #fff !important; padding: 10px 40px !important; border: none; color: #d134b4; box-shadow: 0px 0px 3px 0px #ccc; font-size: 13px; font-weight: bold; text-transform: capitalize; } .limitedOfferSection { color: #000; } .limitedTimeOffer { width: 100px; text-align: center; color: #000; font-size: 0.6rem; color: #fff; font-weight: bold; border-radius: 50px; background: #FF0099; /* fallback for old browsers */ background: -webkit-linear-gradient(to right, #493240, #FF0099); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to right, #5831a0, #cc0ead); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .limitedOfferSection .limitedTimeOfferText { color: #000; font-size: 0.8rem; } .cross { position: relative; display: inline-block; color: gray; font-size: 25px; } .cross::before, .cross::after { content: ''; width: 100%; position: absolute; right: 0; top: 50%; } .cross::before { border-bottom: 2px solid black; transform: skewY(23deg); -webkit-transform: skewY(23deg); } .font28 { font-size: 1.9rem !important } .most-popular { background:#00205b; color:white; position:absolute; top: -20px; z-index: 1000; font-weight: bold; font-size: 14px; padding-left: 15px; padding-right: 15px; margin-left: 5px; border-top-left-radius: 10px; border-top-right-radius: 10px; } </style>

index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>