1.0.2 • Published 5 years ago

aks-my-medium v1.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

aks-my-medium

A custom web element using Angular Element to display the list of user blogs from Medium.com

Usage

Add script before end of body tag

<script type="text/javascript" src="//unpkg.com/aks-my-medium@1.0.0/index.js"></script>

Or using npm

npm i --save aks-my-medium

and then in JavaScript file

import 'aks-my-medium';

Once the file is imported then in HTML

<aks-my-medium username="aks1357" blogs="true" blog-title="List of Blogs" author="true" author-title="Blog By"></aks-my-medium>

Inputs and defaults:

Inputs

Sr. No.inputtypedefaultdescription
1usernameString'@aks1357'change this to your username
2blogsBooleanfalseto display list of blogs set it to true
3blog-titleString'Blogs'update if required
4blog-classString'blogs-wrapper'wrapper CSS class for the blogs section
5authorBooleanfalseto display author basic info(title, image and description)
6author-titleString'Author Info'update if required
7author-classString'author-wrapper'wrapper CSS class for the author info section

Sample CSS for blogs-wrapper and author-wrapper

.blogs-wrapper {
  margin: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  .title {
    margin: 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #ccc;
  }
  .link {
    a {
      text-decoration: none;
      color: #000000;
    }
    a:hover {
      text-decoration: underline;
    }
  }
  .categories {
    list-style-type: none;
    padding: 0;
    margin: 0;
    li {
      display: inline-block;
      border: 1px solid #ccc;
      border-radius: 25%;
      padding: 5px;
      font-size: 12px;
      margin: 5px;
    }
  }
  .categories> :first-child {
    margin-left: 0 !important;
  }
  .separator {
    border-style: ridge;
    border-width: thin;
    border-color: #efefef;
  }
  .separator> :last-child {
    display: none;
  }
}

.author-wrapper {
  margin: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  .title {
    margin: 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #ccc;
  }
  .link {
    a {
      text-decoration: none;
      color: #000000;
    }
    a:hover {
      text-decoration: underline;
    }
  }
}