This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Take a parameter from the URL ie. /?myparam=value | |
created() { | |
let uri = window.location.search.substring(1) | |
let params = new URLSearchParams(uri) | |
if (params.get("myparam") !== null) { | |
console.log(`My URL parameter: ` + params.get("myparam")) | |
this.something = params.get("myparam") | |
this.myFunction() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://nickymeuleman.netlify.app/blog/css-animated-wrapping-underline | |
// https://codepen.io/jh3y/pen/gOPjBPM | |
:root { | |
--underline-width: 5px; | |
--underline-block-width: 2rem; | |
--underline-color: hsla(7, 72%, 49%, 0.363); | |
--underline-color-hover: transparent; | |
--underline-transition-in: 0.75; | |
--underline-transition-out: 0.5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forms.py | |
from django import forms | |
from . import widgets | |
class CustomWidgetForm(forms.Form): | |
working = forms.BooleanField( | |
required=False, | |
widget=widgets.ToggleWidget( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load wagtailcore_tags %} | |
<div id="accordion-{{ forloop.counter }}" role="tablist" aria-multiselectable="false" class="card-collapse"> | |
{% for block in self %} | |
<div class="card card-plain"> | |
<div class="card-header" role="tab" id="heading-{{ forloop.counter }}"> | |
<a data-toggle="collapse" data-parent="#accordion-{{ forloop.parentloop.counter }}" href="#collapse-{{ forloop.parentloop.counter }}-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse-{{ forloop.parentloop.counter }}-{{ forloop.counter }}"> | |
{% include_block block.value.question %} | |
<i class="fa fa-chevron-down"></i> | |
</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
display: inline-block; | |
vertical-align: middle; | |
width: 1rem; | |
height: 1rem; | |
stroke: currentcolor; | |
fill: none; | |
stroke-width: 2; | |
stroke-linecap: round; | |
stroke-linejoin: round; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add to <head> to prevent duplicate content issues in search engine optimization --> | |
<link rel="canonical" href="{{ page.full_url }}"> |
OlderNewer