# @cjsx React.DOM React = require('react') Edit = require('./edit') ModalTrigger = require('react-bootstrap/lib/ModalTrigger') Glyphicon = require('react-bootstrap/lib/Glyphicon') markdownIt = require('markdown-it')(linkify: true) helpers = require('../helpers') classnames = require('classnames') module.exports = React.createClass displayName: 'Card' componentDidMount: -> @props.card.on 'change', @forceUpdate.bind(@, null) getInitialState: ()-> showTools: false editing: false updating: false title: @props.card.get('title') content: @props.card.get('content') onMouseOver: ()-> @setState showTools: true onMouseLeave: ()-> @setState showTools: false showTools: ()-> helpers.isMobile() || @state.showTools render: -> context = @props.card.query.context
{ if @props.card.get('focused') || @props.card.query.context == 'none' } {@props.card.get('title')} { if @props.card.modelName == 'Card' }>     else   {@props.card.get('version')} }
{ if @props.card.fetching else
}
{ if @props.card.get("tags") @props.card.get("tags").map (tag)->     {tag} }