Skip to content

Commit

Permalink
add basic snippets (without presentation)
Browse files Browse the repository at this point in the history
  • Loading branch information
konhi committed Aug 21, 2021
1 parent c0811e2 commit c8368f0
Show file tree
Hide file tree
Showing 16 changed files with 358 additions and 395 deletions.
438 changes: 43 additions & 395 deletions README.md

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions code/css-snippets/autofading-ui.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/rsdimitrov */
/* source: https://forum.obsidian.md/t/optimize-obsidian-ui-for-a-more-seamless-experience/155/5 */

/* auto fades note header controlls */
.view-header:not(:hover) .view-actions {
opacity: 0.1;
transition: opacity 0.25s ease-in-out;
}

/* auto fades status bar items */
.status-bar:not(:hover) .status-bar-item {
opacity: 0.25;
transition: opacity 0.25s ease-in-out;
}

/* smaller scrollbar */
.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar,
::-webkit-scrollbar {
width: 3px;
height: 3px;
}

/* Subtler folding gutter arrows */
.CodeMirror-foldgutter-folded:after,
.CodeMirror-foldgutter-open:after {
opacity: 0.5;
font-size: 60%;
}

.CodeMirror-foldgutter-folded:hover:after,
.CodeMirror-foldgutter-open:hover:after {
opacity: 1;
}

.CodeMirror-foldgutter-folded:after {
content: "\25BA";
}

.CodeMirror-foldgutter-open:after {
content: "\25BC";
}
20 changes: 20 additions & 0 deletions code/css-snippets/better-bullet-points-in-edit-mode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/Piotr */
/* source: https://forum.obsidian.md/t/clutter-free-edit-mode/6791/30 */

div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting-list-ul {
color: transparent;
position: relative;
}

div:not(.CodeMirror-activeline)
> .CodeMirror-line
span.cm-formatting-list-ul:after {
content: "•";
position: absolute;
top: -6px;
left: 4px;
color: var(--bright-aqua);
font-family: sans-serif;
font-size: 20px;
}
10 changes: 10 additions & 0 deletions code/css-snippets/bigger-link-popup-preview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://github.com/cannibalox */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/82 */

.popover.hover-popover {
transform: scale(0.8); /* makes the content smaller */
max-height: 800px; /* was 300 */
min-height: 100px;
width: 500px; /* was 400 */
}
22 changes: 22 additions & 0 deletions code/css-snippets/bigger-popup-windows.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/echo */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/175 */

.popover.hover-popover {
transform: scale(0.8); /* makes the content smaller */
max-height: 800px;
min-height: 50px;
width: 500px;
overflow: overlay; /* new added */
}

.popover.hover-popover .markdown-embed {
height: 100%;
}

.popover.hover-popover.is-loaded
.markdown-embed
.markdown-embed-content
.markdown-preview-view {
padding: 10px 10px 10px 16px; /*16px two pop magin */
}
24 changes: 24 additions & 0 deletions code/css-snippets/bullet-point-relationship-lines.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://github.com/deathau */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/2 */

.cm-hmd-list-indent .cm-tab,
ul ul {
position: relative;
}
.cm-hmd-list-indent .cm-tab::before,
ul ul::before {
content: "";
border-left: 1px solid rgba(0, 122, 255, 0.25);
position: absolute;
}
.cm-hmd-list-indent .cm-tab::before {
left: 0;
top: -5px;
bottom: -4px;
}
ul ul::before {
left: -11px;
top: 0;
bottom: 0;
}
12 changes: 12 additions & 0 deletions code/css-snippets/collapsing-sidebar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://github.com/kmaasrud */
/* source: https://github.com/kmaasrud/awesome-obsidian */

.side-dock-ribbon.mod-left.is-collapsed:not(:hover),
.side-dock-ribbon.mod-right.is-collapsed:not(:hover) {
width: 15px !important;
opacity: 0;
}
.side-dock-ribbon {
transition-property: width, opacity;
}
18 changes: 18 additions & 0 deletions code/css-snippets/custom-icons-differing-files-and-folders.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://github.com/deathau */
/* source: https://discord.com/channels/686053708261228577/702656734631821413/755293685046050896 */

/* Emoji */
/*.nav-file-title-content::before { content: '🗒 '; }
.nav-folder-title-content::before { content: '📂 '; }*/

/* Flat font */
/* Requires: https://icomoon.io/#icons-icomoon/liga-font */
.nav-folder-children .nav-file-title-content:first-child::before {
content: "\e924 ";
font-family: "IcoMoon-Free";
}
.nav-folder-children .nav-folder-title-content::before {
content: "\e930 ";
font-family: "IcoMoon-Free";
}
18 changes: 18 additions & 0 deletions code/css-snippets/enlarge-image-on-hover.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/den/summary */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/29 */

.markdown-preview-view img {
display: block;
margin-top: 20pt;
margin-bottom: 20pt;
margin-left: auto;
margin-right: auto;
width: 50%; /* experiment with values */
transition: transform 0.25s ease;
}

.markdown-preview-view img:hover {
-webkit-transform: scale(1.8); /* experiment with values */
transform: scale(2);
}
9 changes: 9 additions & 0 deletions code/css-snippets/hyphenation-and-justification.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/boyd/summary */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/25 */

.cm-s-obsidian,
.markdown-preview-view {
text-align: justify;
hyphens: auto;
}
34 changes: 34 additions & 0 deletions code/css-snippets/nicer-checkboxes.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/kepano/summary */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/34 */

/* Round checkbxes in preview and editor */
input[type="checkbox"],
.cm-formatting-task {
-webkit-appearance: none;
appearance: none;
border-radius: 50%;
border: 1px solid var(--text-faint);
padding: 0;
vertical-align: middle;
}

.cm-s-obsidian span.cm-formatting-task {
color: transparent;
width: 1.25em !important;
height: 1.25em;
display: inline-block;
}

input[type="checkbox"]:focus {
outline: 0;
}
input[type="checkbox"]:checked,
.cm-formatting-task.cm-property {
background-color: var(--text-accent-hover);
border: 1px solid var(--text-accent-hover);
background-position: center;
background-size: 70%;
background-repeat: no-repeat;
background-image: url('data:image/svg+xml; utf8, <svg width="12px" height="10px" viewBox="0 0 12 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-4.000000, -6.000000)" fill="%23ffffff"><path d="M8.1043257,14.0367999 L4.52468714,10.5420499 C4.32525014,10.3497722 4.32525014,10.0368095 4.52468714,9.8424863 L5.24777413,9.1439454 C5.44721114,8.95166768 5.77142411,8.95166768 5.97086112,9.1439454 L8.46638057,11.5903727 L14.0291389,6.1442083 C14.2285759,5.95193057 14.5527889,5.95193057 14.7522259,6.1442083 L15.4753129,6.84377194 C15.6747499,7.03604967 15.6747499,7.35003511 15.4753129,7.54129009 L8.82741268,14.0367999 C8.62797568,14.2290777 8.3037627,14.2290777 8.1043257,14.0367999"></path></g></g></svg>');
}
23 changes: 23 additions & 0 deletions code/css-snippets/outliner-for-the-outline-and-file-explorer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/Shamama & https://forum.obsidian.md/u/wonton/summary */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/112 */

.outline .collapsible-item-children {
margin-left: 20px;
border-left: 1px solid var(--faded-aqua);
border-radius: 4px;
transition: all 0.5s ease-in-out;
}
.outline .collapsible-item-children:hover {
border-left-color: var(--faded-aqua);
}
.nav-folder-children .nav-folder-children {
margin-left: 20px;
padding-left: 0;
border-left: 1px solid var(--faded-aqua);
border-radius: 4px;
transition: all 0.5s ease-in-out;
}
.nav-folder-children .nav-folder-children:hover {
border-left-color: var(--faded-aqua);
}
19 changes: 19 additions & 0 deletions code/css-snippets/stylish-blockquotes.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/Thery/summary */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/39 */

blockquote:before {
font: 14px/20px italic Times, serif;
content: "“";
font-size: 3em;
line-height: 0.1em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}

/* Remove blockquote left margin */
blockquote {
margin-inline-start: 0;
}
23 changes: 23 additions & 0 deletions code/css-snippets/subtler-folding-gutter-arrows.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/rsdimitrov */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/10 */

/* Make subtler folding gutter arrows */
.CodeMirror-foldgutter-folded:after,
.CodeMirror-foldgutter-open:after {
opacity: 0.5;
font-size: 60%;
}

.CodeMirror-foldgutter-folded:hover:after,
.CodeMirror-foldgutter-open:hover:after {
opacity: 1;
}

.CodeMirror-foldgutter-folded:after {
content: "\25BA";
}

.CodeMirror-foldgutter-open:after {
content: "\25BC";
}
33 changes: 33 additions & 0 deletions code/css-snippets/tag-pills.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/uzerper */
/* source: https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/72 */

.tag:not(.token) {
background-color: var(--text-accent);
border: none;
color: white;
font-size: 11px;
padding: 1px 8px;
text-align: center;
text-decoration: none;
display: inline-block;
margin: 0px 0px;
cursor: pointer;
border-radius: 14px;
}
.tag:not(.token):hover {
color: white;
background-color: var(--text-accent-hover);
}
.tag[href^="#obsidian"] {
background-color: #4d3ca6;
}
.tag[href^="#important"] {
background-color: red;
}
.tag[href^="#complete"] {
background-color: green;
}
.tag[href^="#inprogress"] {
background-color: orange;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* get more snippets at https://github.com/kmaasrud/awesome-obsidian */
/* author: https://forum.obsidian.md/u/d00b/summary */
/* source: https://forum.obsidian.md/t/bullet-lines-in-css-for-checkboxes/6262/3 */

.contains-task-list::before {
left: 10px;
}

0 comments on commit c8368f0

Please sign in to comment.