Action

nahumck.me Preview

Posted by @nahumck, Last update over 5 years ago - Unlisted

Preview of my website, https://nahumck.me/. Updated to include the MultiMarkdown additions added in the Drafts 5.5 release.

Steps

  • script

    // Convert MMD text w/ Critic Markup to standard Markdown
    
    /* --- Post --- */
    let text = draft.content;
    let mmd = MultiMarkdown.create();
    mmd.criticMarkup = true;
    mmd.criticMarkupAccept = true;
    let post = mmd.render(text)
    draft.setTemplateTag("post",post);
  • htmlpreview

    <html>
    <head>
    <title>nahumck.me Preview</title>
    <style type="text/css">
    /*
    Ulysses WordPress Preview: nahumck.me (based on WP Twenty Sixteen)
    */
    
    * {
    -webkit-text-size-adjust:	none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizelegibility !important;
    }
    
    body {
    color: #f2f2f2;
    font-family: IBMPlexMono, sans-serif;
    font-size: 16px;
    font-size: 1rem;
    line-height: 1.75;
    background-color: #424242;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 25px;
    margin-bottom: 25px;
    }
    
    @media screen and (max-width: 668px) {
    body {
    margin-right: 7.6923%;
    margin-left: 7.6923%;
    width: auto;
    }
    }
    
    p {
    margin: 0 0 1.75em;
    }
    
    h1, h2, h3, h4, h5, h6 {
    clear: both;
    font-weight: 700;
    margin: 0;
    text-rendering: optimizeLegibility;
    }
    
    h1 {
    font-weight: 900;
    font-size: 26px;
    font-size: 1.75rem;
    line-height: 1.25;
    margin-top: 2em;
    margin-bottom: 1em;
    }
    
    h1.entry-title {
    font-family: IBMPlexMono, sans-serif;
    font-size: 28px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1em;
    }
    
    h1.entry-title a {
    box-shadow: none;
    text-decoration: none;	
    color: #f2f2f2;
    }
    
    h1.entry-title a:hover {
    box-shadow: 0 1px 0 0 currentColor;
    }
    
    h2 {
    font-size: 23px;
    font-size: 1.4375rem;
    line-height: 1.2173913043;
    margin-top: 2.4347826087em;
    margin-bottom: 1.2173913043em;
    }
    
    h3 {
    font-size: 19px;
    font-size: 1.1875rem;
    line-height: 1.1052631579;
    margin-top: 2.9473684211em;
    margin-bottom: 1.4736842105em;
    }
    
    h4, h5, h6 {
    font-size: 16px;
    font-size: 1rem;
    line-height: 1.3125;
    margin-top: 3.5em;
    margin-bottom: 1.75em;
    }
    
    h4 {
    letter-spacing: 0.140625em;
    text-transform: uppercase;
    }
    
    
    h6 {
    font-style: italic;
    }
    
    hr {
    background-color: #f2f2f2;
    border: 0;
    height: 1px;
    margin: 0 0 1.75em;
    }
    
    em {
    font-style: italic;
    }
    
    strong {
    font-style: bold;
    }
    
    small {
    font-size: 80%;
    }
    
    sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    }
    
    sub {
    bottom: -0.25em;
    }
    
    sup {
    top: -0.5em;
    }
    
    a {
    color: #f7ea00;
    text-decoration: none;
    box-shadow: 0 1px 0 0 currentColor;
    background-color: transparent;
    }
    
    ul, ol {
    margin: 0 0 1.75em 1.25em;
    padding: 0;
    }
    
    ol {
    list-style: decimal;
    margin-left: 1.5em;
    }
    
    ul {
    list-style: disc;
    }
    
    blockquote {
    quotes: none;
    border: 0 solid #c9c9c9;
    border-left-width: 4px;
    color: #f2f2f2;
    font-size: 16px;
    font-size: 1.1875rem;
    font-style: italic;
    line-height: 1.4736842105;
    margin: 0 0 1.4736842105em;
    padding: 0 0 0 1.263157895em;
    }
    
    code, kbd, tt, var, samp, pre {
    font-family: IBMPlexMono, san-serif;
    font-size: 1em;
    }
    
    pre {
    border: 1px solid #d1d1d1;
    font-size: 16px;
    font-size: 1rem;
    line-height: 1.3125;
    margin: 0 0 1.75em;
    max-width: 100%;
    overflow: auto;
    padding: 1.75em;
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
    }
    
    /*code block color changes*/
    
    code,pre {
    color:#f2f2f2;
    background-color:#424242;
    background-style:fill;
    border:1px;
    border-style:solid;
    border-color:#f2f2f2;
    border-radius:5px;
    padding:4px;
    }
    
    figure {
    margin: 0;
    margin-bottom: 1.75em;
    max-width: 100%;
    }
    
    img {
    height: auto;
    /* Make sure images are scaled correctly. */
    max-width: 100%;
    /* Adhere to container width. */
    vertical-align: middle;
    border: 0;
    }
    
    figcaption {
    color: #686868;
    font-size: 13px;
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.6153846154;
    padding-top: 0.5384615385em;
    }
    
    
    table, th, td {
    border: 1px solid #d1d1d1;
    }
    
    table {
    border-collapse: separate;
    border-spacing: 0;
    border-width: 1px 0 0 1px;
    margin: 0 0 1.75em;
    table-layout: fixed;
    /* Prevents HTML tables from becoming too wide */
    width: 100%;
    }
    
    
    th, td {
    padding: 0.4375em;
    }
    
    caption, th, td {
    font-weight: normal;
    text-align: left;
    }
    
    th {
    border-width: 0 1px 1px 0;
    font-weight: 700;
    }
    
    td {
    border-width: 0 1px 1px 0;
    }
    
    div.entry-summary {
    color: #686868;
    font-size: 19px;
    line-height: 28px;
    
    margin-top: -21px;
    margin-left: 0px;
    margin-bottom:	42px;
    margin-right: 0px;
    
    word-wrap: break-word;
    }
    
    div.post-thumbnail {
    margin-top: 0px;	
    margin-left: 0px;
    margin-bottom:	42px;
    margin-right: 0px;
    }
    
    /*link changes*/
    
    .entry-content a,
    .entry-summary a,
    .taxonomy-description a,
    .logged-in-as a,
    .comment-content a,
    .pingback .comment-body > a,
    .textwidget a,
    .entry-footer a,
    .entry-footer a:hover,
    .site-info a:hover {
    box-shadow: none;
    }
    
    .entry-content a,
    .entry-footer a {
    text-decoration:underline;
    }
    
    /*change auto-hyphens for post titles*/
    
    .post-navigation .post-title, 
    .entry-title, 
    .comments-title {
      -webkit-hyphens: manual !important;
      -moz-hyphens: manual !important;
      -ms-hyphens: manual !important;
      hyphens: manual !important;
    }
    
    /*border change for site*/
    
    @media screen and (min-width: 44.375em) {
      body:not(.custom-background-image):before,
      body:not(.custom-background-image):after {
        height: 2.5px;
      }
      .site {
        margin: 2.5px;
      }
    }
    
    /* FONTS */
    @font-face {
    font-family: IBMPlexMono;
    font-style: normal;
    font-weight: normal;
    src: url("https://nahumck.me/wp-content/fonts/IBMPlexMono/IBMPlexMono-Regular.otf");
    }
    
    @font-face {
    font-family: IBMPlexMono-Bold;
    font-style: normal;
    font-weight: normal;
    src: url("https://nahumck.me/wp-content/fonts/IBMPlexMono/IBMPlexMono-Bold.otf");
    }
    
    @font-face {
    font-family: IBMPlexMono-Italic;
    font-style: normal;
    font-weight: normal;
    src: url("https://nahumck.me/wp-content/fonts/IBMPlexMono/IBMPlexMono-Italic.otf");
    }
    
    @font-face {
    font-family: IBMPlexMono-BoldItalic;
    font-style: normal;
    font-weight: normal;
    src: url("https://nahumck.me/wp-content/fonts/IBMPlexMono/IBMPlexMono-BoldItalic.otf");
    }
    </style>
    </head>
    <body>
        <div>
    	%%[[post]]%%
    </div>
    </body></html>

Options

  • After Success Nothing
    Notification Info
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.