forked from cybrespace/pinafore
		
	play with event listeners
This commit is contained in:
		
							parent
							
								
									e1ed7b466f
								
							
						
					
					
						commit
						3bba43ea17
					
				
					 1 changed files with 21 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<article>
 | 
			
		||||
<article on:click="alert(event)">
 | 
			
		||||
    {{#if status.reblog}}
 | 
			
		||||
      <div class="header">
 | 
			
		||||
        {{status.account.username}} boosted
 | 
			
		||||
        <a href="{{status.account.url}}">{{status.account.username}}</a> boosted
 | 
			
		||||
      </div>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
  <div class="sidebar">
 | 
			
		||||
| 
						 | 
				
			
			@ -26,6 +26,7 @@
 | 
			
		|||
 | 
			
		||||
<style>
 | 
			
		||||
  article {
 | 
			
		||||
    pointer-events: none;
 | 
			
		||||
    padding: 10px 0;
 | 
			
		||||
    max-width: 600px;
 | 
			
		||||
    margin: 0 auto;
 | 
			
		||||
| 
						 | 
				
			
			@ -51,6 +52,15 @@
 | 
			
		|||
    white-space: pre-wrap;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  :global(.content a) {
 | 
			
		||||
    pointer-events: auto;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  :global(.header a) {
 | 
			
		||||
    pointer-events: auto;
 | 
			
		||||
    color: #333;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .header {
 | 
			
		||||
    grid-area: header;
 | 
			
		||||
    margin: 5px;
 | 
			
		||||
| 
						 | 
				
			
			@ -62,11 +72,13 @@
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  .footer button {
 | 
			
		||||
    pointer-events: auto;
 | 
			
		||||
    margin: auto;
 | 
			
		||||
    padding: 7px 10px 5px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .footer svg {
 | 
			
		||||
    pointer-events: none;
 | 
			
		||||
    width: 25px;
 | 
			
		||||
    height: 25px;
 | 
			
		||||
    fill: royalblue;
 | 
			
		||||
| 
						 | 
				
			
			@ -81,6 +93,12 @@
 | 
			
		|||
    },
 | 
			
		||||
    data: () => ({
 | 
			
		||||
      status: null
 | 
			
		||||
    })
 | 
			
		||||
    }),
 | 
			
		||||
    methods: {
 | 
			
		||||
      alert: function (e) {
 | 
			
		||||
        e.preventDefault()
 | 
			
		||||
        window.alert(e.target)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue