working on it ...

Filters

Explore Public Snippets

Sort by

Found 981 snippets matching: fluid

    public by JonahM  275570  4  7  4

    Fluid CSS Rows

    I've realised in my coding experience that I need to To allow for space in the div or row tags when using text. Because everything is responsive on a web page, it's a good idea to use these classes. They work really well. Example: http://j.mp/1oilINn
    
    
    .strip-md{
    	padding-top:80px;
    	padding-bottom:80px;
    	position:relative;
    	overflow:hidden;
    }
    
    .strip-sm{
    	padding-top:30px;
    	padding-bottom:30px;
    }
    
    

    public by JonahM  3132  1  7  6

    Fluid Responsive Rows

    Site: http://j.mp/1oilINn
    <section class="strip-sm row-fluid" style="background-color: #262626;" >
    	<div class="container">
    		<h4 style="color:white">This is copyrighted by Jonah McLachlan</h4>
    	</div>
    </section>
    
    
                

    external by misterboe  45  0  1  0

    Typo3 Fluid Partial to render Favicon Set (fluid / VHS)

    Typo3 Fluid Partial to render Favicon Set (fluid / VHS): Favicon.html
    <div xmlns="http://www.w3.org/1999/xhtml" lang="en"
    	 xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
    	 xmlns:f="http://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers"
    	 data-namespace-typo3-fluid="true">
    
    	<f:section name="Favicon">
    		{v:variable.set(name:'iconurl', value:'EXT:amtemplate/Resources/Public/Icons/Device/Icon.png')}
    		{f:uri.image(src:'{iconurl}', width: '57', height: '57') -> v:format.substring(start: 1) -> v:variable.set(name:'icon57')}
    		{f:uri.image(src:'{iconurl}', width: '114', height: '114') -> v:format.substring(start: 1) -> v:variable.set(name:'icon114')}
    		{f:uri.image(src:'{iconurl}', width: '72', height: '72') -> v:format.substring(start: 1) -> v:variable.set(name:'icon72')}
    		{f:uri.image(src:'{iconurl}', width: '144', height: '144') -> v:format.substring(start: 1) -> v:variable.set(name:'icon144')}
    		{f:uri.image(src:'{iconurl}', width: '60', height: '60') -> v:format.substring(start: 1) -> v:variable.set(name:'icon60')}
    		{f:uri.image(src:'{iconurl}', width: '120', height: '120') -> v:format.substring(start: 1) -> v:variable.set(name:'icon120')}
    		{f:uri.image(src:'{iconurl}', width: '76', height: '76') -> v:format.substring(start: 1) -> v:variable.set(name:'icon76')}
    		{f:uri.image(src:'{iconurl}', width: '152', height: '152') -> v:format.substring(start: 1) -> v:variable.set(name:'icon152')}
    
    		{f:uri.image(src:'{iconurl}', width: '196', height: '196') -> v:format.substring(start: 1) -> v:variable.set(name:'icon196')}
    		{f:uri.image(src:'{iconurl}', width: '96', height: '96') -> v:format.substring(start: 1) -> v:variable.set(name:'icon96')}
    		{f:uri.image(src:'{iconurl}', width: '32', height: '32') -> v:format.substring(start: 1) -> v:variable.set(name:'icon32')}
    		{f:uri.image(src:'{iconurl}', width: '16', height: '16') -> v:format.substring(start: 1) -> v:variable.set(name:'icon16')}
    		{f:uri.image(src:'{iconurl}', width: '128', height: '128') -> v:format.substring(start: 1) -> v:variable.set(name:'icon128')}
    
    		{f:uri.image(src:'{iconurl}', width: '70', height: '70') -> v:format.substring(start: 1) -> v:variable.set(name:'icon70')}
    		{f:uri.image(src:'{iconurl}', width: '150', height: '150') -> v:format.substring(start: 1) -> v:variable.set(name:'icon150')}
    		{f:uri.image(src:'{iconurl}', width: '310', height: '150c') -> v:format.substring(start: 1) -> v:variable.set(name:'iconwide')}
    		{f:uri.image(src:'{iconurl}', width: '310', height: '310') -> v:format.substring(start: 1) -> v:variable.set(name:'icon310')}
    
    		<v:page.header.link additionalAttributes="{sizes: '57x57'}" rel="apple-touch-icon-precomposed" href="{icon57}"/>
    		<v:page.header.link additionalAttributes="{sizes: '114x114'}" rel="apple-touch-icon-precomposed" href="{icon114}"/>
    		<v:page.header.link additionalAttributes="{sizes: '72x72'}" rel="apple-touch-icon-precomposed" href="{icon72}"/>
    		<v:page.header.link additionalAttributes="{sizes: '144x144'}" rel="apple-touch-icon-precomposed" href="{icon144}"/>
    		<v:page.header.link additionalAttributes="{sizes: '60x60'}" rel="apple-touch-icon-precomposed" href="{icon60}"/>
    		<v:page.header.link additionalAttributes="{sizes: '120x120'}" rel="apple-touch-icon-precomposed" href="{icon120}"/>
    		<v:page.header.link additionalAttributes="{sizes: '76x76'}" rel="apple-touch-icon-precomposed" href="{icon76}"/>
    		<v:page.header.link additionalAttributes="{sizes: '152x152'}" rel="apple-touch-icon-precomposed" href="{icon152}"/>
    
    		<v:page.header.link additionalAttributes="{sizes: '196x196'}" rel="icon" href="{icon196}" type="image/png"/>
    		<v:page.header.link additionalAttributes="{sizes: '196x196'}" rel="icon" href="{icon96}" type="image/png"/>
    		<v:page.header.link additionalAttributes="{sizes: '196x196'}" rel="icon" href="{icon32}" type="image/png"/>
    		<v:page.header.link additionalAttributes="{sizes: '196x196'}" rel="icon" href="{icon16}" type="image/png"/>
    		<v:page.header.link additionalAttributes="{sizes: '196x196'}" rel="icon" href="{icon128}" type="image/png"/>
    
    		<v:page.header.meta name="application-name" content="&nbsp;" />
    		<v:page.header.meta name="msapplication-TileColor" content="#FFFFFF" />
    		<v:page.header.meta name="msapplication-TileImage" content="{icon144}" />
    		<v:page.header.meta name="msapplication-square70x70logo" content="{icon70}" />
    		<v:page.header.meta name="msapplication-square150x150logo" content="{icon150}" />
    		<v:page.header.meta name="msapplication-wide310x150logo" content="{iconwide}" />
    		<v:page.header.meta name="msapplication-square310x310logo" content="{icon310}" />
    	</f:section>
    
    	<f:comment>
    		// Use this code to render a Favicon Set //
    		<f:render partial="Favicon" section="Favicon" />
    	</f:comment>
    </div>
    
    
    

    external by Tim Süberkrüb  34  0  1  0

    Setup Fluid on Ubuntu (https://github.com/qmlos/fluid)

    Setup Fluid on Ubuntu (https://github.com/qmlos/fluid): fluid-setup.sh
    #!/bin/bash
    
    # Setup Fluid on Ubuntu (https://github.com/qmlos/fluid)
    #
    # MIT License
    #
    # Copyright (C) 2016 by Tim Süberkrüb
    #
    # Permission is hereby granted, free of charge, to any person obtaining a copy
    # of this software and associated documentation files (the "Software"), to deal
    # in the Software without restriction, including without limitation the rights
    # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    # copies of the Software, and to permit persons to whom the Software is
    # furnished to do so, subject to the following conditions:
    #
    # The above copyright notice and this permission notice shall be included in all
    # copies or substantial portions of the Software.
    #
    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    # SOFTWARE.
    #
    
    info(){
      tput setaf 3
      tput bold
      echo $1
      tput sgr0
    }
    
    error() {
      tput setaf 1
      tput bold
      echo "$1"
      tput sgr0
    }
    
    prompt(){
      tput setaf 3
      echo -n "$1"
      tput sgr0
    }
    
    info "Welcome to Fluid Installer for Ubuntu"
    info "This script helps you to setup Fluid (https://github.com/qmlos/fluid)"
    prompt "Do you wish to continue (Y/n)? "
    read -n 1 continue_installation
    echo
    if [[ $continue_installation != "y"* ]] && [[ $continue_installation != "Y"* ]] && [ ! -z "$continue_installation" ]; then
      error "Exiting."
      exit
    fi
    
    info "Installing dependencies ..."
    sudo apt update && sudo apt upgrade
    sudo apt install git cmake extra-cmake-modules
    sudo apt install mesa-common-dev # Required for android-cmake
    
    info "Please enter the path of your clone of the Fluid repository "
    info "or where it should get cloned:"
    info "[1] /tmp/fluid-install/"
    info "[2] Custom ..."
    prompt "Choose (default: 1): "
    read -n 1 installation_mode
    echo
    
    data_path="/tmp/fluid-install/"
    
    if [ ! -d "$data_path" ]; then
       mkdir $data_path
    fi
    cd $data_path
    
    if [ -z "$installation_mode" ]; then
      installation_mode="1"
    fi
    
    if [ "$installation_mode" == "1" ]; then
      info "Temporary installation data is written to /tmp/fluid-install"
      fluid_source_path="/tmp/fluid-install/source"
      if [ ! -d "$fluid_source_path" ]; then
        mkdir -p "$fluid_source_path"
        info "Cloning Fluid git repository ..."
        git clone https://github.com/qmlos/fluid "$fluid_source_path"
      else
        info "Updating Fluid git repository ..."
        cd "$fluid_source_path"
        git checkout develop
        git pull
      fi
    elif [ "$installation_mode" == "2" ]; then
      info "Enter the path to your clone of the Fluid repository."
      info "If you don't have one, enter the path where it should be cloned to."
      prompt "Path to Fluid source: "
      read fluid_source_path
      echo
      if [ ! -d "$fluid_source_path" ]; then
        error "Invalid path."
        exit
      elif [ ! -d "$fluid_source_path/.git" ]; then   # Naive.
        info "Not a git repository. "
        info "Cloning fluid source to '$fluid_source_path/fluid'..."
        fluid_source_path="$fluid_source_path/fluid"
        info "Cloning Fluid git repository ..."
        git clone https://github.com/qmlos/fluid "$fluid_source_path"
      else
        info "Updating Fluid git repository ..."
        cd "$fluid_source_path"
        git checkout develop
        git pull
        cd "$data_path"
      fi
    else
      error "Invalid option."
      exit
    fi
    
    info "Fluid requires Qt >= 5.7"
    user_name=$(whoami)
    default_qt_install_dir="/home/$user_name/Qt/5.7"
    
    prompt "Please enter the path where you installed Qt 5.7 (default: $default_qt_install_dir): "
    read qt_install_dir
    echo
    if [ -z "$qt_install_dir" ]; then
      qt_install_dir=$default_qt_install_dir
    fi
    if [ ! -d "$qt_install_dir" ]
    then
        error "The given path '$qt_install_dir' doesn't seem to exist."
        exit
    fi
    
    info "Please choose the target platform: "
    ls $qt_install_dir
    prompt "Choose (default: gcc_64): "
    read qt_platform
    echo
    if [ -z "$qt_platform" ]; then
      qt_platform="gcc_64"
    fi
    if [ ! -d "$qt_install_dir/$qt_platform" ]; then
        error "The given target platform '$qt_platform' doesn't seem to be installed."
        exit
    fi
    
    is_android_platform=false
    
    if [[ $qt_platform == *"android"* ]]; then
      info "Android platform detected."
      is_android_platform=true
      info "Checking for android cmake toolchain ..."
      if [ ! -d "android-cmake" ]; then
        info "Not found. Cloning android-cmake ..."
        git clone https://github.com/taka-no-me/android-cmake
      else
        info "Found. Updating ..."
        cd android-cmake
        git pull
        cd ..
      fi
      info "In order to build Fluid for Android you need to have the Android NDK installed."
      prompt "NDK Installation path: "
      read ndk_path
      echo
      if [ ! -d "$ndk_path" ]; then
        error "Invalid path."
        exit
      fi
      prompt "Please enter the Android ABI (default: armeabi-v7a): "
      read android_abi
      echo
      if [ -z "$android_abi" ]; then
        android_abi="armeabi-v7a"
      fi
    
      file_to_be_patched="$qt_install_dir/$qt_platform/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
      if [ ! -d "patch" ]; then
        mkdir patch
      fi
      if [ ! -e "patch/cmake_android.patch" ]; then
        touch "patch/cmake_android.patch"
        echo "@@ -98,7 +98,7 @@ set(Qt5_DISABLED_FEATURES" >> "patch/cmake_android.patch"
        echo " " >> "patch/cmake_android.patch"
        echo " set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)" >> "patch/cmake_android.patch"
        echo " " >> "patch/cmake_android.patch"
        echo "-set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)" >> "patch/cmake_android.patch"
        echo "+#set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)" >> "patch/cmake_android.patch"
        echo " " >> "patch/cmake_android.patch"
        echo ' set(QT_VISIBILITY_AVAILABLE "True")' >> "patch/cmake_android.patch"
        echo " " >> "patch/cmake_android.patch"
      fi
    
      info "Because of a bug in Qt (https://bugreports.qt.io/browse/QTBUG-54666)"
      info " CMake fails to configure an Android build in Qt 5.7."
      patch -p0 -N --dry-run $file_to_be_patched < patch/cmake_android.patch 2>/dev/null
      if [ $? -eq 0 ]; then
        prompt "Do you want to patch your installation (y/N):"
        read -n 1 patch_install
        echo
        if [[ $patch_install == "n"* ]] || [[ $patch_install == "N"* ]] || [ -z "$patch_install" ]; then
          error "Exiting."
          exit
        else
          info "Patching Qt for Android ..."
          patch $file_to_be_patched patch/cmake_android.patch
          info "Patch applied."
        fi
      else
        info "Patch has already been applied."
      fi
    fi
    
    cd "$fluid_source_path"
    release_tag=$(git describe --abbrev=0)
    
    info "Please select the version you want to install:"
    info "[1] Latest release ($release_tag)"
    info "[2] Development branch"
    prompt "Choose (default: 1): "
    read -n 1 option_num
    echo
    
    if [ -z "$option_num" ]; then
      option_num="1"
    fi
    
    if [ "$option_num" == "1" ]; then
      git checkout -q tags/$release_tag
      info "Installing release $release_tag."
    elif [ "$option_num" == "2" ]; then
      info "Installing latest development state."
    else
      error "Invalid option."
      exit
    fi
    
    info "Fetching icons ..."
    ./scripts/fetch_icons.sh
    
    info "What type of build to you wish to perform?"
    info "[1] Debug"
    info "[2] Release"
    prompt "Choose (default: 1): "
    read -n 1 build_type
    echo
    
    if [ -z "$build_type" ]; then
      option_num="1"
    fi
    
    if [ "$build_type" == "1" ]; then
      build_type="Debug"
    elif [ "$build_type" == "2" ]; then
      build_type="Release"
    else
      error "Invalid option."
      exit
    fi
    
    info "Performing $build_type build."
    
    cd "$data_path"
    
    if [ ! -d "build" ]; then
      info "Creating build directory ..."
      mkdir build/
    else
      info "Cleaning build directory ..."
      rm -rf build && mkdir build/
    fi
    cd build/
    
    info "Running cmake ..."
    
    if $is_android_platform; then
      cmake -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \
            -DANDROID_NDK="$ndk_path" \
            -DANDROID_ABI="$android_abi" \
            -DCMAKE_PREFIX_PATH=$qt_install_dir/$qt_platform/lib/cmake \
            -DCMAKE_BUILD_TYPE=$build_type \
            -DKDE_INSTALL_QMLDIR=$qt_install_dir/$qt_platform/qml \
            "$fluid_source_path"
    else
      cmake -DCMAKE_PREFIX_PATH=$qt_install_dir/$qt_platform/lib/cmake \
            -DCMAKE_BUILD_TYPE=$build_type \
            -DKDE_INSTALL_QMLDIR=$qt_install_dir/$qt_platform/qml \
            "$fluid_source_path"
    fi
    info "Running make ..."
    make
    info "Running make install ..."
    sudo make install
    
    cd ../../
    
    info "Done."
    
    
    

    external by ProLoser  229  0  3  0

    Fluid App Userstyles for IRCCloud.com

    Fluid App Userstyles for IRCCloud.com: irccloud.css
    /* Pattern:  *.irccloud.com*    */
    * {
        box-sizing: border-box;
    }
    #limits, #footer, #timeContainer, .bufferinput .timecell { 
      display: none !important;
    }
    #container div#sidebarwrapper {
        z-index: 1;
        width: 175px !important;
        height: calc(50% - 55px) !important;
        bottom: 0 !important;
        top: auto !important;
        overflow: auto;
        background: white;
    }
    #container div#mainwrapper {
        padding-right: 0 !important;
    }
    #container .memberwrapper {
        height: 50% !important;
    }
    #container {
        min-width: auto !important;
    }
    
    

    external by devyfriend  1379  1  4  0

    twitter bootstrap modal fluid ... just add .modal-fluid in div with modal id

    twitter bootstrap modal fluid ... just add .modal-fluid in div with modal id: modal-fluid.js
    (function ($) {
      $(function () {
    		function update() {
    			var width = $(document).width();
    			var height = $(document).height();
    				$('.modal-fluid').css({
    				width: width * 0.8,
    				marginLeft: -(width * 0.4)
    			});
    			$('.modal-fluid .modal-body').css({
    				maxHeight: (height * 0.8) - 136
    			});
    			$('.modal-fluid').each(function () {
    			$(this).css({
    				marginTop: -($(this).height() / 2),
    			});
    			});
    		}
    		$(document).resize(update);
    		update();
    	});
    }(window.jQuery));
    
    

    external by Roger Stringer  11  0  1  0

    Userscript for Fluid App (http://fluidapp.com) to enable dock count and desktop notifications for Google Inbox

    Userscript for Fluid App (http://fluidapp.com) to enable dock count and desktop notifications for Google Inbox: fluid_inbox_userscript.js
    window.fluid.dockBadge = '';
    
    // for tracking when to notify
    var previousUnreadCount = 0;
    
    // Main polling
    var readyStateCheckInterval = setInterval(function() {
      if(document.readyState === "complete") {
        setInterval(updateDockBadge, 3000);
        clearInterval(readyStateCheckInterval);
      }
    }, 3000);
    
    
    function updateDockBadge() {
    	var currentUnreadCount = 0;
    	var badge = document.getElementsByClassName('qG').length;
    	
    	if (badge) {
    		if(parseInt(badge) > 0) {
    			currentUnreadCount += parseInt(badge);
    		}
    	}
    	if(currentUnreadCount == 0) {
    		window.fluid.dockBadge = '';
    		previousUnreadCount = 0;
    	} else {
    		// update dock with new count
    		window.fluid.dockBadge = currentUnreadCount;
    		
    		// determine how many new mails there are and notify
    		var unreadMailCount = currentUnreadCount - previousUnreadCount;
    		if(unreadMailCount > 0) {
    			notify(unreadMailCount);
    			previousUnreadCount = currentUnreadCount;
    		}
    	}
    }
    
    
    // Creates a Notification Center message, if supported
    function notify(count) {
    	var supportsWebkitNotifications = ('webkitNotifications' in window);
    	if(count > 0 && supportsWebkitNotifications) {
    		if(webkitNotifications.checkPermission() == 0) {
    			body = (count == 1) ? '1 new message' : count + ' new messages';
    			webkitNotifications.createNotification(
    				null, 
    				'You got mail', 
    				body
    			).show();
    		}
    	}
    }
    
    

    external by Nate Rutman  126  0  2  0

    A Fluid userscript to show the unread message count for a Gmail SSB.

    A Fluid userscript to show the unread message count for a Gmail SSB.: gmail.newMessageCount.js
    /**
     * A userscript for Fluid. This script updates the dock badge for a Gmail SSB
     * to the number of unread messages in the Inbox.
     * 
     * NOTE: For best results, make sure the User Agent is set to a Safari agent.
     */
    
    initialize();
    
    function initialize() {
        window.fluid.dockBadge = '';
        setInterval(updateDockBadge, 1000);
    }
    
    function getUnreadBadge() {
        var regex = /\s*Inbox\s*\((\d+)\)[^\d]*/;
    
        var inboxLink = document.querySelectorAll('[role=navigation] a');
        if (!inboxLink.length) {
            return '';
        }
        
        var matches = inboxLink[0].innerText.match(regex);
    
        if (!matches || matches.length < 2) {
            return '';
        }
        
        return matches[1];
    }
    
    
    function updateDockBadge() {
        window.fluid.dockBadge = getUnreadBadge();
    }
    
    
    
    

    external by than  125  0  2  0

    Fluid userstyles for overcast.fm

    Fluid userstyles for overcast.fm: gistfile1.css
    CSS
    /** 
     * Userstyles for Overcast.fm Fluid app
     * than.land
     * Updated: 7/24/14
     */ 
    
    /* Custom scroll bar */
    html {
        overflow: auto;
    }
    body {
        position: absolute;
        top: 10px;
        left: 0;
        bottom: 10px;
        right: 10px;
        padding: 30px 20px 30px 30px; 
        overflow-y: scroll;
        overflow-x: hidden;
    }
    
    ::-webkit-scrollbar {
        width: 1px;
    }
     
    ::-webkit-scrollbar-track {
        background: #eee;
    }
     
    ::-webkit-scrollbar-thumb {
        -webkit-border-radius: 10px;
        border-radius: 10px;
        background: rgba(252,126,15,0.8); 
    
    }
    ::-webkit-scrollbar-thumb:window-inactive {
    	background: rgba(252,126,15,0.4); 
    }
    
    /* Page layout tweaks */
    .nav {
        padding-top: 0 !important;
    }
    
    .container h2:first-child {
        margin-top: 0 !important;
    }
    
    

    external by Ryszard Narkiewicz  114  0  2  0

    Fluid css fold/unfold animation when having auto height

    Fluid css fold/unfold animation when having auto height: auto-height-folding.css
    CSS
    /*
     * Credits goes to +RichBradshaw, from whom I've learned this technique
     */
    .container .hidden-container {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.2s ease; /* reverse transition*/
      /* remember not to put any borders, paddings here*/
    }
    .container:hover .hidden-container {
      max-height: 999px; /* enter bigger value if necessary, but don't over do as it impacts the animation speed! */
      transition: max-height 0.5s ease; /* forward transition */
    }
    
    
    • Public Snippets
    • Channels Snippets